Users

Update roles for user

Update API resource roles assigned to the user. This will replace the existing roles.

put/api/users/{userId}/roles

Request

  • Base URL: https://[tenant_id].logto.app
  • URL: https://[tenant_id].logto.app/api/users/{userId}/roles
  • Auth: OAuth 2 (client credentials, token URL /oidc/token, scopes: all)

Path parameters

userIdstring required

The unique identifier of the user.

Request body

roleIdsstring[] required

An array of API resource role IDs to assign.

Response

The API resource roles has been updated for the user successfully.

roleIdsstring[] required

An array of API resource role IDs assigned to the user.

Changes

No recorded changes to this operation across all 8 revisions of this API.