Buddhika Priyabhashana
Buddhika Priyabhashana

Reputation: 333

How to assign specific role to a user for a group in keycloak

I created a group in keycloak and i added users to the group. I want to add one user as the group admin of the group by adding ADMIN role to one user and other users should remain with USER role.

One user can belongs to multiple groups. As an example User_A can be in Group_A, Group_B and Group_C. And also User_A is the admin of Group_A and in Group_B and Group_C, he is a normal user.

Is there any way to achieve this requirement in keycloak?

Please let me know is there any solution.

Upvotes: 1

Views: 3212

Answers (1)

Mat
Mat

Reputation: 1389

You could have a sub-group admin with default ADMIN role below Group_A , and put User A in that sub-group.

Or why don't you just assign individual ADMIN role to User_A ? As I understand groups function in keycloak, it is essentially a way of assigning automatic attributes/roles to user (and...to group them). But roles assigned via groups function are exactly the same as individual roles I think.

Upvotes: 3

Related Questions