set-user-attributes
Set user attributes in Keycloak by specifying realm, user ID, and attribute key-value pairs. Store organization data like department, role, or custom fields directly on user profiles.
Instructions
Set user attributes (CRITICAL for storing organization data)
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": {
"realm": "<realm>",
"userId": "<userId>",
"attributes": "<attributes>"
},
"name": "set-user-attributes"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| realm | Yes | Realm name | |
| userId | Yes | User ID | |
| attributes | Yes | User attributes (key-value pairs where values are arrays) |