メインコンテンツへスキップ
GET
https://{tenantDomain}/api/v2
/
client-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.ClientGrants.ListAsync(
            new ListClientGrantsRequestParameters {
                From = "from",
                Take = 1,
                Audience = "audience",
                ClientId = "client_id",
                AllowAnyOrganization = true,
                SubjectType = ClientGrantSubjectTypeEnum.Client,
                DefaultFor = "third_party_clients"
            }
        );
    }

}
package example

import (
context "context"

management "github.com/auth0/go-auth0/management/management"
client "github.com/auth0/go-auth0/management/management/client"
option "github.com/auth0/go-auth0/management/management/option"
)

func do() {
client := client.NewClient(
option.WithToken(
"<token>",
),
)
request := &management.ListClientGrantsRequestParameters{
From: management.String(
"from",
),
Take: management.Int(
1,
),
Audience: management.String(
"audience",
),
ClientId: management.String(
"client_id",
),
AllowAnyOrganization: management.Bool(
true,
),
}
client.ClientGrants.List(
context.TODO(),
request,
)
}
package com.example.usage;

import com.auth0.client.mgmt.ManagementApi;
import com.auth0.client.mgmt.resources.clientgrants.requests.ListClientGrantsRequestParameters;
import com.auth0.client.mgmt.types.ClientGrantSubjectTypeEnum;

public class Example {
public static void main(String[] args) {
ManagementApi client = ManagementApi
.builder()
.token("<token>")
.build();

client.clientGrants().list(
ListClientGrantsRequestParameters
.builder()
.from("from")
.take(1)
.audience("audience")
.clientId("client_id")
.allowAnyOrganization(true)
.subjectType(ClientGrantSubjectTypeEnum.CLIENT)
.defaultFor("third_party_clients")
.build()
);
}
}
<?php

namespace Example;

use Auth0\SDK\API\Management\Management;
use Auth0\SDK\API\Management\ClientGrants\Requests\ListClientGrantsRequestParameters;
use Auth0\SDK\API\Management\Types\ClientGrantSubjectTypeEnum;

$client = new Management(
token: '<token>',
);
$client->clientGrants->list(
new ListClientGrantsRequestParameters([
'from' => 'from',
'take' => 1,
'audience' => 'audience',
'clientId' => 'client_id',
'allowAnyOrganization' => true,
'subjectType' => ClientGrantSubjectTypeEnum::Client->value,
'defaultFor' => 'third_party_clients',
]),
);
from auth0.management import ManagementClient

client = ManagementClient(
token="<token>",
)

client.client_grants.list(
from="from",
take=1,
audience="audience",
client_id="client_id",
allow_any_organization=True,
subject_type="client",
default_for="third_party_clients",
)
require "auth0"

client = Auth0::Management.new(token: "<token>")

client.client_grants.list(
from: "from",
take: 1,
audience: "audience",
client_id: "client_id",
allow_any_organization: true,
subject_type: "client",
default_for: "third_party_clients"
)
import { ManagementClient } from "auth0";

async function main() {
const client = new ManagementClient({
token: "<token>",
});
await client.clientGrants.list({
from: "from",
take: 1,
audience: "audience",
clientId: "client_id",
allowAnyOrganization: true,
});
}
main();
import { ManagementClient } from "auth0";

async function main() {
const client = new ManagementClient({
token: "<token>",
});
await client.clientGrants.list({
from: "from",
take: 1,
audience: "audience",
clientId: "client_id",
allowAnyOrganization: true,
});
}
main();
curl --request GET \
--url https://{tenantDomain}/api/v2/client-grants \
--header 'Authorization: Bearer <token>'
[
  {
    "id": "<string>",
    "client_id": "<string>",
    "audience": "<string>",
    "scope": [
      "<string>"
    ],
    "allow_any_organization": true,
    "default_for": "third_party_clients",
    "is_system": true,
    "authorization_details_types": [
      "<string>"
    ],
    "allow_all_scopes": true
  }
]

承認

Authorization
string
header
必須

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

クエリパラメータ

per_page
integer

Number of results per page.

必須範囲: 1 <= x <= 100
page
integer

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

必須範囲: 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).

from
string

Optional Id from which to start selection.

take
integer

Number of results per page. Defaults to 50.

必須範囲: 1 <= x <= 100
audience
string

Optional filter on audience.

client_id
string

Optional filter on client_id.

allow_any_organization
enum<boolean>

Optional filter on allow_any_organization.

利用可能なオプション:
true
subject_type
enum<string>

The type of application access the client grant allows.

利用可能なオプション:
client,
user
default_for
enum<string>
GA

Applies this client grant as the default for all clients in the specified group. The only accepted value is third_party_clients, which applies the grant to all third-party clients. Per-client grants for the same audience take precedence. Mutually exclusive with client_id.

利用可能なオプション:
third_party_clients

レスポンス

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.

利用可能なオプション:
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.

default_for
enum<string>
GA

Applies this client grant as the default for all clients in the specified group. The only accepted value is third_party_clients, which applies the grant to all third-party clients. Per-client grants for the same audience take precedence. Mutually exclusive with client_id.

利用可能なオプション:
third_party_clients
is_system
boolean

If enabled, this grant is a special grant created by Auth0. It cannot be modified or deleted directly.

subject_type
enum<string>

The type of application access the client grant allows.

利用可能なオプション:
client,
user
authorization_details_types
string[]

Types of authorization_details allowed for this client grant.

Required string length: 1 - 255
allow_all_scopes
boolean

If enabled, all scopes configured on the resource server are allowed for this grant.