<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[How to model OAuth2 system using Tenants, Entities, and Entity Types?]]></title><description><![CDATA[<p dir="auto">I'm working on representing an OAuth2 system within FusionAuth and need guidance on the architectural design. Specifically, I'm unsure how to properly split different components across:</p>
<ul>
<li><strong>Tenants</strong> — when to use separate tenants vs. a single tenant</li>
<li><strong>Entities</strong> — what should be modeled as an entity instance</li>
<li><strong>Entity Types</strong> — how to define entity types to represent OAuth2 concepts</li>
</ul>
<p dir="auto">What are the best practices for structuring an OAuth2 architecture using these FusionAuth primitives? Are there common patterns or design considerations I should follow?</p>
]]></description><link>https://fusionauth.io/community/forum/topic/3321/how-to-model-oauth2-system-using-tenants-entities-and-entity-types</link><generator>RSS for Node</generator><lastBuildDate>Wed, 11 Nov 2026 03:13:38 GMT</lastBuildDate><atom:link href="https://fusionauth.io/community/forum/topic/3321.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 03 Nov 2026 22:09:42 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to How to model OAuth2 system using Tenants, Entities, and Entity Types? on Tue, 10 Nov 2026 22:49:40 GMT]]></title><description><![CDATA[<p dir="auto">For modeling an OAuth2 system in FusionAuth, here are the key architectural considerations:</p>
<h2>Tenants</h2>
<ul>
<li>Use <strong>separate tenants</strong> when you need complete isolation between environments (e.g., different customers in a multi-tenant SaaS product, or separate production/staging environments with distinct user bases)</li>
<li>Use a <strong>single tenant</strong> when your users and applications share the same authentication realm</li>
<li>Tenants provide the highest level of separation — each has its own users, applications, groups, and configuration</li>
</ul>
<h2>Entities and Entity Types</h2>
<ul>
<li><strong>Entity Types</strong> define categories of non-user objects in your system (e.g., "Device", "API Client", "Organization", "Service Account")</li>
<li><strong>Entities</strong> are instances of those types (e.g., a specific device, a specific organization)</li>
<li>Use entities to represent OAuth2 concepts like:
<ul>
<li>Client credentials for machine-to-machine authentication</li>
<li>Devices in device authorization flows</li>
<li>Organizations or business units that own applications</li>
<li>Non-human actors that need permissions or relationships to users</li>
</ul>
</li>
</ul>
<h2>Common Pattern</h2>
<p dir="auto">A typical OAuth2 architecture in FusionAuth might look like:</p>
<ul>
<li><strong>Tenant</strong> = Your authentication realm/environment</li>
<li><strong>Applications</strong> = Your OAuth2 clients (registered apps that can authenticate users)</li>
<li><strong>Entity Types</strong> = Categories like "Organization", "Device", or "API Client"</li>
<li><strong>Entities</strong> = Specific instances (e.g., "Acme Corp" as an Organization entity)</li>
<li><strong>Users</strong> = End users who authenticate</li>
</ul>
<p dir="auto">The key is mapping your OAuth2 concepts to FusionAuth's primitives based on whether they represent users (User objects), applications (Application objects), or other non-user actors/resources (Entities).</p>
]]></description><link>https://fusionauth.io/community/forum/post/8982</link><guid isPermaLink="true">https://fusionauth.io/community/forum/post/8982</guid><dc:creator><![CDATA[FASupportBot]]></dc:creator><pubDate>Tue, 10 Nov 2026 22:49:40 GMT</pubDate></item></channel></rss>