Multi-Tenant Extension for Keycloak

Multiple Tenants in One Realm – for SaaS, B2B and Enterprise Structures

Assign users to a tenant – a customer company, partner or team. Applications receive this context in the token and can adjust content, pricing or permissions accordingly. What you gain:
  • Tenant context in the token: applications know who belongs to whom
  • B2B scenarios: users see their company’s prices and terms
  • With User Portal: tenant admins manage their users themselves
Keycloak Extension Multi-Tenant SaaS B2B portal Enterprise structure

Book a free
consultation call now

Online and fast

available time slots
Choose a time slot
Your benefits with the Multi-Tenant Extension:
One realm, many tenants: central configuration, no duplication
Token includes tenant context: applications react automatically
Flexible assignment: one user can belong to multiple tenants
Custom attributes per tenant: company name, region, contract data
Can be combined with User Portal for delegated administration

How the Multi-Tenant Extension works

Tenants as a context layer in the realm

The extension introduces a new layer: the tenant. Users are assigned to one or more tenants. Tenant context is included in the token – applications use it for tenant-specific logic.

What defines a tenant

Organizational context for users

A tenant is an area in Keycloak – typically a customer company, a department or a partner team:
User assignment
Each user belongs to one or more tenants
Available in the token
Applications receive the tenant context
Tenant attributes
Company name, region, contract data, etc.
For your applications
Control prices, terms and content per tenant

Users in multiple tenants

For consultants, project members or admins

A user can belong to multiple tenants – with different permissions:
Different roles per tenant are possible
Example: admin for customer A, viewer for customer B
Applications receive the active tenant context

Typical use cases

Where the Multi-Tenant Extension is used

B2B shops: users see their company’s prices and terms
SaaS platforms: customer-specific configurations and limits
Partner portals: content and functions depending on partner type
Consumer scenarios: family accounts or group accounts

Can be combined with other extensions

For complete multi-tenant solutions

Invitation Extension – Invite new users directly into the right tenant
User Portal – Tenant admins manage their users themselves
License Management – Check user quotas per tenant

Frequently asked questions about the Multi-Tenant Extension

Tenants, roles, integration

How do applications use the tenant context?

Can a user work in multiple tenants?

Can tenant admins manage their users themselves?

Does the extension work with existing Keycloak installations?

What is the difference compared to separate Keycloak realms?

Multi-Tenant Extension for your project

Let’s check together whether the extension fits your requirements.

Frank Tripp Head of Identity & Access Management c.frank.tripp@loginfactor.com 05251 5449490
Frank Tripp