Request OAuth tokens with authorization details
Use authorization_details in a workspace OAuth token request to request access to a specific resource. Each Databricks service defines the authorization objects its token needs.
How authorization details work
Send authorization_details as a form parameter in a POST request to https://<databricks-instance>/oidc/v1/token, where <databricks-instance> is your <databricks-instance> with the Databricks workspace instance name, for example 1234567890123456.7.gcp.databricks.com. The value is a nonempty JSON array of authorization objects. Each object has a type and fields defined by the service you want to access.
For a client credentials request, Databricks checks whether the service principal has the requested permissions before issuing the token. The token response and access token include the approved authorization details. Requesting authorization details does not grant permissions to the service principal.
The OAuth machine-to-machine (M2M) client credentials grant supports this parameter. AI Search token exchange also uses it. The authorization-code and refresh-token grants ignore authorization_details supplied to the token endpoint.
Services that use authorization details
The following service guides document token requests with authorization_details:
- Zerobus Ingest Kafka-compatible APIs
- AI Search
- Route-optimized serving endpoints
- External dashboard embedding
Request a token
-
Follow your service's guide in the preceding list to grant the requesting identity access to the resource and to construct the required JSON array. Some services require other token request parameters, such as
resource. -
For an M2M request, follow Generate a workspace-level access token. Add the service's
authorization_detailsvalue to the token request:Bashexport AUTHORIZATION_DETAILS='<JSON-array-from-service-guide>'curl --request POST \--url "https://<databricks-instance>/oidc/v1/token" \--user "$CLIENT_ID:$CLIENT_SECRET" \--data 'grant_type=client_credentials' \--data 'scope=all-apis' \--data-urlencode "authorization_details=$AUTHORIZATION_DETAILS"Set
CLIENT_IDandCLIENT_SECRETas described in the M2M guide. Replace<databricks-instance>with your<databricks-instance>with the Databricks workspace instance name, for example1234567890123456.7.gcp.databricks.comand<JSON-array-from-service-guide>with the JSON array from the service guide. Include any additional parameters required by the service, such asresourcefor Zerobus Ingest.
For an AI Search token exchange from a notebook, follow Get an OAuth token from a notebook instead.