Get keycloak users based on their effective roles

Hi guys… I’m trying to get all users of my client that have some client role, no matter if it is assigned or effective.

I’ve tried this endpoint:
GET /{realm}/clients/{id}/roles/{role-name}/users
but it works just if the role is directly assigned to a user, not if it belongs as composite of a role assgned to that user…

Is there a way to do what I’m trying?


Hi, afraid this is a known limitation. There’s a PR for it here, but we have some concerns around performance that needs to be investigated before we could merge it.

1 Like