Skip to content

Synapse Set Up a Synapse Service Principal

Service Principal authentication uses a Microsoft Entra ID application instead of a SQL login. Setup has two parts: registering the application in Microsoft Entra ID and granting it access to your Synapse database.

Based on the Microsoft documentation

These steps follow the official Microsoft guides Register an app in Microsoft Entra ID, Add and manage app credentials and Microsoft Entra ID for Azure Synapse Analytics. Microsoft can change its interface and documentation at any time without notice. If a screen or label looks different from what this page describes, follow the official guides.

Steps

Register an application in Microsoft Entra ID

Step 1: Sign in to the Microsoft Entra admin center with at least the Application Developer role. If you have access to more than one tenant, switch to the tenant of your Synapse workspace.

Step 2: Browse to Entra ID > App registrations and select New registration.

Step 3: Give the application a name (e.g., qualytics-synapse), choose Single tenant only under Supported account types, and select Register.

Step 4: On the application's Overview page, copy the Application (client) ID and the Directory (tenant) ID. You will enter these as Client ID and Tenant ID in the Qualytics connection form.

Step 5: Select Certificates & secrets > Client secrets > New client secret, add a description, choose an expiration, and select Add. Microsoft limits client secrets to 24 months and recommends less than 12.

Step 6: Copy the secret Value right away (it is only shown once). You will enter this as Client Secret in the Qualytics connection form.

Warning

Copy the client secret Value, not the Secret ID. Client secrets expire; when a secret expires, create a new one and update the connection in Qualytics.

Grant the application access to your database

The application needs a database user with the same permissions as a regular read-only user. Only the Microsoft Entra administrator of the Synapse workspace can create the first Microsoft Entra user in a database; after that, any user with the ALTER ANY USER permission can.

Step 7: Connect to the target database with a Microsoft Entra identity, then run the statements below, replacing <app_display_name> and <schema_name> with your actual values.

-- Switch to the target database, then create a user for the application
CREATE USER [<app_display_name>] FROM EXTERNAL PROVIDER;

-- Grant connection and read-only access
GRANT CONNECT TO [<app_display_name>];
GRANT SELECT ON SCHEMA::<schema_name> TO [<app_display_name>];
GRANT VIEW DEFINITION ON SCHEMA::<schema_name> TO [<app_display_name>];

Note

For enrichment usage, grant the application the same additional permissions listed under Additional Permissions for an Enrichment Datastore.

Step 8: In Qualytics, choose Service Principal as the Type when you add the source datastore, and fill in its Client ID, Client Secret and Tenant ID.