Assign roles to a user in an organization
Assign roles to a user in the specified organization with the provided data.
Path parameters
-
The unique identifier of the organization.
-
The unique identifier of the user.
Body Required
-
An array of organization role IDs to assign to the user. User existed roles assignment will be ignored.
Minimum length of each is
1
.
POST /api/organizations/{id}/users/{userId}/roles
curl \
-X POST https://[tenant_id].logto.app/api/organizations/{id}/users/{userId}/roles \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{"organizationRoleIds":["string"]}'
Request examples
{
"organizationRoleIds": [
"string"
]
}