# removeRoles

Audience: Developer

Remove one or more per-service roles from an existing user within a tenant.

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). The Zitadel root
organization is refused: it is not a tenant, and its accounts are
managed in the Zitadel console.

**Served by:** [management](https://docs.pyck.cloud/dev/api/services/management.md)

## Arguments

| Name | Type |
| --- | --- |
| `input` | [RemoveRolesInput](https://docs.pyck.cloud/dev/api/inputs/removerolesinput.md)! |

## Returns

[RemoveRolesResponse](https://docs.pyck.cloud/dev/api/types/removerolesresponse.md)!

## 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.

```graphql
mutation RemoveRoles($input: RemoveRolesInput!) {
  removeRoles(input: $input) {
    roles
    userId
  }
}
```

**Variables**

```json
{
  "input": {
    "roles": [
      "inventory_service"
    ],
    "tenantId": "<tenant UUID>",
    "userId": "<management user UUID>"
  }
}
```
