Before you begin:
- Make sure that you copy the generated external ID in Data 360.
-
In your Databricks workspace, click your user icon on the top right and then click Settings.
-
In the Settings sidebar, under Workspace admin, click Identity and access.
-
Against Service principals, click Manage, and then click Add service principal. If you have an Azure managed Databricks instance, make sure that Databricks manages the service principal.
-
In the Add service principal page, click Add new.
-
Enter a name for the service principal and click Add. You can see a service principal with the name you gave and an alphanumeric Application ID. Use this Application ID as Client ID in the Data 360 connections window.
-
Create a federation policy and attach it to the service principal that you created. You can create a policy by using the Databricks Command-Line Interface (CLI) or the Databricks user interface (UI).
Using the Databricks CLI
Sample JSON
``` databricks account service-principal-federation-policy create <serviceID> --json '{ "oidc_policy": { "issuer": "https://yourcompany.my.salesforce.com/services/connectors", "audiences": [ "https://yourcompany.my.salesforce.com" ], "subject": "app:DE809C8E:B0D1EE34" } } ```-
In the sample JSON file, for the issuer field, enter your org’s My Domain URL (from Salesforce org) followed by /services/connectors. For example,
https://yourcompany.my.salesforce.com/services/connectors. -
For the audiences field, enter your org’s My Domain URL. For example,
https://yourcompany.my.salesforce.com.See, My Domain. -
For the subject field, enter the external ID copied from the Data 360 new connection dialog box.
-
For the service ID field, enter the service ID of the service principal. To get the service ID, run
databricks account service-principals listIf you haven't installed the Databricks CLI, see install or Update the Databricks CLI.
Using the Databricks UI
- From the left pane, select User management and then click the Service principals tab.
- In the Filter service principals field, search for and open the service principal you created earlier.
- In the service pricipal details page, select the Credentials & secrets tab.
- Click Create policy and then select Custom.
- For the Issuer field, enter your org’s My Domain URL followed by /services/connectors. For example,
_https://yourcompany.my.salesforce.com/services/connectors_. - In the Create federation policy window, for the Audiences field, enter your org’s My Domain URL. For example,
https://yourcompany.my.salesforce.com. - For the Subject field, enter the external ID copied from the New connection dialog box in Data 360.
- Click Create policy.
-
-
Grant permissions for the service principal to access the warehouse.
-
In the left navigation panel of the Databricks instance, select SQL Warehouse.
-
On the SQL warehouses tab, select any of the available warehouses that you can access.
-
Click Permissions.
-
In the Type to add multiple users or groups text box, enter the service principal details.
-
In the service principal window, add ‘Can use’ permissions.
-
-
Grant permissions for the service principal to access catalog.
-
In the left navigation panel of the Databricks instance, select Catalog.
-
Select the catalog from the catalog explorer.
-
In the Permissions tab, click Grant.
-
In the Type to add multiple users or groups textbox, enter the service principal details.
-
Provide appropriate privileges for this service principal. Make sure you have SELECT privileges.
-
-
In the Data Cloud connection setup, in the Client Id field, paste the application ID of the service principal that you created.