cancel
Showing results for 
Search instead for 
Did you mean: 
Get Started Discussions
Start your journey with Databricks by joining discussions on getting started guides, tutorials, and introductory topics. Connect with beginners and experts alike to kickstart your Databricks experience.
cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to generate account level PAT for service principle

NarenderKumar
New Contributor III

I am trying to generate PAT for a service principle.
I am following the documentation as shown below:
https://docs.databricks.com/en/dev-tools/auth/oauth-m2m.html#create-token-in-account

NarenderKumar_0-1715695724302.png

I have prepared the below curl command:

NarenderKumar_1-1715695859890.png

I am getting below error:

NarenderKumar_2-1715695895738.png

Please help me to create the curl command that can generate the PAT

1 ACCEPTED SOLUTION

Accepted Solutions

NarenderKumar
New Contributor III

I was able to generate the workspace level token using the databricks cli.

I set the following details in the databricks cli profile(.databrickscfg) file:

 

host  = https://myworksapce.azuredatabricks.net/ 

account_id = (my db account id)

client_id     = (my sp client id)

client_secret = (generated from databricks worksapce)

 

After setting these, I ran the following command and generated the token:

databricks tokens create --lifetime-seconds 157680000

View solution in original post

2 REPLIES 2

Hi @Retired_mod  Thank you for the details.

1. The command that you have shared takes token in the header, but the command that I am trying to use is to generate the token for a service principle

2. The command shared by you is not taking a client id and client secret. so how can we generate it for a service principle

3. we can generated tokens at the account level and workspace level. The command shared by you is at workspace level not at the account level.

Please help me if you know how to generate PAT for a service principle at the account level.

NarenderKumar
New Contributor III

I was able to generate the workspace level token using the databricks cli.

I set the following details in the databricks cli profile(.databrickscfg) file:

 

host  = https://myworksapce.azuredatabricks.net/ 

account_id = (my db account id)

client_id     = (my sp client id)

client_secret = (generated from databricks worksapce)

 

After setting these, I ran the following command and generated the token:

databricks tokens create --lifetime-seconds 157680000

Join Us as a Local Community Builder!

Passionate about hosting events and connecting people? Help us grow a vibrant local community—sign up today to get started!

Sign Up Now