removeRoles
Since pyck v0.27.0
Remove one or more per-service roles from an existing user within a tenant. Idempotent: removing a role the user does not hold is a no-op. The user’s ladder roles (reader/writer/admin) and any other service roles are preserved. Only per-service role keys are accepted; ladder roles are rejected. Tenant- admin only. A token issued before the call keeps the role until it expires (1h access-token lifetime; docs/tenant-access-control.md).
Served by: management
Arguments
Section titled “Arguments”| Name | Type | Default | Description |
|---|---|---|---|
input |
RemoveRolesInput! |
Returns
Section titled “Returns”Example
Section titled “Example”Removes one or more per-service roles from an existing user within a tenant. The call is idempotent, so removing a role the user does not hold is a no-op. The user’s ladder roles (reader/writer/admin) and any other service roles are preserved. Only per-service role keys are accepted (ladder roles are rejected). Tenant-admin only.
mutation RemoveRoles($input: RemoveRolesInput!) { removeRoles(input: $input) { roles userId }}Variables
{ "input": { "roles": [ "inventory_service" ], "tenantId": "<tenant UUID>", "userId": "<management user UUID>" }}