keycloak

Keycloak 20.0.2: I am not seeing the realm roles in user Role Mapping


When I create a User in my realm, and click the Role Mappings tab, according to every SO post I see there should be a way to select the realm roles to apply. But in my case I am not seeing them.

This is what I see: enter image description here

I am trying to add the manage_users role, so I can use this User to manage users via the API. But almost all the realm roles are missing from the Role Mapping tab.

Can anyone enlighten me about what else I need to do so the realm roles appear, especially the realm_management ones?


Solution

  • In the Role Mappings tab

    enter image description here

    You need to click on the Assign role button

    enter image description here

    which will popup the following menu:

    enter image description here

    and from there you can find the client and realm roles.

    I am trying to add the manage_users role, so I can use this User to manage users via the API.

    If the previous menu you would change Filter by realm roles to Filter by clients, and the following menu would show up:

    enter image description here

    and in the Search by role name field type realm-management:

    enter image description here

    select manage_users and then click Assign. You should see that role being assigned to your user

    enter image description here