Multi-tenancy using one realm and multiple clients

Hey, I have a requirement for building a cross-user multi-tenant application (i.e. users can be shared across tenants if needed).
Since the same user can be shard across more than 1 tenant, implementing multi-tenancy using 1 realm per tenant is not an option.
I was curious about whether it’s possible to map specific users to specific clients, restricting access to client they’re not mapped to.

There are new features related to multi-tenancy [1] in version 25. It’s still in preview, and there are many points on the roadmap to address [2], but you can review it and check if it helps you.

[1] Server Administration Guide
[2] Keycloak Organizations · Issue #30180 · keycloak/keycloak · GitHub

1 Like