Authorize M2M Access
To authorize Machine-to-Machine access for an application, you must enable it to use an organization for a specific API. To do so, you must associate the application's client grant to the corresponding API with the organization. Once associated, the application can use the organization when requesting tokens for the API and scopes defined in the client grant. You will need to define this association for each API your application needs to access for the organization.
You can authorize M2M access for an application using the Auth0 Dashboard or Management API.
To associate an application’s client grant to an organization via the Auth0 Dashboard:
Navigate to Organizations and choose the organization you want to associate with.
Select the Machine-to-Machine Access tab.
Click Add Access.
Click the application you want to associate with the organization.
Select an API.
Click Save.
Application client grants can be associated with an organization via the Associate client grant to organization endpoint:
curl -X POST --location "https://{YOUR_DOMAIN}/api/v2/organizations/{ORG_id}/client-grants" \
--header 'authorization: Bearer MGMT_API_ACCESS_TOKEN' \
--header 'content-type: application/json' \
--data '{
"grant_id": "GRANT_ID"
}'
Was this helpful?