Table of Contents

Class GrantsClient

Namespace
Auth0.ManagementApi.Clients
Assembly
Auth0.ManagementApi.dll
public class GrantsClient : BaseClient, IGrantsClient
Inheritance
GrantsClient
Implements
Inherited Members

Constructors

GrantsClient(IManagementConnection, Uri, IDictionary<string, string>)

public GrantsClient(IManagementConnection connection, Uri baseUri, IDictionary<string, string> defaultHeaders)

Parameters

connection IManagementConnection
baseUri Uri
defaultHeaders IDictionary<string, string>

Methods

DeleteAllAsync(string, CancellationToken)

Deletes all Grants of a given user.

public Task DeleteAllAsync(string userId, CancellationToken cancellationToken = default)

Parameters

userId string
cancellationToken CancellationToken

The cancellation token to cancel operation.

Returns

Task

A Task that represents the asynchronous delete operation.

Remarks

A token with scope delete:grants is needed.

DeleteAsync(string, CancellationToken)

Delete an existing Grant

public Task DeleteAsync(string id, CancellationToken cancellationToken = default)

Parameters

id string

The ID of the grant to delete.

cancellationToken CancellationToken

The cancellation token to cancel operation.

Returns

Task

A Task that represents the asynchronous delete operation.

Remarks

A token with scope delete:grants is needed.

GetAllAsync(GetGrantsRequest, PaginationInfo, CancellationToken)

Retrieve all Grants.

public Task<IPagedList<Grant>> GetAllAsync(GetGrantsRequest request, PaginationInfo pagination = null, CancellationToken cancellationToken = default)

Parameters

request GetGrantsRequest

Specifies criteria to use when querying grants.

pagination PaginationInfo

Specifies pagination info to use.

cancellationToken CancellationToken

The cancellation token to cancel operation.

Returns

Task<IPagedList<Grant>>

An IPagedList<T> containing the grants.

Remarks

A token with scope read:grants is needed