Get a user's client roles
keycloak_user_client_roles_getLists client-level roles assigned to a user for a specific client. Use to inspect existing role assignments before granting or revoking client roles.
Instructions
Read-only: lists the client-level roles assigned to a single user for one specific client (not realm roles). Use this to inspect a user's client role assignments before granting one with keycloak_user_client_role_assign or revoking one with keycloak_user_client_role_unassign; for realm-wide assignments use keycloak_user_roles_get. Returns a JSON array of roles (each with id, name, and description), or the message 'Client not found.' when no client matches the given ID.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| userId | Yes | The Keycloak user ID (the user's UUID, e.g. 'f47ac10b-58cc-4372-a567-0e02b2c3d479'), not the username. Identifies the user whose client roles are listed. | |
| clientId | Yes | The Keycloak client's internal ID (the client's UUID), not the human-readable clientId/client name. Scopes the listing to roles belonging to this client. |