> ## Documentation Index
> Fetch the complete documentation index at: https://docs.langdock.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Configure Power BI for Langdock

> Set up Power BI for Langdock as a Power BI, Fabric, or Langdock workspace admin: enable the query API tenant setting, grant Viewer and Build, optionally enable XMLA, and connect users.

Use this guide if you're a Power BI or Fabric admin, or a Langdock workspace admin. Once you complete it, each user only needs to add their own connection.

## Before you start

Langdock queries semantic models through Power BI's Execute Queries REST API, which works on every Power BI tier, including Pro. You don't need Fabric, Premium, or Premium Per User capacity to query. The XMLA endpoint is optional. It's needed for measure formulas and for DMV, MDX, and `INFO.*` queries other than `INFO.VIEW.*`.

For the configuration, you need:

* A Power BI or Fabric administrator for the tenant settings.
* A workspace Admin or Member to grant **Build** on semantic models.
* A Langdock workspace admin to enable the integration.
* A capacity admin, only if you enable XMLA.

Complete the tenant-wide [admin consent for Microsoft integrations](https://docs.langdock.com/en/admin/manage-integrations/integration-setup-guides/microsoft.md) before users connect. For the license and role each person needs, see [Permissions and scale](https://docs.langdock.com/en/admin/manage-integrations/integration-setup-guides/microsoft-powerbi/permissions-and-scale.md#what-each-person-needs).

## Configure Microsoft

**1. Turn on the query API tenant setting**

In the Fabric admin portal, open **Tenant settings** → **Integration settings** and enable **Semantic Model Execute Queries REST API**. Microsoft's REST documentation calls it Dataset Execute Queries REST API. Without it, every Langdock query fails, on every tier. If you scope it to a security group, only members of that group can query through Langdock.

![Semantic Model Execute Queries REST API switched on and applied to the entire organization](https://mintcdn.com/langdock-34/qr9A5FOozmm7QjRI/images/powerbi-tenant-execute-queries-rest-api.png?fit=max\&auto=format\&n=qr9A5FOozmm7QjRI\&q=85\&s=a1ce282aaf98b7296c7caca4b79d77a2)

Semantic Model Execute Queries REST API, enabled for the entire organization.

**2. Grant Viewer on the workspace and Build on the model**

In the workspace, open **Manage access** and add a Microsoft Entra security group as **Viewer**.

![Manage access for the Finance Pro workspace, with Employee Test set to Viewer](https://mintcdn.com/langdock-34/qr9A5FOozmm7QjRI/images/powerbi-workspace-manage-access-viewer.png?fit=max\&auto=format\&n=qr9A5FOozmm7QjRI\&q=85\&s=a4975e545e40fa88c18d9c469c71b037)

Viewer on the workspace.

Then, on the semantic model, select **More options** → **Manage permissions** and grant the same group **Build**. Workspace Viewer doesn't include Build, and without Build users get no data.

![Semantic model Direct access list with Employee Test set to Workspace Viewer and Build](https://mintcdn.com/langdock-34/qr9A5FOozmm7QjRI/images/powerbi-semantic-model-permissions-build.png?fit=max\&auto=format\&n=qr9A5FOozmm7QjRI\&q=85\&s=1a76ba793cd12795bc47ef480d14d91c)

Build on the semantic model.

Don't grant **Write** or **Reshare**, and don't make the group **Contributor** or higher. Querying only needs read access. Write and Contributor or higher let people change the model and, if it uses row-level security, bypass it. Reshare lets them share the model further. See [Workspace roles and row-level security](https://docs.langdock.com/en/admin/manage-integrations/integration-setup-guides/microsoft-powerbi/permissions-and-scale.md#workspace-roles-and-row-level-security).

That's all Langdock needs to query semantic models. Continue with [Enable the integration in Langdock](#enable-the-integration-in-langdock), or set up XMLA first if you need XMLA-backed actions.

## Optional: enable XMLA-backed actions

Skip this section unless you need [actions that require XMLA](https://docs.langdock.com/en/admin/manage-integrations/integration-setup-guides/microsoft-powerbi/permissions-and-scale.md#what-needs-xmla). XMLA requires the workspace to be on Fabric capacity, Power BI Premium capacity, or Premium Per User.

**1. Turn on tenant XMLA**

In **Tenant settings** → **Integration settings**, enable **Allow XMLA endpoints and Analyze in Excel with on-premises semantic models**. It's on by default. If you scope it to a security group, for example your model builders, users outside that group can't use XMLA-backed actions.

![Allow XMLA endpoints and Analyze in Excel with on-premises semantic models switched on and applied to the entire organization](https://mintcdn.com/langdock-34/qr9A5FOozmm7QjRI/images/powerbi-tenant-xmla-endpoints.png?fit=max\&auto=format\&n=qr9A5FOozmm7QjRI\&q=85\&s=44aad7b037601d14dc8c91a1d663c674)

XMLA endpoints enabled for the entire organization.

**2. Set capacity XMLA to Read Only**

In **Capacity settings**, open the capacity that hosts these workspaces. Under **Power BI workloads**, set **XMLA Endpoint** to **Read Only**. For Premium Per User, the setting is under **Premium Per User** → **Semantic model workload settings**.

**3. Assign workspaces to that capacity**

In each workspace, open **Workspace settings** → **Workspace type**, select **Edit**, and assign the capacity you configured.

Microsoft documents these settings in [Semantic model connectivity with the XMLA endpoint](https://learn.microsoft.com/en-us/fabric/enterprise/powerbi/service-premium-connect-tools).

## Enable the integration in Langdock

As a Langdock workspace admin, enable Power BI for your workspace. To limit which Power BI actions people can use, see [Manage action access](https://docs.langdock.com/en/admin/manage-integrations/manage-action-access.md).

## Connect users

Ask each user to open Power BI in Langdock, select **Add connection**, and sign in with the Microsoft account that's in your Viewer and Build group. Share the [three step user guide](https://docs.langdock.com/en/admin/manage-integrations/integration-setup-guides/microsoft-powerbi.md#use-power-bi) with them. For shared agents, keep each user on their own connection. See [Shared agents and workflows](https://docs.langdock.com/en/admin/manage-integrations/integration-setup-guides/microsoft-powerbi/permissions-and-scale.md#shared-agents-and-workflows).

## Validate the setup

Test as a representative user with workspace Viewer and **Build** on the semantic model, and no Contributor or capacity role.

1. In Langdock, ask a question that needs a small query, for example total revenue by month.
2. Compare the numbers with what that user sees in a Power BI report on the same model.
3. If the model uses row-level security, confirm the user only sees their own rows.
4. Repeat with a user who shouldn't see the model. They get an error instead of data.

Permission changes can take about an hour to apply. If a check fails, see [Troubleshooting](https://docs.langdock.com/en/admin/manage-integrations/integration-setup-guides/microsoft-powerbi/troubleshooting.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.