B2B Organizations (soft grouping inside a Tenant)
The Organizations system enables soft B2B grouping inside a single Auris Tenant. Each organization represents a team, department, or logical grouping within that tenant — with its own members, roles, and optional enterprise SSO. Organizations are independent of each other: a user’s role in Organization A has no bearing on their access in Organization B.
Hard isolation = Tenant only. For MSP / regulated multi-customer workloads, create one Tenant per customer. Do not sell Organizations as multi-customer hard isolation. Org-in-tenant multi-customer is soft at best and is not the default product path (requires FGA + org_id in tokens if ever used).
Use Organizations for teams inside one customer’s Tenant. Use Create Tenant when onboarding a new external customer that needs a hard data boundary.
Core Concepts
Organization: A named entity with a unique slug. Organizations have metadata, display names, and settings. They are always owned by exactly one user (the OWNER).
Organization Member: A user who belongs to an organization with one of four roles: OWNER, ADMIN, MEMBER, or VIEWER.
Invitation: A time-limited, token-based invite that allows a user (or an email address not yet registered) to join an organization at a specified role.
Organization-scoped SSO: Each organization can configure its own SAML 2.0 or OIDC identity provider. When a user logs in with an email matching a verified domain, Auris redirects them to their organization’s IdP automatically. See Enterprise SSO.
Creating Organizations
Organizations can be created by any user with the appropriate permission, or programmatically via the Management SDK.
/api/organizationsRequires: admin:allCreates a new organization. The creating user is automatically assigned the OWNER role.
Request body:
{
"name": "Acme Corporation",
"displayName": "Acme Corp",
"slug": "acme-corp",
"metadata": {
"plan": "enterprise",
"contractId": "CNT-2025-0042"
}
}Field reference:
| Field | Type | Required | Notes |
|---|---|---|---|
name | string | Yes | Internal name, unique per tenant |
displayName | string | No | User-facing name shown in UI |
slug | string | No | URL-safe identifier, auto-generated from name if omitted |
metadata | object | No | Arbitrary JSON for application-specific data |
/api/organizationsRequires: admin:allReturns a paginated list of all organizations in the tenant. Supports search and page/limit query parameters.
/api/organizations/[id]Requires: admin:allReturns the organization record including member count and basic settings.
/api/organizations/[id]Requires: manage:organizationsUpdates organization fields. All fields are optional — only provided fields are updated.
/api/organizations/[id]Requires: admin:allDeletes the organization. Members lose their organization-level role assignments. The underlying user accounts are not affected.
Member Roles
Organizations use a four-level hierarchical role system. Higher roles inherit all capabilities of lower roles.
| Role | Capabilities |
|---|---|
| OWNER | Full control. Can manage all settings, members, SSO, and billing. There is always exactly one OWNER. The OWNER cannot be removed by another OWNER — ownership must be transferred first. |
| ADMIN | Can manage members (add, remove, change roles up to ADMIN). Can configure SSO and organization settings. Cannot delete the organization. |
| MEMBER | Standard access. Role grants are application-defined — Auris does not impose resource restrictions at this level beyond what your application enforces. |
| VIEWER | Read-only access. Can view organization membership and settings but cannot make changes. |
Auris enforces the role hierarchy at the API level. An ADMIN cannot assign the OWNER role to another user — ownership transfer requires a separate API call by the current OWNER.
Managing Members
/api/organizations/[id]/membersRequires: admin:allReturns the paginated list of organization members, including their user details and role within the organization.
Response:
{
"data": [
{
"userId": "usr_01HX...",
"email": "[email protected]",
"firstName": "Alice",
"lastName": "Rossi",
"role": "ADMIN",
"joinedAt": "2025-01-15T10:00:00Z"
}
],
"pagination": { "page": 1, "limit": 20, "total": 12, "totalPages": 1 }
}/api/organizations/[id]/membersRequires: admin:allDirectly adds a user (by userId) to the organization at a specified role. The user must already exist in Auris.
{
"userId": "usr_01HX...",
"role": "MEMBER"
}/api/organizations/[id]/members/[userId]Requires: admin:allUpdates the member’s role within the organization.
/api/organizations/[id]/members/[userId]Requires: admin:allRemoves the user from the organization. The user’s Auris account is not deleted or disabled.
Invitations
Invitations allow you to add users to an organization by email, even if they do not yet have an Auris account. The invite flow:
- An ADMIN or OWNER sends an invitation to an email address.
- Auris generates a unique, time-limited token and sends an email with an accept link.
- The invitee clicks the link. If they already have an Auris account, they are added to the organization immediately. If not, they are prompted to create an account, after which the invitation is accepted.
- Invitations expire after 7 days if not accepted.
/api/organizations/[id]/invitationsRequires: admin:allCreates and sends an invitation to an email address.
{
"email": "[email protected]",
"role": "MEMBER",
"message": "You have been invited to join Acme Corp on our platform."
}/api/organizations/[id]/invitationsRequires: admin:allLists all pending, accepted, and expired invitations for the organization.
/api/organizations/[id]/invitations/[invitationId]Requires: admin:allCancels a pending invitation. Expired invitations cannot be accepted but do not need to be manually cancelled.
Invitation statuses:
| Status | Meaning |
|---|---|
PENDING | Sent and awaiting acceptance |
ACCEPTED | User accepted and is now a member |
EXPIRED | 7-day window passed without acceptance |
CANCELLED | Manually cancelled by an ADMIN or OWNER |
SDK Usage
React
import { useOrganization } from '@auris/react'
function OrgDashboard() {
// Returns the organization context from the authenticated user's session.
// The organization is derived from the access token's claims.
const { organization, members, isLoading } = useOrganization()
if (isLoading) return <div>Loading...</div>
if (!organization) return <div>No organization</div>
return (
<div>
<h1>{organization.displayName}</h1>
<p>Members: {members.length}</p>
<ul>
{members.map((member) => (
<li key={member.userId}>
{member.email} — {member.role}
</li>
))}
</ul>
</div>
)
}Organization Metadata
Like users, organizations support arbitrary JSON metadata. Use this to store application-specific data alongside the organization record without schema migrations.
{
"metadata": {
"plan": "enterprise",
"contractId": "CNT-2025-0042",
"maxSeats": 250,
"billingEmail": "[email protected]",
"features": ["advanced-analytics", "custom-domains", "audit-export"]
}
}Metadata is returned in every organization API response and is accessible in the Management SDK.
Use Cases
SaaS multi-tenancy: Each of your customers is an organization. Your application reads the user’s organization from their JWT or session and scopes all data queries to that organization. New customers are onboarded by creating an organization and inviting their admin.
Enterprise customer onboarding: Create the organization, add the customer’s IT administrator as OWNER, and let them manage their own users and configure their corporate SSO. Your team retains tenant-level visibility via the Admin Console.
White-label solutions: Each end-customer organization can configure their own SSO, domain verification, and display name. The Hosted Login page adapts to per-organization branding when a user’s email matches a verified domain.
Internal product teams: Separate product lines or business units into distinct organizations for isolated role management, without maintaining separate Auris tenant instances.
Required Permissions
| Operation | Permission |
|---|---|
| List / get organizations | view:organizations |
| Create / update / delete organizations | manage:organizations |
| Manage members | manage:organizations |
| Send / cancel invitations | manage:organizations |
Related Pages
- Enterprise SSO per Organization — Configure SAML 2.0 or OIDC SSO for individual organizations
- SCIM 2.0 Provisioning — Automate member sync from an external IdP
- Roles & Permissions — Tenant-level RBAC that complements organization roles
- Console: Organizations — Full Console walkthrough