Welcome to the Alteryx Knowledge Base
How to create and use Service Principal in Databricks?
Created/Edited -
How To
Please follow the steps outlined in this article to use a Databricks-managed service principal to connect to Databricks. For Azure Databricks, if you want to use an Entra ID (Azure) managed service principal, please refer to the following article instead:
Environment
- Alteryx Designer/Server
- Version >= 2025.1
Prerequisites
- Databricks (AWS or Azure)
- Databricks ODBC Driver (previously named as Simba Sparks ODBC Driver)
- Version >= 2.7.7
- Databricks Utility Catalog enabled
Procedure
IMPORTANT: Section A requires the administrator to perform the steps.
A Create Service Principal in Databricks
- Log in to the Databricks workspace as a Workspace Admin.
- Click the Profile and select Settings.
- Click Identity and access on the left pane.
- Click the Manage button in the Service principals section.
- Click the Add service principal button.
- In the Add service principal window, click the Add new button.
- Select the Databricks managed option.
- Enter a name for the service principal and click the Add button. Note down the name.
- In the service principal details page, click the Secrets link.
- Click the Generate secret button.
- Enter the appropriate lifetime for the secret and click the Generate button.
- Note down the client ID and secret.
- On the furthest left pane, click Catalog.
- In the Catalog page, click the catalog that you want to provision to the service principal.
- Click the Permissions link.
- Click the Grant button and add the appropriate permissions to the service principal created in step 8.
- Go to Compute and select the appropriate cluster to use in Alteryx,
- Go to Permissions as shown below.
- Add the "Can Attach To" privilege to the service principal.
B. Get the Databricks Information [FOR USER OR ADMINISTRATOR]
- Log in to Databricks.
- Go to Compute and select the appropriate cluster that will be used in Alteryx. For user who is unsure which cluster to use, please check with the Administrator, if necessary.
- Go to Configuration and scroll down to Advanced > JDBC/ODBC and take note of the server host and the HTTP Path.
C. Use Service Principal in Alteryx
- In Designer, add an Input Data tool to the workflow canvas.
- Configure the tool to use the Data Connection Manager (DCM), if optional.
- In the Data Connections window, click the Data Sources on the left pane.
- Click the Quick Connect link under the Databricks Utility Catalog section.
- Create a new connection, datasource and credentials.
- For the datasource, enter the Host and HTTP Path from step 3 of section B.
- For the authentication method in the Credentials, please select Generic OAuth2.
- Enter the following field and values for the credentials:
| Field | Value |
| Grant Type | Client Credentials |
| OAuth token URL |
https://<databricks_instance>/oidc/v1/token
*Replace "<databricks_instance" with the server hostname from step 3 of Section B. |
| Client ID | The client ID from step 12 of section A. |
| Client Secret | The secret from step 12 of section A. |
| Client Authentication | Send Client Credentials in Body |
- Enter a name for the token credential, and enter the following for the Scope.
| Field | Value |
| Scope | all-apis |
- Click the Save button.
- Click the Connect button after creation.
NOTE: The DCM user interface may be different across Designer versions. The screenshots in this article are from Designer version 2025.2.
Was this article helpful?