v1

latestOpenAPI 3.0.32026-07-14314472448.6 KB
access_control
enterprise

Set user role assignments.

Update the user’s role assignments to match the provided set of UIDs. This will remove any assigned roles that aren’t in the request and add roles that are in the set but are not already assigned to the user. Roles mapped through group attribute sync are not impacted. If you want to add or remove a single role, consider using Add a user role assignment or Remove a user role assignment instead.

You need to have a permission with action users.roles:add and users.roles:remove and scope permissions:type:delegate for each. permissions:type:delegate scope ensures that users can only assign or unassign roles which have same, or a subset of permissions which the user has. For example, if a user does not have required permissions for creating users, they won’t be able to assign or unassign a role which will allow to do that. This is done to prevent escalation of privileges.

put/access-control/users/{userId}/roles

Path parameters

userIdinteger required

Query parameters

targetOrgIdinteger

Request body

globalboolean
includeHiddenboolean
roleUidsstring[]

Response

An OKResponse is returned if the request was successful.

messagestring