Databricks
Trustle reads users, service principals, groups, account admins, and, through a SQL warehouse, Unity Catalog grants and usage from Databricks. Trustle can create, deactivate, and delete users, change group members and the account admin role, and grant and revoke Unity Catalog privileges.
Prerequisites
Section titled “Prerequisites”- A Databricks account with the Account admin role. Only an account admin can create an account-level service principal and assign its roles.
- An identity provider connected in Trustle, for example Okta or Microsoft Entra ID. Trustle hides SaaS Applications until one is connected.
- For Unity Catalog grants and usage data: a workspace attached to a Unity Catalog metastore, and a SQL warehouse in that workspace.
- For audit events, table lineage, and query history: the Premium plan or higher, with the
accessandquerysystem schemas enabled on the metastore.
Configure Databricks
Section titled “Configure Databricks”Step 1: Create a service principal
Section titled “Step 1: Create a service principal”-
In Databricks, open the Workspace menu and click Manage account. The account console opens.

-
Go to User management.

-
Select the Service principals tab. Click Add service principal.

-
Enter a name, for example
Trustle. Click Add.
Step 2: Generate an OAuth secret
Section titled “Step 2: Generate an OAuth secret”-
Open the service principal. Go to Credentials & secrets → OAuth secrets.
-
Click Generate secret.
-
Enter a Lifetime (days), from 1 to 730. Click Generate.

-
Copy the Secret and the Client ID. Databricks shows the secret once.
Step 3: Grant permissions
Section titled “Step 3: Grant permissions”The service principal needs these roles and grants:
| Permission | Required | What Trustle does with it |
|---|---|---|
| Account admin role | Yes | Imports users, service principals, groups, and account admins. Creates, deactivates, and deletes users. Changes group members and the account admin role. Test Connection checks it. |
| Metastore admin (Step 4) | Optional | Reads every Unity Catalog grant, and grants and revokes Unity Catalog privileges. Without it, Trustle sees only the grants of the service principal itself. |
| Workspace access and Can use on a SQL warehouse (Step 5) | Optional | Runs the Unity Catalog queries. Without it, Trustle skips Unity Catalog grants, audit events, lineage, last-used dates, and workspace admins. |
SELECT on system.access (Step 5) |
Optional | Reads audit events and table lineage, which give the last-used date of each grant. Without it, every grant shows as unused. |
SELECT on system.query (Step 5) |
Optional | Reads query history for usage data. Without it, Trustle has less usage data. |
Assign the account admin role:
-
Open the service principal. Select the Roles tab.
-
Turn on Account admin.

Step 4: Make the service principal a metastore admin
Section titled “Step 4: Make the service principal a metastore admin”A metastore has one admin. Make a group the admin, so the service principal and your own admins share the role.
-
In the account console, go to User management → Groups. Create a group, for example
metastore-admins. If such a group exists, use it.
-
Add the Trustle service principal to the group.
-
Go to Catalog. Open the metastore that your workspaces use.

-
Set Metastore admin to the group.

One Trustle connection covers one metastore. A metastore covers one cloud region. For workspaces in another region, create one more Trustle connection, and do this step for that metastore too.
Step 5: Give access to a SQL warehouse
Section titled “Step 5: Give access to a SQL warehouse”Skip this step if you do not want Unity Catalog grants or usage data. Trustle then imports only users, service principals, groups, and account admins.
-
In the account console, go to Workspaces. Open a workspace that is attached to the metastore from Step 4.
-
Select the Permissions tab. Click Add permissions. Add the service principal with the User permission.
-
In that workspace, go to Compute → SQL warehouses. Open the warehouse. A serverless warehouse is best: it starts for each query and stops when idle.
-
Click Permissions. Give the service principal Can use.
-
In the SQL editor, give the service principal access to the system tables. In SQL, Databricks names a service principal by its application ID, which is the Client ID from Step 2:
GRANT USE CATALOG ON CATALOG system TO `<client-id>`;GRANT USE SCHEMA, SELECT ON SCHEMA system.access TO `<client-id>`;GRANT USE SCHEMA, SELECT ON SCHEMA system.query TO `<client-id>`;
Step 6: Collect the values for Trustle
Section titled “Step 6: Collect the values for Trustle”- Account ID: in the account console, open the user menu in the top-right corner. Click Copy account ID. You can also copy it from the account console URL.
- SQL Warehouse ID: open the warehouse from Step 5. The ID is on the Overview tab, and in the URL after
/sql/warehouses/.
| Trustle field | Where to find it in Databricks | Example |
|---|---|---|
| Account Host | The account console address for your cloud. AWS: https://accounts.cloud.databricks.com. GCP: https://accounts.gcp.databricks.com. Azure: https://accounts.azuredatabricks.net. |
https://accounts.cloud.databricks.com |
| Account ID | User menu → Copy account ID | 00000000-0000-0000-0000-000000000000 |
| Client ID | Service principal → OAuth secrets (Step 2) | <client-id> |
| Client Secret | The Secret from Step 2 | <client-secret> |
| Workspace URL (Optional) | The address of the workspace from Step 5 | https://dbc-xxxxxxxx-xxxx.cloud.databricks.com |
| SQL Warehouse ID (Optional) | Warehouse → Overview | <warehouse-id> |
Enter Workspace URL and SQL Warehouse ID together, or leave both empty.
Connect in Trustle
Section titled “Connect in Trustle”- In Trustle, go to Connections.
- Under SaaS Applications, find Databricks and click Connect.
- Enter a Connection Name, for example
Databricks production. Description is optional. - Enter the values from Step 6.
- Click Test Connection.
- After the test passes, click Save Connection.
Verify
Section titled “Verify”- On the Connections page, open the Databricks connection.
- Wait for the first sync to finish.
- Check that the user count and the group count match User management in the account console.
- If you did Step 5, check that the connection shows Unity Catalog grants.
If something is missing, see Troubleshooting.
Security notes
Section titled “Security notes”Troubleshooting
Section titled “Troubleshooting”Test Connection fails
Section titled “Test Connection fails”Read the error message:
- “Invalid credentials: authentication failed”: the Client ID or Client Secret is wrong, or the secret expired. Also check that Account Host matches your cloud and that Account ID is correct.
- “Insufficient permissions: the service principal must be a Databricks account admin”: do Step 3.
- “Invalid credentials format”: Account Host must be one of the three addresses in Step 6. Workspace URL must start with
https://. Enter Workspace URL and SQL Warehouse ID together, or leave both empty. - “Failed to reach the Databricks workspace”: check the Workspace URL. Copy it from the browser address bar while the workspace is open.
- “Could not authenticate against the workspace URL”: add the service principal to the workspace. See Step 5.
- “SQL warehouse … was not found in the workspace”: check the SQL Warehouse ID. The warehouse must be in the workspace from Workspace URL.
- “The service principal cannot access the SQL warehouse”: give it Can use on the warehouse.
The sync shows few or no Unity Catalog grants
Section titled “The sync shows few or no Unity Catalog grants”- Metastore admin: without it, Trustle sees only the grants of the service principal itself. Do Step 4.
- Wrong metastore: the workspace in Workspace URL must use the metastore you expect. One connection covers one metastore.
- No warehouse: without Workspace URL and SQL Warehouse ID, Trustle skips Unity Catalog. Do Step 5.
Trustle shows the data after the next sync.
Every Unity Catalog grant shows as unused
Section titled “Every Unity Catalog grant shows as unused”Trustle cannot read usage. Check each item:
- The account is on the Premium plan or higher.
- The
accessandquerysystem schemas are enabled on the metastore. - The service principal has the
SELECTgrants from Step 5.
Trustle shows the data after the next sync.
Workspaces in another region are missing
Section titled “Workspaces in another region are missing”One connection covers one metastore, and a metastore covers one region. Create one more Trustle connection with a workspace and a warehouse in that region. Make the service principal a metastore admin there too.
None of these fixes work
Section titled “None of these fixes work”Email support@trustle.com. Include the error message, the connection name, and the Account ID and the service principal’s Client ID. Never send a secret, key, or token.