You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Can one user manage multiple accounts by switching through different tenant?
#39996
I have a current Angular and Spring Boot based multi tenant application where the initial tenant and tenant user called the tenant admin are created through the keycloak registration page. During this registration a unique tenant id is generated and saved as a user attribute which is mapped to the JWT token. Subsequent users are created from our application by the tenant admin where the all users under that tenant have the same tenant id but different business unit id attribute.
Problem:
This works well when all tenants are independent of each other. Now according to a new requirement there is going to be a super tenant which will provide service to multiple sub tenant. All users will be a part of the super tenant and they should be able to switch between the various sub tenant and perform all operation. Now this switch is made when the already logged in user select a different sub tenant from a page. Upon making this selection basically the following should happen.
User attributes tenant id and business unit id will be updated to that of the newly selected sub tenant.
The user should be logged out and current session should be revoked.
The same user should be logged in again with new JWT token containing the updated user attributes.
Is there a direct Keycloak's feature where this can be achieved either by using same or different approach?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Background:
I have a current Angular and Spring Boot based multi tenant application where the initial tenant and tenant user called the tenant admin are created through the keycloak registration page. During this registration a unique tenant id is generated and saved as a user attribute which is mapped to the JWT token. Subsequent users are created from our application by the tenant admin where the all users under that tenant have the same tenant id but different business unit id attribute.
Problem:
This works well when all tenants are independent of each other. Now according to a new requirement there is going to be a super tenant which will provide service to multiple sub tenant. All users will be a part of the super tenant and they should be able to switch between the various sub tenant and perform all operation. Now this switch is made when the already logged in user select a different sub tenant from a page. Upon making this selection basically the following should happen.
Is there a direct Keycloak's feature where this can be achieved either by using same or different approach?
Thanks in advance.
All reactions