メインコンテンツへスキップ
POST
https://{tenantDomain}/api/v2
/
organizations
/
{id}
/
client-grants
Go
package example

import (
    client "github.com/auth0/go-auth0/management/client"
    option "github.com/auth0/go-auth0/management/option"
    context "context"
    organizations "github.com/auth0/go-auth0/management/organizations"
)

func do() () {
    client := client.NewClient(
        option.WithToken(
            "<token>",
        ),
    )
    client.Organizations.ClientGrants.Create(
        context.TODO(),
        "id",
        &organizations.AssociateOrganizationClientGrantRequestContent{
            GrantId: "grant_id",
        },
    )
}
{
  "id": "<string>",
  "client_id": "<string>",
  "audience": "<string>",
  "scope": [
    "<string>"
  ],
  "organization_usage": "deny",
  "allow_any_organization": true
}

承認

Authorization
string
header
必須

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

パスパラメータ

id
string
必須

Organization identifier.

Maximum string length: 50

ボディ

grant_id
string<client-grant-id>
必須

A Client Grant ID to add to the organization.

レスポンス

Client Grant successfully associated with Organization.

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.