Endpoint
Request Body
The ID of the user to assign the role to.
The name of the role to assign. The role must already exist. Cannot be empty or whitespace only.
Request Example
Response
Success Response
Returns
"OK" when the role is successfully assignedtrueif the user already had this rolefalseif the role was newly assigned
Error Response
Returns
"UNKNOWN_ROLE_ERROR" when the specified role does not existImplementation Details
Source: View source- Role names are trimmed of leading/trailing whitespace before processing
- The role must be created first using the Create Role endpoint
- Role assignments are scoped to the tenant in which they are created
- Assigning a role that a user already has is not an error - the API will return successfully with
didUserAlreadyHaveRole: true
Error Responses
Returned when the
role field is empty or whitespace onlyRelated Endpoints
Role Management Overview
See all role management endpoints