🚧 Using a Service Principal & Token instead of your Personal Access Token You may prefer to create a Service Principal to use for authentication instead of using a Personal Access Token. To do so, use the following steps to create a Service Principal and generate an access token.
- In your Databricks workspace, click your username in the top right, click Admin Settings, Identity and access, and next to the Service Principals options, click Manage.
- Click the Add service principal button, click Add new in the modal, enter a display name and click Add.
- Click on the newly created Service Principal, and under Entitlements select Databricks SQL Access and Workspace Access. Click Update, and make a note of the Application ID of your newly created Service Principal.
- Back in the Admin Settings menu, click the Advanced section (under the Workspace admin menu). In the Access Control section, next to the Personal Access Tokens row, click Permission Settings. Search for and select the Service Principal you created, select the Can use permission, click Add, and then Save.
- Navigate back to the SQL Warehouses section of your Workspace, click the SQL Warehouses tab, and select the SQL Warehouse you created in Step 1. Click Permissions in the top right, search for and select the Service Principal you created, select the Can use permission, and click Add.
- Use your terminal to generate a Service Principal Access Token using your Personal Access Token generated above. Record the token value. This token can now be used as the access token for the connection.
cURL request
USE CATALOG
, and click Grant.main.default
, or create a new target schema). Within the schema Permissions tab, click Grant. In the following modal, select the principal for which you generated the access token, and select either ALL PRIVILEGES
or the following 9 privileges and then click Grant:USE SCHEMA
APPLY TAG
MODIFY
READ VOLUME
SELECT
WRITE VOLUME
CREATE MATERIALIZED VIEW
CREATE TABLE
CREATE VOLUME