Skip to main content
POST
Assign User Role

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

FlowClient Credentials
Token URL
https://cloud-login.cdata.com/oauth/token
Scopes1
management:users:write
Write access to user resources.

Path Parameters

id
string<uuid>
required

User identifier (UUID).

Body

application/json
role_id
string<uuid>
required

Role to assign. Must exist in the organization.

Response

OK. The role is already assigned; returns the existing assignment.

A direct role assignment made via POST /users/{id}/roles.

id
string<uuid>

Assignment identifier.

user_id
string<uuid>

The user this role is assigned to.

role_id
string<uuid>

The role identifier.

role_name
string

The name of the role.

role_type
enum<string>

Always system_role (admin) for assignments made via this endpoint.

Available options:
system_role
grant_type
enum<string>

Always direct for assignments made via this endpoint.

Available options:
direct
granted_at
string<date-time>

ISO 8601 UTC.

granted_by
string<uuid>

The user who granted the role.

Last modified on July 27, 2026