Skip to main content
GET
https://{tenantDomain}/api/v2
/
organizations
/
{id}
/
client-grants
C#
using Auth0.ManagementApi;
using System.Threading.Tasks;
using Auth0.ManagementApi.Organizations;
using System.Collections.Generic;

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

        await client.Organizations.ClientGrants.ListAsync(
            id: "id",
            request: new ListOrganizationClientGrantsRequestParameters {
                Audience = "audience",
                ClientId = "client_id",
                GrantIds = new List<string>(){
                    "grant_ids",
                }
                ,
                Page = 1,
                PerPage = 1,
                IncludeTotals = true
            }
        );
    }

}
[
  {
    "id": "<string>",
    "client_id": "<string>",
    "audience": "<string>",
    "scope": [
      "<string>"
    ],
    "allow_any_organization": true
  }
]

Authorizations

Authorization
string
header
required

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

Path Parameters

id
string
required

Organization identifier.

Maximum string length: 50

Query Parameters

audience
string

Optional filter on audience of the client grant.

Maximum string length: 600
client_id
string

Optional filter on client_id of the client grant.

grant_ids
string<client-grant-id>[]

Optional filter on the ID of the client grant. Must be URL encoded and may be specified multiple times (max 10).
e.g. ../client-grants?grant_ids=id1&grant_ids=id2

page
integer

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

Required range: x >= 0
per_page
integer

Number of results per page. Defaults to 50.

Required range: 1 <= x <= 100
include_totals
boolean

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

Response

Client grants successfully retrieved.

id
string

ID of the client grant.

client_id
string

ID of the client.

audience
string

The audience (API identifier) of this client grant

Minimum string length: 1
scope
string[]

Scopes allowed for this client grant.

Minimum string length: 1
organization_usage
enum<string>

Defines whether organizations can be used with client credentials exchanges for this grant.

Available options:
deny,
allow,
require
allow_any_organization
boolean

If enabled, any organization can be used with this grant. If disabled (default), the grant must be explicitly assigned to the desired organizations.