Skip to content
Discussion options

You must be logged in to vote

Looking at the org.keycloak.models.jpa.RoleAdapter I found out that:

@Override
public String getContainerId() {
    return isClientRole() ? role.getClientId() : role.getRealmId();
}

containerId is actually clientId (which maps to the client.id in the database - not client.clientId) when the role is a client role.
Once you know that, you can use val client = realm.getClientById(it.key) to get the client.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by mimozell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant