Passer au contenu principal
PATCH
https://{tenantDomain}/api/v2
/
client-grants
/
{id}
Go
package example

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

func do() () {
    client := client.NewClient(
        option.WithToken(
            "<token>",
        ),
    )
    client.ClientGrants.Update(
        context.TODO(),
        "id",
        &management.UpdateClientGrantRequestContent{},
    )
}
{
  "id": "<string>",
  "client_id": "<string>",
  "audience": "<string>",
  "scope": [
    "<string>"
  ],
  "organization_usage": "deny",
  "allow_any_organization": true,
  "is_system": true,
  "subject_type": "client",
  "authorization_details_types": [
    "<string>"
  ],
  "allow_all_scopes": true
}

Autorisations

Authorization
string
header
requis

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

Paramètres de chemin

id
string
requis

ID of the client grant to update.

Corps

scope
string[] | null

Scopes allowed for this client grant.

Required string length: 1 - 280
organization_usage
enum<string> | null

Controls how organizations may be used with this grant

Options disponibles:
deny,
allow,
require,
null
allow_any_organization
boolean | null

Controls allowing any organization to be used with this grant

authorization_details_types
string[]

Types of authorization_details allowed for this client grant.

Required string length: 1 - 255
allow_all_scopes
boolean | null

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

Réponse

Client grant successfully updated.

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.

Options disponibles:
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.

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.

Options disponibles:
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.