On-behalf-of token creation for service principals is not enabled for this workspace
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-19-2024 03:49 AM
Hi All
I just wanted to create PAT for Databricks Service Principle but getting below code while hitting API or using CLI -
Please help me to create PAT for the same.
#dataengineering #databricks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-19-2024 05:25 AM
@Retired_mod I have already referred this one but still having issue
I have created Service Account in Databricks and I am not using Azure Service Principle
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-19-2024 08:04 AM
Hi @Retired_mod ,
I have given all the permissions (Admin) to Service Principle and still having the same issue.
Please find all the details below -
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-07-2024 09:59 PM
Hi @Retired_mod
Have you got any update on this ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-19-2024 02:48 AM - edited 09-19-2024 03:11 AM
This only works if you are on AWS or GCP, no support for Azure 😞
Check the API documentation AWS - https://docs.databricks.com/api/workspace/tokenmanagement/createobotoken
No such documentation exists for Azure.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-24-2025 01:43 PM
You can generate the token while logged in as the Service Principle via the Azure CLI in a Command Prompt window. To do so, make sure to install the Azure CLI and the Databricks CLI with it.
- Install the Azure CLI for Windows | Microsoft Learn
- Install or update the Databricks CLI - Azure Databricks | Microsoft Learn
I used the following commands in the Command Prompt window. Hope this helps.
First Command – Log in as the Service Principal using the secret value. The secret value is created via https://learn.microsoft.com/en-us/entra/identity-platform/howto-create-service-principal-portal#opti...
az login --service-principal -t <tenant id> -u <client id> -p <secret value> --allow-no-subscriptionsSecond Command while logged in as the Service Principal
databricks tokens create --lifetime-seconds 15780096 --comment <service principle name>