How to map Roles with their corresponding Scopes in the token generated

329 views
Skip to first unread message

Harshith DA

unread,
Jul 15, 2021, 10:20:47 AM7/15/21
to Keycloak User
Hello,

I'm trying to find a way to know which Scopes actually belong or mapped to which Role an User is assigned with. There is a post in the Forum posted but there is no response there - https://keycloak.discourse.group/t/is-there-a-way-to-map-roles-with-their-corresponding-scopes-in-a-single-claim-in-keycloak-oauth-token/7426 
image (3).png
So in the above token generated, there are multiple roles assigned to User. Red coloured scopes belong to Red coloured role and similarly Green colour belong to another Role. But how can we know which Scope belongs to which Role?

We need to figure this out because we need to switch a User's role while accessing application, based on his current Role he has selected we need to allow him Scopes(which we are planning to use as permissions or privileges). 

Can someone help or share how we can configure the same. 

Thanks,
Harshith
Reply all
Reply to author
Forward
0 new messages