Manage Platform User Roles
platform_user_role_managementAdd, remove, or list users assigned to a Platform role by role ID, using user principal names or UUIDs to manage role membership.
Instructions
Add, remove, or list users assigned to a Platform role.
"list"->POST /identity/api/Report/RunReportIDrole_searchbyname(filtered to role_id). Returns the role's row; some tenants include amemberscolumn there. Callers can cross-reference with :func:search_users."add"/"remove"->POST /identity/api/Roles/UpdateRolewith body{"Name": <role_id>, "Users": {"Add": [...]}}or{"Users": {"Delete": [...]}}.
Mutation behaviour is discovery-driven: the tool attempts the documented endpoint and only falls back to a structured guidance error when the response is HTTP 404.
Parameters
action:
"add", "remove" or "list".
role_id:
Platform role name/identifier.
user_principals:
For "add"/"remove": list of user principal names (e.g.
"alice@tenant") or UUIDs. Accepts a JSON-encoded string too.
Returns
dict
Report payload for "list"; {"result": ..., "verification": ...}
for successful writes; {"error": ...} when the endpoint is
unavailable on this tenant.
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": {
"action": "<action>",
"role_id": "<role_id>"
},
"name": "platform_user_role_management"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| action | Yes | ||
| role_id | Yes | ||
| user_principals | No |