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

import (
    context "context"

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

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

承認

Authorization
string
header
必須

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

パスパラメータ

id
string
必須

組織の識別子。

Maximum string length: 50

ボディ

grant_id
string<client-grant-id>
必須

組織に追加するクライアントグラント ID。

レスポンス

クライアントグラントが組織に正常に関連付けられました。

allow_any_organization
boolean

有効にすると、このグラントは任意の組織で使用できます。無効(デフォルト)の場合、このグラントは対象の組織に明示的に割り当てる必要があります。

audience
string

このクライアントグラントのオーディエンス(API識別子)

Minimum string length: 1
client_id
string

クライアントの ID。

id
string

クライアントグラントの ID。

organization_usage
enum<string>

このグラントで、クライアントクレデンシャル交換に組織を使用できるかどうかを定義します。

利用可能なオプション:
deny,
allow,
require
scope
string[]

このクライアントグラントで許可されるスコープ。

Minimum string length: 1