assignRoles
Assign one or more per-service roles to an existing user within a tenant. Additive: roles the user already holds are preserved. Only per-service role keys are accepted; ladder roles (reader/writer/admin) are rejected. Tenant-admin only. The Zitadel root organization is refused: it is not a tenant, and its accounts are managed in the Zitadel console.
Served by: management
Arguments
Section titled “Arguments”| Name | Type |
|---|---|
input |
AssignRolesInput! |
Returns
Section titled “Returns”Example
Section titled “Example”Grants one or more per-service roles to an existing user within a tenant. Roles the user already holds are preserved, so the call is additive. Only per-service role keys are accepted (ladder roles reader/writer/admin are rejected). Tenant-admin only.
mutation AssignRoles($input: AssignRolesInput!) { assignRoles(input: $input) { roles userId }}Variables
{ "input": { "roles": [ "inventory_service" ], "tenantId": "<tenant UUID>", "userId": "<management user UUID>" }}