Remove Roles from User
remove_user_rolesRemoves assigned roles from a Secret Server user by calling DELETE /api/v1/users/{id}/roles; Secret Server blocks removals that would lock out role administration.
Instructions
Remove roles from a Secret Server user.
Calls DELETE /api/v1/users/{id}/roles with {"roleIds": [...]}.
Secret Server refuses any role removal it calculates would lock the
signed-in account out of role administration
(API_RoleAdministrationNoLockout). It counts only rights granted
through Secret Server roles, so an account that is an administrator
through the Delinea Platform can add roles but not remove them.
Secret Server REST API reference:
https://docs.delinea.com/online-help/secret-server/api-scripting/rest-api/rest-api-reference-download/index.htm
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>",
"role_ids": "<role_ids>"
},
"name": "remove_user_roles"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| user_id | Yes | ||
| role_ids | Yes |