Table of Contents

Interface IRolesClient

Namespace
Auth0.ManagementApi.Users
Assembly
Auth0.ManagementApi.dll
public interface IRolesClient
Extension Methods

Methods

AssignAsync(string, AssignUserRolesRequestContent, RequestOptions?, CancellationToken)

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.

Task AssignAsync(string id, AssignUserRolesRequestContent request, RequestOptions? options = null, CancellationToken cancellationToken = default)

Parameters

id string
request AssignUserRolesRequestContent
options RequestOptions
cancellationToken CancellationToken

Returns

Task

DeleteAsync(string, DeleteUserRolesRequestContent, RequestOptions?, CancellationToken)

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.

Task DeleteAsync(string id, DeleteUserRolesRequestContent request, RequestOptions? options = null, CancellationToken cancellationToken = default)

Parameters

id string
request DeleteUserRolesRequestContent
options RequestOptions
cancellationToken CancellationToken

Returns

Task

ListAsync(string, ListUserRolesRequestParameters, RequestOptions?, CancellationToken)

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.

Task<Pager<Role>> ListAsync(string id, ListUserRolesRequestParameters request, RequestOptions? options = null, CancellationToken cancellationToken = default)

Parameters

id string
request ListUserRolesRequestParameters
options RequestOptions
cancellationToken CancellationToken

Returns

Task<Pager<Role>>