Add a user to a client role

I am trying to add a user to a client role from the admin console. I am using Keycloak v. 20.0.2.

I created a client role

When I go to Users in Role I see:

I assume this is the screen I want to see populated.

But I could only add realm roles to a user. How do I add users to this client role?

1 Like

You don’t add users to role, but you assign role to user or group.
Navigate to users menu, select user, edit it and go to Role mappings tab. Then select client and choose roles you want to add to the user.
You can also create a group, ad multiple users to the group and assign roles to that group.

1 Like

This was helpful. TY

Hi Jason
I am also using the same version of the keycloak but I cant see the options .
The client role that i create is not present here.

Switch the filter from “realm roles” to “client roles”…