Search code examples
keycloakkeycloak-servicesredhat-sso

Newly added admin of realm can't login to the realm in Keycloak


There are 2 realms in Keycloak: master and custom. Both have admin users.

Custom realm admin adds new user new_admin and assigns role admin to him via admin console.

The user can access his account details at auth/realms/custom/account/.

However, error Forbidden You don't have access to the requested resource pops when new_admin user tries to enter realm administration console at auth/admin/custom/console/.

The same issue happens even when master realm admin adds new admin user to custom realm.

I'm using Keycloak 4.3.0.

Is it a bug or realm can't have two admins?


Solution

  • The solution was to assign role realm-admin of realm-management client to the second admin user.

    enter image description here