# Microsoft Fabric Set Up a Fabric Analytics Service Principal

Source: https://userguide.qualytics.io/source-datastore/datastore/jdbc/fabric-analytics/how-tos/setup/set-up-service-principal/

Qualytics signs in to Fabric Analytics as a **service principal**: an app registration in Microsoft Entra ID (Azure AD) with access to your Fabric workspace. Follow these steps to create it and collect the **Client ID**, **Tenant ID** and **Client Secret** the connection form asks for. See [Authentication](https://userguide.qualytics.io/source-datastore/datastore/jdbc/fabric-analytics/authentication/) for how the sign-in works.

Once it is set up, [get the SQL analytics endpoint](https://userguide.qualytics.io/source-datastore/datastore/jdbc/fabric-analytics/how-tos/setup/get-sql-endpoint/) of your Lakehouse or Warehouse, then [add the source datastore](https://userguide.qualytics.io/source-datastore/datastore/jdbc/fabric-analytics/how-tos/datastore/add-source/).

> **Note: Based on the Microsoft documentation**
>
> These steps follow the official Microsoft guides [Register an app in Microsoft Entra ID](https://learn.microsoft.com/en-us/entra/identity-platform/quickstart-register-app), [Add and manage app credentials](https://learn.microsoft.com/en-us/entra/identity-platform/how-to-add-credentials), [Developer admin settings](https://learn.microsoft.com/en-us/fabric/admin/service-admin-portal-developer) and [Give users access to workspaces](https://learn.microsoft.com/en-us/fabric/fundamentals/give-access-workspaces). 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.

## Prerequisites

| Requirement | Description |
| --- | --- |
| **Microsoft Entra ID (Azure AD)** | At least the **Application Developer** role in your organization's Entra ID tenant, to create app registrations. |
| **Fabric Workspace** | A Fabric workspace with a Lakehouse or Warehouse that you want to connect to, where you have the **Admin** or **Member** role. |
| **Fabric administrator** | Someone who can change the Fabric tenant settings (see [Enable Service Principal Access in Fabric](https://userguide.qualytics.io/source-datastore/datastore/jdbc/fabric-analytics/how-tos/setup/set-up-service-principal/#step-4-enable-service-principal-access-in-fabric)). |

## Steps

### Register an Application in Microsoft Entra ID

**Step 1**: Sign in to the [Microsoft Entra admin center](https://entra.microsoft.com). If you have access to more than one tenant, switch to the tenant where the Fabric workspace lives.

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

**Step 3**: Fill in the registration form:

| Field | Value |
| --- | --- |
| **Name** | A name for the application (e.g., `qualytics-fabric`). |
| **Supported account types** | **Single tenant only**, so only your own tenant can use the application. |

**Step 4**: Select **Register**. The app's **Overview** page opens.

### Retrieve the Client ID and Tenant ID

**Step 5**: On the app's **Overview** page, copy the **Application (client) ID**. This is the **Client ID**.

**Step 6**: On the same page, copy the **Directory (tenant) ID**. This is the **Tenant ID**.

### Create a Client Secret

**Step 7**: In the app registration, select **Certificates & secrets** > **Client secrets** > **New client secret**.

**Step 8**: Enter a description and choose an expiration. Microsoft limits client secrets to 24 months and recommends less than 12.

**Step 9**: Select **Add**, then copy the secret's **Value** (not the **Secret ID**). This is the **Client Secret**.

> **Warning**
>
> Copy the **Value** right away. Microsoft does not show it again once you leave the page. Note the expiration date too: the connection stops working when the secret expires, until you paste a new secret into it.

### Enable Service Principal Access in Fabric

**Step 10**: Sign in to [Microsoft Fabric](https://app.fabric.microsoft.com) as a Fabric administrator and open the tenant settings (from the **Admin portal** in **Settings**, or from the **Govern** tab of the OneLake catalog).

**Step 11**: Find **Service principals can call Fabric public APIs** and make sure it is turned on. Microsoft turns it on by default for new customers.

**Step 12**: Apply it to a security group that contains your service principal, or to the entire organization, and save.

### Grant Workspace Access to the Service Principal

**Step 13**: In Microsoft Fabric, open the target **Workspace** and select **Manage access**. If you do not see it on the command bar, look in the **More options (...)** menu.

**Step 14**: Select **Add people or groups** and enter the name of the app you registered (e.g., `qualytics-fabric`).

**Step 15**: Select the **Contributor** role (or higher) and select **Add**.

*Last updated: November 16, 2026.*
