DATABRICKS_TOKEN or DATABRICKS_CLIENT_SECRET stored anywhere.
Follow the OIDC prerequisites, then go to the OIDC page for your environment and copy the issuer URL and subject.
Configure Databricks
Create a service principal (or reuse one), grant it access to the warehouse and data your task uses, and add a federation policy with the Databricks CLI. Replace the numeric service principal ID, your organization slug, account ID, and the subject:Query Databricks in your task
/trigger/query-databricks.ts
client_id is the service principal’s UUID (its application ID), not the numeric ID used in the CLI command.
The Databricks access token expires when the OIDC token it was exchanged for does, which is five
minutes for Trigger.dev tokens, and there’s no refresh token. For longer work, request a new OIDC
token and exchange it again.
Remove the old credential
Once runs in every deployed environment authenticate this way, deleteDATABRICKS_TOKEN and DATABRICKS_CLIENT_SECRET from those environments on the Environment Variables page, then revoke the token or OAuth secret in Databricks.
Local Development runs can’t mint OIDC tokens. Use your own Databricks login there when ctx.environment.type === "DEVELOPMENT".
