How applications running OUTSIDE Databricks authenticate to call Databricks APIs. Bring your own Identity Provider - no Databricks secrets required.
OAuth Token FederationYour application runs outside Databricks - maybe a web app, CI/CD pipeline, or automation tool.
It needs to call Databricks APIs: query data, invoke models, access Genie, etc.
Traditional approach: Create a PAT or OAuth secret, embed it in your app, manage rotation...
Bring Your Own IdP - use tokens from your existing identity provider to access Databricks APIs.
Databricks supports two types of token federation:
Account-wide Federation: All users in your Databricks account can authenticate using tokens from your corporate IdP.
Workload Identity Federation: Automated workloads (CI/CD, external apps) authenticate as a service principal using tokens from the runtime environment.
For users authenticating from external applications.
Configure a federation policy at the account level that specifies:
aud claimFor automated workloads - CI/CD pipelines, external services.
Create a federation policy on a service principal that specifies:
Any OIDC-compliant identity provider works:
If it can issue JWTs with iss, aud, and sub claims, it can federate with Databricks.
Step 1: Your app authenticates with your IdP and receives a JWT.
Step 2: Exchange the JWT at Databricks token endpoint:
POST /oidc/v1/token with:
grant_type=urn:ietf:params:oauth:grant-type:token-exchangesubject_token=<your-jwt>subject_token_type=urn:ietf:params:oauth:token-type:jwtStep 3: Databricks validates your JWT against the federation policy and returns a Databricks OAuth token.
Step 4: Use the Databricks token to call APIs:
Authorization: Bearer <databricks-oauth-token>
Configure a service principal federation policy:
https://token.actions.githubusercontent.comhttps://github.com/my-orgrepo:my-org/my-repo:environment:prod
In your workflow, GitHub automatically provides a JWT via ACTIONS_ID_TOKEN_REQUEST_TOKEN.
For Azure Databricks, you can use Entra tokens directly - no exchange needed.
Request tokens with scope:
2ff814a6-3304-4ab8-85cb-cd0e6f879c1d/user_impersonation (U2M)2ff814a6-3304-4ab8-85cb-cd0e6f879c1d/.default (M2M)Account-wide: Account Console β Settings β Authentication β Federation Policies
Workload Identity: Account Console β User Management β Service Principals β Federation Policies
Or use the CLI:
databricks account federation-policy create
databricks account service-principal-federation-policy create
No secrets to manage β your IdP handles identity, Databricks validates it.
Account-wide for users, Workload Identity for automation.
Token exchange β IdP JWT β Databricks OAuth token (RFC 8693).
Azure special case β Native Entra tokens work directly (no exchange).
Server-side only β tokens must be handled on your backend, never in the browser.
For: Users authenticating from external apps
For: Automated workloads, CI/CD
Steps:
Special case: No exchange needed