keycloak_get_user_role_mappings
Retrieve a Keycloak user's role mappings, showing direct roles by default or all effective roles when requested.
Instructions
Get a user's role mappings. By default returns only roles assigned DIRECTLY to the user; set effective to also include roles inherited from groups and from composite roles — that is the set that actually lands in their token.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| realm | No | Realm to operate on. Defaults to the server's configured realm (KEYCLOAK_REALM). | |
| userId | Yes | User UUID (the `id` field), NOT the username. Find it with keycloak_list_users. | |
| effective | No | Include roles inherited via groups and composites. |