cancel
Showing results for 
Search instead for 
Did you mean: 
Administration & Architecture
Explore discussions on Databricks administration, deployment strategies, and architectural best practices. Connect with administrators and architects to optimize your Databricks environment for performance, scalability, and security.
cancel
Showing results for 
Search instead for 
Did you mean: 

Secret Creation for Service Principal using API

AnkurMittal008
New Contributor III

There is API available to create a secret for Service Principal.

/api/2.0/accounts/{account_id}/servicePrincipals/{service_principal_id}/credentials/secrets

Can anyone please help what has to be passed as authentication for this API ? 
This is looking a Account level API so i think we will not be able to pass Personal access token of a User which is normally created from workspace. 
1 REPLY 1

Stefan-Koch
Valued Contributor II

hi @AnkurMittal008 

In general, I do not recommend using tokens anymore. Instead, if you want to log in via databricks cli, you can use this command:

databricks auth login --host https://accounts.azuredatabricks.net/ --account-id <YOUR_ACCOUNT_ID>

This will open a web browser, and you can authenticate. (This is an example with Azure Databricks)

If you want to run an application, use M2M-Authentication. Have a look at the documentation here: https://docs.databricks.com/aws/en/dev-tools/auth/ 

Hope, that helps.