Passer au contenu principal
GET
https://{tenantDomain}/api/v2
/
grants
C#
using Auth0.ManagementApi;
using System.Threading.Tasks;

public partial class Examples
{
    public async Task Example() {
        var client = new ManagementClient(
            token: "<token>"
        );

        await client.UserGrants.ListAsync(
            new ListUserGrantsRequestParameters {
                PerPage = 1,
                Page = 1,
                IncludeTotals = true,
                UserId = "user_id",
                ClientId = "client_id",
                Audience = "audience"
            }
        );
    }

}
[
  {
    "id": "<string>",
    "clientID": "<string>",
    "user_id": "<string>",
    "audience": "<string>",
    "scope": [
      "<string>"
    ],
    "organization_id": "<string>"
  }
]

Autorisations

Authorization
string
header
requis

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Paramètres de requête

per_page
integer

Number of results per page.

Plage requise: 1 <= x <= 100
page
integer

Page index of the results to return. First page is 0.

Plage requise: x >= 0
include_totals
boolean

Return results inside an object that contains the total result count (true) or as a direct array of results (false, default).

user_id
string

user_id of the grants to retrieve.

client_id
string

client_id of the grants to retrieve.

audience
string

audience of the grants to retrieve.

Réponse

Grants successfully retrieved.

id
string

ID of the grant.

clientID
string

ID of the client.

user_id
string

ID of the user.

audience
string

Audience of the grant.

scope
string[]

Scopes included in this grant.

Minimum string length: 1
organization_id
string
GA

ID of the organization associated with the grant.