> For the complete documentation index, see [llms.txt](https://docs.dinmo.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.dinmo.io/integrations/data-sources/microsoft-fabric.md). Agents can also search and read this documentation through its [MCP server](https://docs.dinmo.io/~gitbook/mcp).

# Microsoft Fabric

Connect Microsoft Fabric Warehouse to DinMo with a dedicated service principal and technical schemas.

Connect your Microsoft Fabric Warehouse to DinMo using a dedicated Microsoft Entra service principal: an application identity that DinMo uses to authenticate.

DinMo needs permission to:

* Read the business tables and views used by your models.
* Read SQL object definitions and dependency metadata.
* Create and manage technical objects in five dedicated DinMo schemas.

This guide explains how to configure these permissions for your permanent connection.

**Supported resource:** a Microsoft Fabric **Warehouse**. A Lakehouse SQL analytics endpoint cannot host the writable technical objects DinMo requires.

## Before you begin

You will need:

* A Microsoft Fabric workspace containing a Warehouse.
* An Entra administrator who can create an application and client secret.
* A Fabric administrator who can configure tenant settings and access.
* A Warehouse administrator who can create schemas and grant SQL permissions.
* Access to add a source in DinMo.

The same person may perform several of these roles.

If your organization restricts outbound connections, allow [DinMo’s IP addresses](https://docs.dinmo.io/security-and-privacy/networking.md).

DinMo currently supports authentication using a client secret. Certificate and Managed Identity authentication are not supported.

## Configure Microsoft Fabric

### Step 1 — Create a dedicated application identity

**Who performs this step:** your Entra administrator.

1. Open the [Microsoft Entra admin center](https://entra.microsoft.com/).
2. Go to **Identity → Applications → App registrations**.
3. Select **New registration**.
4. Enter a recognizable name, such as `DinMo Fabric Integration`.
5. Select **Accounts in this organizational directory only**, then register the application.
6. Copy the **Application (client) ID** and **Directory (tenant) ID**.
7. Open **Certificates & secrets** and create a client secret.
8. Copy the secret’s **Value**, not its identifier. The value is displayed only once.

Keep these credentials securely. Record the secret’s expiration date so you can rotate it before it expires.

### Step 2 — Enable service principal access in Fabric

**Who performs this step:** your Fabric tenant administrator.

1. Open [Microsoft Fabric](https://app.fabric.microsoft.com/).
2. Go to **Admin portal → Tenant settings → Developer settings**.
3. Enable **Service principals can use Fabric APIs**.
4. If access is limited to specific security groups, include the DinMo service principal in an authorized group.

This setting allows service principal use in Fabric. It does not grant access to your Warehouse or business data.

### Step 3 — Choose how DinMo will access the Warehouse

**Who performs this step:** your Fabric administrator.

There are two separate permission layers:

| Layer           | Purpose                                                                            | Where you configure it                    |
| --------------- | ---------------------------------------------------------------------------------- | ----------------------------------------- |
| Fabric access   | Allows the DinMo identity to access the Warehouse and connect to its SQL endpoint. | Fabric workspace or Warehouse permissions |
| SQL permissions | Defines which data DinMo can read and which objects it can create or manage.       | SQL commands inside the target Warehouse  |

Choose **one** of the following setups.

#### Option A — Standard setup

Use this option if your organization accepts broad access within the workspace.

1. Open the workspace containing the Warehouse.
2. Open **Manage access**.
3. Add the DinMo service principal with the **Contributor** role.
4. Continue to Step 4.
5. Skip Step 5: Contributor already provides the SQL permissions covered by that step.

Contributor grants read and write permissions across the Warehouses in the workspace. Existing Member or Admin access also provides sufficient permissions, but is broader than DinMo requires.

For this setup, Contributor remains part of the permanent connection configuration.

#### Option B — Restricted setup

Use this option if you want to choose which business tables or schemas DinMo can read and limit its write permissions to its technical schemas.

1. Open the target Warehouse’s permissions in Fabric.
2. Grant the DinMo service principal item-level **Read**, where this is supported for service principals in your environment.
3. Do not add **Read all data using SQL / ReadData** if you want to control business-data access through individual SQL grants.
4. Ask a Warehouse administrator to complete Steps 4 and 5.

**Read allows the connection; it does not, by itself, allow DinMo to query business tables or create technical objects. Step 5 supplies those permissions.**

If item-level Read is unavailable for your service principal, workspace **Viewer** can provide connection access. However, Viewer also grants read access to tables and views across all Warehouses in the workspace. The SQL grants in Step 5 do not reduce that inherited access.

If that scope is unacceptable, use a dedicated workspace containing only data the DinMo identity is allowed to read, or resolve item-level access with your Fabric administrator.

**For the permanent restricted connection, the intended configuration is Fabric access from this step plus the SQL permissions in Step 5. You do not need an additional Contributor role.**

If Contributor was granted temporarily during setup, remove it before final testing. Also check for broader permissions inherited through groups or other roles. Reconnect after permission changes.

See Microsoft’s guidance on [workspace roles](https://learn.microsoft.com/en-us/fabric/data-warehouse/workspace-roles) and [service principal access](https://learn.microsoft.com/en-us/fabric/data-warehouse/service-principals).

### Step 4 — Create the five DinMo technical schemas

**Who performs this step:** a Warehouse administrator.

**Where:** open the target **Warehouse** in Fabric and create a new SQL query. Run these commands against the same Warehouse you will configure in DinMo.

A schema is a container for tables and views. These five schemas hold DinMo’s technical objects separately from your business tables.

```sql
CREATE SCHEMA dinmo_segments;
GO
CREATE SCHEMA dinmo_stats;
GO
CREATE SCHEMA dinmo_delta_storage;
GO
CREATE SCHEMA dinmo_predictions;
GO
CREATE SCHEMA dinmo_identity;
GO
```

If your SQL editor does not support `GO`, execute each `CREATE SCHEMA` statement separately.

If a schema already exists, keep it and skip its creation statement.

**All five schemas are required**, even if Predictions or Identity Resolution is not enabled. DinMo checks their presence when testing the connection.

### Step 5 — Grant the SQL permissions for restricted access

**Complete this step only if you chose Option B in Step 3.**

**Who performs this step:** a Warehouse administrator, using their own administrator account.

**Where:** the SQL query editor of the target Warehouse.

In every command below, replace `DinMo Fabric Integration` with the exact display name of the service principal created in Step 1. Keep the square brackets around the name.

Run **5.1 and 5.2**, then choose the appropriate business-data grants in **5.3**.

These are the permissions intended for the permanent connection. Additional permissions may be needed if you later authorize new business tables or schemas.

#### 5.1 — Allow DinMo to manage its technical objects

DinMo creates tables and views to materialize segments, calculate changes between runs, and store operational data.

Run:

```sql
GRANT CREATE TABLE TO [DinMo Fabric Integration];
GRANT CREATE VIEW TO [DinMo Fabric Integration];

GRANT CONTROL ON SCHEMA::[dinmo_segments]
TO [DinMo Fabric Integration];

GRANT CONTROL ON SCHEMA::[dinmo_stats]
TO [DinMo Fabric Integration];

GRANT CONTROL ON SCHEMA::[dinmo_delta_storage]
TO [DinMo Fabric Integration];

GRANT CONTROL ON SCHEMA::[dinmo_predictions]
TO [DinMo Fabric Integration];

GRANT CONTROL ON SCHEMA::[dinmo_identity]
TO [DinMo Fabric Integration];
```

`CREATE TABLE` and `CREATE VIEW` allow creation of these object types in the database. The schema permissions allow DinMo to create and manage them inside its technical schemas.

These grants do not grant write access to your business schemas. Broader permissions inherited elsewhere may still do so.

#### 5.2 — Allow DinMo to read SQL definitions and dependencies

Run **both** commands:

```sql
GRANT VIEW DEFINITION TO [DinMo Fabric Integration];

GRANT SELECT ON OBJECT::[sys].[sql_expression_dependencies]
TO [DinMo Fabric Integration];
```

They serve different purposes:

| Permission                                    | What it allows                                                                                                      |
| --------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- |
| `VIEW DEFINITION`                             | Inspect SQL object definitions, including the SQL used to define views. It does not mean “read the rows of a view”. |
| `SELECT` on `sys.sql_expression_dependencies` | Read a system catalog that records dependencies between SQL objects—for example, which table a view references.     |

`sys.sql_expression_dependencies` already exists in the Warehouse. You do not need to create it.

DinMo’s Fabric adapter uses this dependency information when managing views during activation jobs. Microsoft requires both database-level `VIEW DEFINITION` and `SELECT` on this system catalog. Granting `VIEW DEFINITION` only on an individual schema is insufficient.

**Scope:** these permissions expose definitions and dependency metadata across the target Warehouse. They do not, by themselves, allow DinMo to read rows from business tables or modify those tables.

If your organization also needs to isolate metadata visibility, discuss using a dedicated Warehouse with your data team.

See Microsoft’s [dependency catalog permissions](https://learn.microsoft.com/en-us/sql/relational-databases/system-catalog-views/sys-sql-expression-dependencies-transact-sql#permissions).

#### 5.3 — Choose the business data DinMo can read

Choose either schema-level access or access to individual objects.

**Choice A — Read an entire schema**

Replace `your_business_schema` with the actual schema name:

```sql
GRANT SELECT ON SCHEMA::[your_business_schema]
TO [DinMo Fabric Integration];
```

This allows reading all existing and future tables and views in that schema. Repeat for each authorized business schema.

**Choice B — Read only selected tables or views**

For example:

```sql
GRANT SELECT ON OBJECT::[your_business_schema].[customers]
TO [DinMo Fabric Integration];

GRANT SELECT ON OBJECT::[your_business_schema].[orders]
TO [DinMo Fabric Integration];
```

Replace `your_business_schema` with the actual schema name, and `customers` and `orders` with your actual table or view names. Repeat for every object DinMo needs.

If you choose individual objects, do not also grant access to their entire schema. Remember that these grants add permissions; they do not remove broader access inherited from Fabric roles, groups, or other grants.

#### Do you need to create a SQL user?

No separate `CREATE USER` command is required.

Fabric Warehouse creates the database principal automatically when a `GRANT` or `DENY` succeeds. Do not run `CREATE USER ... FROM EXTERNAL PROVIDER`, which Fabric Warehouse does not support.

See Microsoft’s [granular SQL permissions guide](https://learn.microsoft.com/en-us/fabric/data-warehouse/sql-granular-permissions).

## Connect and validate DinMo

### Collect the connection details

Open the Warehouse and copy its **SQL connection string**.

| DinMo field     | What to enter                                                                          |
| --------------- | -------------------------------------------------------------------------------------- |
| Server hostname | Warehouse SQL endpoint hostname only, without `https://`, a port, or a trailing slash. |
| Port            | `1433`, unless the SQL connection string specifies another port.                       |
| Database        | Exact Warehouse name.                                                                  |
| Tenant ID       | Directory (tenant) ID copied in Step 1.                                                |
| Client ID       | Application (client) ID copied in Step 1.                                              |
| Client secret   | Secret **Value**, not its identifier.                                                  |

### Create the source

1. In DinMo, open **Workspace Settings → Sources**.
2. Select **Add New Source → Microsoft Fabric**.
3. Enter a source name and the connection details.
4. Select **Save & Test**.

DinMo checks connectivity, authentication, database and metadata access, and all five technical schemas.

It also tests technical operations in each schema by creating temporary tables and views, writing and reading test data, altering and renaming a table, and removing the temporary objects.

### Validate the permanent permissions

For restricted access, perform these checks after removing any temporary Contributor access and reconnecting:

1. Run **Save & Test**.
2. Create or preview a model using an authorized business table or view.
3. Run a representative activation.

A successful connection test or model preview alone does not validate every operation used during activations.

If you need to diagnose metadata access directly, connect to the Warehouse using **the same service principal credentials as DinMo**, then run:

```sql
SELECT permission_name
FROM sys.fn_my_permissions(NULL, 'DATABASE')
WHERE permission_name = 'VIEW DEFINITION';

SELECT TOP (1)
    referencing_id,
    referenced_schema_name,
    referenced_entity_name
FROM sys.sql_expression_dependencies;
```

The first query should return `VIEW DEFINITION`.

The second should execute without a permission error. An empty result is valid if the Warehouse has no recorded dependencies.

Running these queries as an administrator checks the administrator’s permissions, not DinMo’s.

## Maintain the connection

### Rotate the client secret

Before the current secret expires:

1. Create a new secret in Microsoft Entra.
2. Update the Fabric source in DinMo with its new **Value**.
3. Run **Save & Test**.
4. Remove the old secret after validation succeeds.

Changing the secret in Entra does not automatically update DinMo.

### Monitor Fabric capacity

DinMo queries consume Fabric capacity. Usage depends on data volume, query complexity, job frequency, and concurrency.

For your first production rollout, run representative model, segment, calculated-field, and activation jobs. Record their duration and row counts, then review Warehouse background operations in the **Fabric Capacity Metrics** app.

Service principal activity appears under its application client ID. Account for Fabric’s 24-hour smoothing when assessing usage and increasing concurrency.

See Microsoft’s guidance on [Warehouse compute usage](https://learn.microsoft.com/en-us/fabric/data-warehouse/compute-capacity-smoothing-throttling) and [capacity throttling](https://learn.microsoft.com/en-us/fabric/enterprise/throttling).

## Troubleshooting

| Problem                                                              | What to do                                                                                                                                                                                                                                                |
| -------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| DinMo cannot connect                                                 | Check hostname, port, exact Warehouse name, tenant ID, client ID, and current secret value. Verify Steps 2 and 3. SQL grants alone do not provide Fabric connection access.                                                                               |
| A technical schema is missing                                        | Create it in the Warehouse configured in DinMo. All five schemas are required.                                                                                                                                                                            |
| The technical write test fails                                       | Confirm you are connecting to a Warehouse. For restricted access, check `CREATE TABLE`, `CREATE VIEW`, and `CONTROL` on all five technical schemas in Step 5.1.                                                                                           |
| A business table or view cannot be read                              | Check its `SELECT` grant in Step 5.3. Authorize each required object, or its containing schema.                                                                                                                                                           |
| An activation reports denied access to `sql_expression_dependencies` | Have an administrator run both commands in Step 5.2 in the target Warehouse. Reconnect after permissions propagate, run the metadata checks with the DinMo identity, and retry.                                                                           |
| The service principal is absent from `sys.database_principals`       | This can occur with inherited workspace access. For restricted access, a successful explicit `GRANT` creates the database principal.                                                                                                                      |
| A test succeeds with Contributor but fails after its removal         | Contributor was providing permissions missing from the restricted setup. Check Fabric access in Step 3 and all three parts of Step 5.                                                                                                                     |
| The client secret has expired                                        | Create a new secret, update the DinMo source, and run **Save & Test**.                                                                                                                                                                                    |
| `COPY INTO` or `OPENROWSET` fails                                    | Ask your Fabric administrator to check external storage access and Microsoft’s [service principal initialization requirements](https://learn.microsoft.com/en-us/fabric/data-warehouse/service-principals#token-renewal-and-initialization-requirements). |

Permission changes may take time to propagate. Reconnect before testing the updated configuration.

If the issue persists, send the original Fabric SQL error to your DinMo account manager.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.dinmo.io/integrations/data-sources/microsoft-fabric.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
