You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Importing realm via Keycloak Operator does not give users the default realm roles #44778
I have read and understood the above terms for submitting issues, and I understand that my issue may be closed without action if I do not follow them.
Area
import-export
Describe the bug
I am importing a realm with the keycloak operator as described in the docs. In this realm import, I also specified which users should be created, see the admin user in this yaml:
As expected, the realm and the user are created. However, I ran into this issue that the user is not given have the default realm roles. I.e. if I go to the admin UI -> go to new realm -> users -> user created via realm import -> role mapping, this is empty. I'd expect to see a role default-roles-<realm-name>
Any subsequent user that I create in the realm is given the default-roles-<realm-name> as expected.
Could it be that the user is created before the default realm role and therefore does not receive it?
Workaround
My temp workaround is to just assign the rules directly to the user in my realm config:
Activity