Client Grants define the scopes that a machine-to-machine (M2M) application can request when calling an API. Use this API to manage which APIs your M2M applications can access and what permissions they have.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/auth0/go-auth0/llms.txt
Use this file to discover all available pages before exploring further.
List Client Grants
Retrieves a list of client grants with their associated scopes.Context for the request
Query parameters:
Audience- Filter by API audienceClientID- Filter by client IDAllowAnyOrganization- Filter by organization usageTake- Number of results to retrieve (default: 50)From- Cursor for pagination
Optional request options
Example
Get Client Grant
Retrieves a single client grant by ID.Context for the request
The ID of the client grant to retrieve
Optional request options
Returns the client grant with properties:
ID- Grant identifierClientID- Client IDAudience- API audience (identifier)Scope- Array of allowed scopesOrganizationUsage- How organizations may be usedAllowAnyOrganization- Whether any organization can be used
Example
Create Client Grant
Creates a new client grant for machine-to-machine authentication.Context for the request
The grant configuration:
ClientID- Client ID (required)Audience- API audience/identifier (required)Scope- Array of scopes to grant (required)OrganizationUsage- Organization usage policyAllowAnyOrganization- Allow any organization
Optional request options
Example
Update Client Grant
Updates an existing client grant’s scopes or organization settings.Context for the request
ID of the client grant to update
The fields to update:
Scope- Array of scopesOrganizationUsage- Organization usage policyAllowAnyOrganization- Allow any organization
Optional request options
Example
Delete Client Grant
Deletes a client grant, removing the M2M application’s access to the API.Context for the request
ID of the client grant to delete
Optional request options
Example
Organization Usage
Client grants can be configured to work with organizations:deny- Deny all organization usage (default)allow- Allow specific organizationsrequire- Require an organization
Example with Organizations
Complete Example
Best Practices
- Principle of Least Privilege - Only grant the minimum scopes required
- Regular Audits - Periodically review and audit client grants
- Scope Management - Define clear, granular scopes for your APIs
- Organization Filtering - Use organization filtering when appropriate
- Monitor Usage - Track which grants are being used and by whom
Related Resources
- Clients - Manage M2M applications
- Resource Servers - Define APIs and scopes
- Organizations - Manage organizations
- Client Credentials Flow