Skip to Content
ZITADEL Docs
APIsCore ResourcesV2Role Assignment

Update Role Assignments

Note: Authorization in this context refers to role assignments, not to OAuth authorization.

UpdateAuthorization updates the authorization.

Note that any role keys previously granted to the user and not present in the request will be revoked.

Required permissions:

  • "user.grant.write"
POST
/zitadel.authorization.v2.AuthorizationService/UpdateAuthorization

Header Parameters

Connect-Protocol-Version*1

Define the version of the Connect protocol

Value in1
Connect-Timeout-Ms?Connect-Timeout-Ms

Define the timeout, in ms

Request Body

application/json
  1. body
id?id

ID is the unique identifier of the authorization.

roleKeys?array<string>

RoleKeys are the keys of the roles the user should be granted. Note that any role keys previously granted to the user and not present in the list will be revoked.

Response Body

Success

application/json
  1. response
changeDate?change_date

ChangeDate is the timestamp when the authorization was last updated.

Formatdate-time
Example Request
curl -X POST 'https://example.com/zitadel.authorization.v2.AuthorizationService/UpdateAuthorization' \  -H 'Connect-Protocol-Version: 1' \  -H 'Content-Type: application/json' \  -d '{}'
Example Response
{  "changeDate": "2023-01-15T01:30:15.01Z"}

Was this page helpful?