get_user_groups
Retrieve all groups that a user belongs to in a Keycloak realm. Specify the user ID and optionally the realm to get the group list.
Instructions
Get all groups for a user.
Args:
user_id: User ID
realm: Target realm (uses default if not specified)
Returns:
List of groups the user belongs to
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"user_id": "<user_id>"
},
"name": "get_user_groups"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| user_id | Yes | ||
| realm | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |