> For the complete documentation index, see [llms.txt](https://integrations.drivetrain.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://integrations.drivetrain.ai/integration-guide/readme/bi/integrating-with-power-bi.md). Agents can also search and read this documentation through its [MCP server](https://integrations.drivetrain.ai/~gitbook/mcp).

# Integrating with Power BI

Import Power BI semantic model data into Drivetrain through a read-only service principal. Covers the Entra ID app, tenant and XMLA settings, workspace access and submitting credentials.

Drivetrain imports data from a Power BI semantic model into Drivetrain. It signs in as a Microsoft Entra ID app (a service principal), connects to your workspace's XMLA endpoint and runs read-only DAX queries against the model. Nothing is written back to Power BI, and Drivetrain doesn't send its own data to Power BI.

Power BI is a premium integration: you prepare access and submit the details in Drivetrain, and Drivetrain's team builds the queries for your model and completes the setup.

## Before you start

* **In Drivetrain:** an admin submits the connection.
* **Licensing:** the workspace must be on a Premium or Fabric capacity. Pro workspaces have no XMLA endpoint, and on Premium Per User (PPU) workspaces Microsoft requires the connecting identity to hold a PPU licence, which an app can't. Personal workspaces (**My workspace**) aren't supported.
* **Microsoft Entra ID:** permission to register an app and create a client secret.
* **Power BI:** a Power BI (Fabric) administrator to change tenant settings, and an admin of the workspace to grant access.
* **Semantic model:** models that use a live connection to Analysis Services or to a model in another workspace, push datasets and Excel workbook models can't be read through the XMLA endpoint.

## Step 1: Register an app in Microsoft Entra ID

1. Sign in to the [Azure portal](https://portal.azure.com) and go to **Microsoft Entra ID → App registrations → New registration**.

![](https://4220329029-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmBZR0D9lq6jrI895OuOU%2Fuploads%2Fgit-blob-d0e0174dde58fea47d177e89e6a844c953bd6409%2Fpowerbi_drivetrain_step_01.png?alt=media)

2. Enter a name, for example "Drivetrain BI Integration".

![](https://4220329029-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmBZR0D9lq6jrI895OuOU%2Fuploads%2Fgit-blob-41de45ba85abb254f00b42e3c2bbff32d8e039dd%2Fpowerbi_drivetrain_step_02.png?alt=media)

3. Under **Supported account types**, keep **Accounts in this organizational directory only** (single tenant). Drivetrain signs in to your own tenant, so multitenant isn't needed.
4. Click **Register**. On the app's **Overview** page, copy the **Application (client) ID** and **Directory (tenant) ID**.

Don't add any **API permissions** to the app. Microsoft recommends adding none for a service principal: Power BI access comes from the tenant settings and workspace role below, and unused permissions can cause errors.

## Step 2: Create a client secret

1. In the app, go to **Certificates & secrets → New client secret**.

![](https://4220329029-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmBZR0D9lq6jrI895OuOU%2Fuploads%2Fgit-blob-17c182430dc7836b18edda6f04be07e8de13792c%2Fpowerbi_drivetrain_step_06.png?alt=media)

2. Enter a description and choose an expiry, then click **Add**.

![](https://4220329029-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmBZR0D9lq6jrI895OuOU%2Fuploads%2Fgit-blob-e440ff6a92f661fcf785786c021cfb3176693b3f%2Fpowerbi_drivetrain_step_07.png?alt=media)

3. Copy the secret's **Value** (not the **Secret ID**). It's shown only once.

Note the expiry date: when the secret expires, syncs stop until you create a new one and send it to Drivetrain.

## Step 3: Enable Power BI settings

You must be a Power BI or Fabric administrator. In Power BI, go to **Settings (⚙) → Admin portal → Tenant settings** and search for each setting by name.

![](https://4220329029-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmBZR0D9lq6jrI895OuOU%2Fuploads%2Fgit-blob-0cb4b852207e32a3fcb690fe9b6acd8110408ec0%2Fpowerbi_drivetrain_step_08.png?alt=media)

* **Developer settings → Service principals can call Fabric public APIs** (formerly **Allow service principals to use Power BI APIs**): enable it for the whole organization or for a security group that contains the app.

![](https://4220329029-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmBZR0D9lq6jrI895OuOU%2Fuploads%2Fgit-blob-8a20d92d6147ba431e6f8a0aab4568c79977a4a1%2Fpowerbi_drivetrain_step_10.png?alt=media)

* **Integration settings → Allow XMLA endpoints and Analyze in Excel with on-premises semantic models**: make sure it's enabled (it is by default).

Then check that the capacity's XMLA endpoint allows reads: in the capacity's settings, **Workloads → XMLA Endpoint** must be **Read Only** (the default) or **Read Write**.

The integration doesn't use the **Dataset Execute Queries REST API**, **Service principals can access read-only admin APIs** or the **Enhance admin APIs responses** settings, so you don't need to enable them for Drivetrain.

**Tip:** If you scope a setting to a security group, add the app to that group.

## Step 4: Give the app access to the workspace

1. Open the Power BI workspace that holds the semantic model.
2. Click **Manage access → Add people or groups**.
3. Search for the app by name (for example, "Drivetrain BI Integration") and select it.

![](https://4220329029-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmBZR0D9lq6jrI895OuOU%2Fuploads%2Fgit-blob-9c866b681d6cc842c15aeef1f994e618fb57e57f%2Fpowerbi_drivetrain_step_13.png?alt=media)

4. Set the role to **Contributor** (or higher) and click **Add**. If the app still can't read the model, use **Member**, the role Microsoft documents for service principals.

![](https://4220329029-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmBZR0D9lq6jrI895OuOU%2Fuploads%2Fgit-blob-ab6ff082b0863fa5ef5149aacd098b97acd3eb40%2Fpowerbi_drivetrain_step_14.png?alt=media)

## Step 5: Find the workspace connection

In the workspace, open **Settings → Premium** and, under **Workspace connection**, click **Copy**. It looks like `powerbi://api.powerbi.com/v1.0/myorg/Finance%20Workspace`. Also note the exact name of the semantic model.

## Step 6: Submit the details in Drivetrain

1. Go to **Data**, click **+** and select **PowerBI** (the tile is spelled without a space).
2. In **PowerBI is a premium integration**, click **Request access**.
3. Click **Add field** once for each value and enter a field name and the value: Client ID, Tenant ID, Client secret, Workspace connection and Semantic model name. Add a note on the tables or measures you need.
4. Click **Submit credentials**. Values are stored encrypted.

The connection shows **Credentials submitted** until Drivetrain's team finishes the setup and activates it.

## What data comes in

Each table Drivetrain imports is the result of a DAX query on your semantic model, built with you for the tables, columns and measures you need. Changes to the model (renamed tables, columns or measures) can break those queries: tell your customer success manager before you change them.

## Changing or removing access

* **New client secret:** create it in Entra ID (Step 2) and send it to your customer success manager before the old one expires, through a secure channel such as a password manager, never email or chat.
* **Stop access:** delete the client secret or remove the app from the workspace in Power BI, then ask your customer success manager to remove the connection in Drivetrain.

## Troubleshooting

* **Syncs stop after working for months:** the client secret probably expired. Create a new one and send it to Drivetrain.
* **The app can't see the semantic model:** check the app has the **Contributor** role or higher on the workspace that holds the model, the workspace is on a Premium or Fabric capacity, and the tenant settings in Step 3 include the app (or its security group).
* **Questions during setup:** contact your customer success 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://integrations.drivetrain.ai/integration-guide/readme/bi/integrating-with-power-bi.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.
