Skip to content
Pyck docs

You are reading the Dev docs (main @ e991a08). They can differ from the released product.Dev docs, not the release

Switch to LatestLatest

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

Name Type
input AssignRolesInput!

AssignRolesResponse!

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>"
}
}