Skip to main content
Use this guide to create a Databricks Personal Access Token (PAT) for a service principal on Azure Databricks, and rotate it safely for use with Databricks connections.
Service Principal TypesAzure Databricks supports two types of service principals:
  • Azure Databricks managed service principals: Created and managed directly within Databricks. Can create PATs through the Databricks UI.
  • Microsoft Entra ID managed service principals: Created in Microsoft Entra ID, then imported into Databricks. Accessed via Azure API.
This guide covers creating PATs for both Microsoft Entra ID managed service principals (indicated with Steps A) and Databricks managed service principals (with Steps B).

Prerequisites

  • You have Azure admin access to create app registrations in Microsoft Entra ID.
  • You have Azure Databricks workspace admin access to manage service principals and token permissions.
  • You know your workspace URL (for example, https://adb-<workspace-id>.<region>.azuredatabricks.net).

Step 0: choose your service principal type

Step 6: use the PAT in your integration

Use this token value in your Databricks connection configuration (Personal access token).

Rotation procedure

  1. Create a new PAT for the service principal (repeat Steps 4-5).
  2. Update your integration’s Databricks configuration with the new PAT.
  3. Revoke the old PAT using the UI or API:
Revoke PAT
# Using CLI: delete by token ID
databricks tokens delete <TOKEN_ID>
(Or use the Token Management API to delete a token by ID.) (Microsoft Learn, Databricks Documentation)

Troubleshooting

403 / not authorized when creating PAT

PATs may be disabled for the workspace, or the service principal/group lacks CAN USE permission. Check Admin SettingsAccess controlPersonal access tokens. (Microsoft Learn)

Invalid scope when requesting Entra token

Use the exact scope 2ff814a6-3304-4ab8-85cb-cd0e6f879c1d/.default. (Microsoft Learn)

Account-level APIs failing with PAT

PATs are for workspace-level auth. Account-level automation requires Entra/OAuth tokens. (Microsoft Learn)