Configuring the same application across Tenants
Solution 1:? If we have all clients in the same realm, the same client is shared across the tenants.
The tenants are managed using user attributes. Add user attribute “TenantId” which will be a multi-valued string.
?
Value can be provided for each user.
In client scopes, we can add a mapper for this attribute and set scope as default, to be added in token scope
.
Then for each client, we can add this to the client scope
.
Then this value would be added to each user token.
We can add it in a default scope:
Then we can view it in the access token
Solution2:
Same Clients in different Realms/ Tenants:
We can create a client in a realm and use the same config in other realms/ Tenant config.
In order to set the client credentials to be same across the realms, we can call the create client api and pass the secret. That too works well.