Secret Creation for Service Principal using API
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-10-2025 10:22 PM
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
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-10-2025 10:52 PM
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.

