Azure AD (Entra ID) OAuth authentication¶
The Unity Catalog connector defaults to token authentication. For Azure Databricks workspaces, you can use Azure AD OAuth with a Microsoft Entra ID application (service principal) and the OAuth 2.0 client credentials flow. For official Azure Databricks guidance on OAuth machine-to-machine (service principal) authentication, see Authenticate service principals with OAuth (Microsoft Learn).
The oauth and azure_oauth mechanisms both use CONNECTOR_DATABRICKS_UNITY_CATALOG_OAUTH_CLIENT_ID and CONNECTOR_DATABRICKS_UNITY_CATALOG_OAUTH_CLIENT_SECRET for the OAuth client ID and secret. For oauth, those values come from the Databricks OAuth integration (workspace OIDC client). For azure_oauth, use Entra ID application credentials in the same two variables and also set CONNECTOR_DATABRICKS_UNITY_CATALOG_AZURE_OAUTH_TENANT_ID. For Databricks-only OAuth setup, see OAuth Authentication.
| Mechanism (typical) | Identity source | Privacera Manager variables (client + tenant) |
|---|---|---|
oauth | Databricks OAuth / OIDC | CONNECTOR_DATABRICKS_UNITY_CATALOG_OAUTH_CLIENT_ID, CONNECTOR_DATABRICKS_UNITY_CATALOG_OAUTH_CLIENT_SECRET |
azure_oauth | Microsoft Entra ID (Azure AD) | Same OAUTH_CLIENT_* variables as oauth, plus CONNECTOR_DATABRICKS_UNITY_CATALOG_AZURE_OAUTH_TENANT_ID |
Use azure_oauth when the identity is registered in Azure AD. Use oauth when credentials come from the Databricks OAuth integration. Do not point oauth at Entra credentials, or azure_oauth at Databricks OAuth client credentials, without aligning jdbc.auth.mechanism with the credential source.
Mechanism string casing
Sample Privacera Manager YAML uses azure_oauth. The connector treats azure_oauth and AZURE_OAUTH (and similar casing) as the same value.
Prerequisites¶
Step 1: Create or locate a service principal in Azure¶
- Sign in to the Microsoft Azure portal.
- Navigate to Microsoft Entra ID (formerly Azure Active Directory).
- Select App registrations.
- Click New registration (or select an existing app).
- Provide:
- Name:
databricks-oauth-sp(or your preferred name). - Supported account types: Single tenant (recommended).
- Name:
- Click Register.
Step 2: Copy the Azure OAuth credentials¶
After registration, open the Overview tab and copy:
| Field | Use as |
|---|---|
| Application (client) ID | OAuth2ClientId |
| Directory (tenant) ID | AzureTenantId |
Step 3: Create a client secret¶
- In the registered application, go to Certificates & secrets.
- Click New client secret.
- Add a description and choose an expiration period.
- Click Add.
- Copy the Value immediately.
| Field | Use as |
|---|---|
| Client secret value | OAuth2Secret |
Client secret visibility
This value is shown only once—store it securely.
Step 4: Add the service principal to Azure Databricks¶
- Open your Azure Databricks workspace.
- Navigate to Settings → Identity and access → Service principals.
- Click Add service principal.
- Enter the Client ID.
- Grant appropriate permissions, for example:
- Access to SQL warehouses
- Unity Catalog privileges
- Workspace access
Step 5: Grant required Unity Catalog permissions¶
After configuring the Azure service principal in Databricks, grant the Unity Catalog privileges the connector needs to access metadata and enforce policies. These permissions allow the service principal to read catalogs, schemas, and tables required by the connector.
Run the following SQL statements in a Databricks SQL workspace or using an account with sufficient privileges.
Grant catalog-level access¶
| SQL | |
|---|---|
Replace placeholders
- Replace
<catalog_name>with your Unity Catalog object names. - Replace
<client_id>with the Entra application (client) ID of the service principal (the same value you use asCONNECTOR_DATABRICKS_UNITY_CATALOG_OAUTH_CLIENT_ID).
Setup¶
Replace <server-hostname>, <http-path>, <AZURE_CLIENT_ID>, <AZURE_CLIENT_SECRET_VALUE>, and <AZURE_TENANT_ID> with real values.
To enable Azure AD OAuth, update the connector variables in Privacera Manager.
-
SSH to the instance where Privacera Manager is installed.
-
Open the connector vars file (replace
instance1if you use another instance name):Bash -
Set Azure AD OAuth as follows:
Treat
CONNECTOR_DATABRICKS_UNITY_CATALOG_OAUTH_CLIENT_SECRETlike other sensitive connector secrets: use your secrets manager or include it in your deployment’s encrypted connector properties list (for exampleCONNECTOR_ENCRYPT_PROPS_LISTor the mechanism your environment uses forCONNECTOR_*secrets). -
After the properties are configured, update the Privacera Manager platform:
Step 1 - Setup which generates the helm charts. This step usually takes few minutes.
Step 2 - Apply the Privacera Manager helm charts. Step 3 - (Optional) Post-installation step which generates Plugin tar ball, updates Route 53 DNS and so on. This step is not required if you are updating only connector properties.
-
In the PrivaceraCloud portal, navigate to Settings → Applications.
-
On the Connected Applications screen, select Databricks Unity Catalog.
-
Click the pen icon or the Account Name to modify the settings.
-
On the Edit Application screen, go to Access Management.
-
Under the BASIC tab
-
Update the value for JDBC Authentication Mechanism as
azure_oauth. -
Update the value for Databricks JDBC url with the following format:
-
Make sure the value for Databricks personal access token is empty.
-
Add the values for OAuth Client ID and OAuth Client Secret (Entra Application (client) ID and client secret value for Azure AD).
-
-
For Directory (tenant) ID, open the ADVANCE tab.
- Under Add New Custom Properties, add the following property, for example:
Text Only Replace
<AZURE_TENANT_ID>with your Entra Directory (tenant) ID (UUID). Replace0with your connector index when you use multiple connectors. -
Click SAVE to apply the changes.
Troubleshooting¶
- 401 / invalid_client — Wrong client ID, secret, or tenant; confirm the Entra app and secret expiry.
- Insufficient privileges — The application lacks required Databricks or Azure permissions for PolicySync.
- Wrong mode —
oauthvsazure_oauthmismatch with the credential source, or missingCONNECTOR_DATABRICKS_UNITY_CATALOG_AZURE_OAUTH_TENANT_IDforazure_oauth.
- Prev topic: OAuth Authentication