update-user-roles
Manage user roles in Keycloak by adding or removing client-specific roles for a user within a specified realm. Simplifies role updates for enhanced access control.
Instructions
Add and/or remove client roles for a user in a specific realm and client
Input Schema
Name | Required | Description | Default |
---|---|---|---|
clientId | Yes | Client ID | |
realm | Yes | Realm name | |
rolesToAdd | No | Roles to add | |
rolesToRemove | No | Roles to remove | |
userId | Yes | User ID |
Input Schema (JSON Schema)
{
"properties": {
"clientId": {
"description": "Client ID",
"type": "string"
},
"realm": {
"description": "Realm name",
"type": "string"
},
"rolesToAdd": {
"description": "Roles to add",
"items": {
"type": "string"
},
"type": "array"
},
"rolesToRemove": {
"description": "Roles to remove",
"items": {
"type": "string"
},
"type": "array"
},
"userId": {
"description": "User ID",
"type": "string"
}
},
"required": [
"realm",
"userId",
"clientId"
],
"type": "object"
}