docs/classes/management.SDK.RolesClient-2.html
new RolesClient(options: BaseClientOptions): RolesClient
list(
id: string,
request?: ListUserRolesRequestParameters,
requestOptions?: RolesClient.RequestOptions,
): Promise<Page<Role, ListUserRolesOffsetPaginatedResponseContent>>
Retrieve detailed list of all user roles currently assigned to a user.
Note : This action retrieves all roles assigned to a user in the context of your whole tenant. To retrieve Organization-specific roles, use the following endpoint: Get user roles assigned to an Organization member.
ID of the user to list roles for.
OptionalrequestOptions: RolesClient.RequestOptionsRequest-specific configuration.
Management.TooManyRequestsError
await client.users.roles.list("id", { per_page: 1, page: 1, include_totals: true })Copy
assign(
id: string,
request: AssignUserRolesRequestContent,
requestOptions?: RolesClient.RequestOptions,
): HttpResponsePromise<void>
Assign one or more existing user roles to a user. For more information, review Role-Based Access Control.
Note : New roles cannot be created through this action. Additionally, this action is used to assign roles to a user in the context of your whole tenant. To assign roles in the context of a specific Organization, use the following endpoint: Assign user roles to an Organization member.
ID of the user to associate roles with.
OptionalrequestOptions: RolesClient.RequestOptionsRequest-specific configuration.
Management.TooManyRequestsError
await client.users.roles.assign("id", { roles: ["roles"] })Copy
delete(
id: string,
request: DeleteUserRolesRequestContent,
requestOptions?: RolesClient.RequestOptions,
): HttpResponsePromise<void>
Remove one or more specified user roles assigned to a user.
Note : This action removes a role from a user in the context of your whole tenant. If you want to unassign a role from a user in the context of a specific Organization, use the following endpoint: Delete user roles from an Organization member.
ID of the user to remove roles from.
OptionalrequestOptions: RolesClient.RequestOptionsRequest-specific configuration.
Management.TooManyRequestsError
await client.users.roles.delete("id", { roles: ["roles"] })Copy
Protected Readonly_options_options: NormalizedClientOptionsWithAuth<BaseClientOptions>
Member Visibility
ThemeOSLightDark
Constructors constructor Methods listassigndelete Properties _options