Skip to main content
Power BI The Power BI app provides read/write access to the Microsoft Power BI REST API (v1.0) through its official endpoints. It can be consumed two ways: as a remote MCP server that Agent Factory agents call as tools, or as a Builder app whose instructions you call directly from DSUL. The MCP surface groups every operation into eleven entity tools (workspaces, datasets, query, refresh, reports, dashboards, dataflows, gateways, imports, capacities, admin), each driven by an action argument, and runs in the tenant app-instance context (it resolves the installing workspace’s own credentials and authorizes the calling agent against a per-workspace allowlist). Authentication is per-user OAuth2 authorization-code with PKCE against Microsoft Entra ID: each end user signs in with their own Microsoft account, so every call runs with that user’s Power BI permissions.

DAX & semantic models

Run DAX queries against datasets, inspect schema, parameters and datasources, trigger and schedule refreshes

Reports & dashboards

List, clone, rebind, export (PDF/PPTX/PNG) reports and dashboards, manage tiles and generate embed tokens

Workspaces & admin

Manage workspaces (groups) and their users, gateways, dataflows, imports and capacities, plus tenant admin APIs

Who is this for?

This connector is used by three different roles. Jump to the section that matches yours — each one is self-contained.

Agent builder

You build agents in Agent Factory and want them to query and manage Power BI. → Agent builder tab.

Platform admin

You run the platform and register the shared Microsoft Entra ID OAuth application. → Platform admin setup accordion below.

Workspace builder

You write Builder automations (DSUL) that call Power BI operations directly. → Workspace builder tab.

Prerequisites

  • A Microsoft Power BI account (Power BI Pro / Premium Per User, or access to a Premium / Fabric capacity for paginated exports and the admin APIs).
  • A Microsoft Entra ID (formerly Azure AD) tenant where you can register an OAuth application — done in the Microsoft Entra admin center under App registrations.
  • The application must request delegated Power BI service permissions; the connector requests this default scope set:
https://analysis.windows.net/powerbi/api/.default
offline_access
openid
profile
  • For tenant-wide admin operations (admin tool), the connected user must be a Fabric / Power BI administrator, and the Power BI tenant settings must allow service-principal / API access where applicable.
  • To run DAX queries, the “Dataset Execute Queries REST API” must be enabled in the Power BI tenant settings.
Goal: two one-time tasks — (1) register the shared Microsoft Entra ID OAuth application and enter its credentials through the connector’s configuration app so every workspace lets its users sign in with their own Microsoft account, and (2) expose Power BI as a reusable capability in AI Governance so agent builders can pick it without pasting endpoint URLs.

1. Configure the connector

1

Register the OAuth application in Microsoft Entra ID

In the Microsoft Entra admin center, open Identity > Applications > App registrations > New registration. Choose a Web platform and set the single redirect URI to the connector’s OAuth callback:
<api-url>/workspaces/slug:powerbi/webhooks/oauthCallback
(e.g. https://api.studio.prisme.ai/v2/workspaces/slug:powerbi/webhooks/oauthCallback on production). Under API permissions, add the Power BI Service delegated permissions matching the scopes in Prerequisites, then create a client secret. Save the Application (client) ID, the client secret and the directory (tenant) ID.
2

Enter the credentials through the configuration app

Open the central powerbi workspace and launch its Configuration app<studio>/apps/powerbi (e.g. https://studio.prisme.ai/apps/powerbi), also linked as Configuration app on the installed instance. Follow the in-app instructions to paste the client ID, client secret and tenant — the app stores them in the workspace’s secrets for you. Do not edit Studio’s raw Secrets by hand.
3

Tell workspaces to connect

Each consuming workspace opens the same configuration app, then its users click Connexion to sign in with their own Microsoft account (PKCE authorization-code flow). Tokens are stored per user and refreshed automatically.

2. Declare the capability in AI Governance

Generic connectors — broad tool surfaces meant to be shared across many agents, like Power BI — are best exposed as a named capability in AI Governance. Agent builders then enable that capability on their agents instead of pasting a raw MCP endpoint.
1

Open AI Governance > Capabilities

Create (or edit) the Power BI capability.
2

Point it at the MCP endpoint

Set the capability’s MCP server URL to the connector’s MCP Endpoint, and set its Scope to:
context_id,agent_id,user_id
The agent_id in the scope is what lets the connector identify and authorize the calling agent.
3

Make it available to agent builders

Once created, the capability appears in the capability picker for agent builders in your organization, who enable it on their agents. Access to the catalog follows your organization’s existing roles; there is no per-capability role grant.
4

Smoke-test

From an agent that has the capability, trigger any tool. The user is prompted to connect once (Microsoft sign-in); subsequent calls reuse the stored token transparently and refresh it automatically.
Declaring the capability makes the connector available; it does not by itself authorize a specific agent. This connector follows the tenant-context model — which agents may actually call it is gated per-workspace by the authorized-agents allowlist in the configuration app (see the Workspace builder tab). There is also no OAuth auth-config JSON to attach in Governance: connect / status / disconnect are handled by the connector’s own webhooks, wired automatically.

Agent builder

Goal: let an agent you build in Agent Factory query and manage Power BI through MCP tools.
Before an agent can call the connector, a Workspace builder must have installed and configured the Power BI app in a workspace (see the Workspace builder tab), and a Platform admin must have registered the Microsoft Entra ID OAuth application (see the Platform admin setup accordion above).
This connector runs in the tenant app-instance context: your agent is authorized two ways at once — it is identified by the agent_id that Agent Factory injects through the capability Scope, and that agent must appear in the connector’s authorized-agents allowlist (managed in the configuration app). The Power BI access token itself is resolved server-side from the connected user’s OAuth session.There are two ways to wire it up. Pick based on how much isolation you need.

Option A — Enable the shared capability from the catalog

The fastest path: a Platform admin (or a workspace owner via the config app’s one-click Add to catalog button) has already published a Power BI capability to your organization’s catalog, so you just pick it.
1

Open your agent in Agent Factory

Open the agent you want to extend and go to its capabilities / tools.
2

Add the Power BI capability

Browse the capability catalog, select Power BI, and enable it. The MCP endpoint URL and the Scope (context_id,agent_id,user_id) are already wired — nothing to paste, and the shared instance accepts every agent granted the capability, so there is no allowlist step on your side.
3

Connect a Microsoft account

On the first tool call, an unconnected user is prompted to sign in — Agent Factory surfaces a connect_url. Subsequent calls reuse the stored token.
Convenient, but your agent runs against a shared, platform-managed instance: its Entra ID OAuth client is owned by someone else and the instance accepts every agent that is granted the capability. Prefer Option B for anything beyond quick experiments.
For production agents, install the connector in your own workspace and point the agent at that workspace’s MCP endpoint.
Prefer this mode for security. Because the MCP runs in your app-instance context, the OAuth client, the per-user Power BI tokens and the authorized-agents allowlist are all scoped to your workspace — not shared platform-wide. You decide exactly which agents may call it and which Microsoft accounts back them, and a misconfiguration elsewhere can never expose your data. The shared catalog capability (Option A) is a broad surface many agents can reach; your own workspace is an isolated, least-privilege boundary.
1

Install and configure the connector in your workspace

Follow the Workspace builder tab: install Power BI in your workspace, open its Configuration app, and connect a Microsoft account.
2

Allowlist your agent

In that workspace’s config app, open Authorized agents and tick your agent (the Install capability button does this for you), or enable Allow all agents.
3

Add the MCP capability to your agent

In your agent, add a capability pointing at your workspace’s MCP Endpoint URL, and set its Scope to:
context_id,agent_id,user_id
The agent_id is what lets the connector identify and authorize your agent — without it, every call is rejected with an explicit “agent could not be identified” message. This Scope is separate from the Microsoft OAuth scopes.
4

Connect a Microsoft account

On the first tool call, the user is prompted to sign in (or uses Connexion in the config app).

Brief the agent in its system prompt

Whichever option you pick, wiring the capability is not enough — the agent must know the MCP exists and when to use it. Copy-pasteable starter:
You have access to the Power BI MCP server (tools: workspaces, datasets, query, refresh, reports, dashboards, dataflows, gateways, imports, capacities, admin). Each tool takes an `action` argument plus per-action parameters. Use the `query` tool (action executeQuery) to answer data questions with DAX against a dataset; use `datasets` getSchema first to discover tables and columns. Power BI's `groupId` is the workspace id and is optional (empty = "My workspace"). Prefer calling a tool over guessing, and confirm with the user before any destructive action (delete a dataset/report, cancel a refresh).
Legacy AI Knowledge agents (no native MCP picker): add the connector under Advanced > Tools > MCP and paste the MCP Endpoint URL. The agent still has to be allowlisted in the config app and its identity propagated so the connector can read its agent_id.

Available Tools

Each tool takes an action argument selecting the concrete operation, plus the per-action parameters. groupId (the workspace id) is optional on most data tools — empty means “My workspace”.
ToolDescription
workspacesPower BI workspaces (groups): list, create, delete and manage workspace users. Actions: list, create, delete, listUsers, addUser, updateUser, deleteUser.
datasetsDatasets (semantic models): list, get, delete, inspect/update datasources & parameters, get schema, take over, bind to a gateway. Actions: list, get, delete, getTables, getDatasources, updateDatasources, getParameters, updateParameters, takeOver, bindToGateway, getSchema.
queryRun a DAX query against a dataset and return result rows. Action: executeQuery.
refreshDataset refreshes: trigger, read history, get/update schedule, cancel an in-progress refresh. Actions: trigger, history, getSchedule, updateSchedule, cancel.
reportsReports: list, get, delete, clone, rebind, get pages, export (PDF/PPTX/PNG), poll/download an export, update content, generate an embed token. Actions: list, get, delete, clone, rebind, getPages, getPage, export, getExportStatus, getExportFile, updateContent, generateToken.
dashboardsDashboards & tiles: list, get, create dashboards; list/get/clone tiles; generate an embed token. Actions: list, get, create, getTiles, getTile, cloneTile, generateToken.
dataflowsDataflows: list, get (model.json), delete, refresh, list transactions and datasources. Actions: list, get, delete, refresh, getTransactions, getDatasources.
gatewaysOn-premises data gateways: list, get, list/create/delete datasources, get a datasource status. Actions: list, get, getDatasources, createDatasource, deleteDatasource, getDatasourceStatus.
importsImports: list imports, get an import, create a temporary upload location (to publish a PBIX). Actions: list, get, createUploadLocation.
capacitiesPremium / Fabric capacities: list capacities, get workloads, get refreshables. Actions: list, getWorkloads, getRefreshables.
adminTenant ADMIN APIs (require the connected user to be a Fabric/Power BI admin): list all workspaces/datasets/reports/dashboards/dataflows, get workspace users, query the activity log, list capacities, get modified workspaces, run the metadata scanner. Actions: listGroups, getGroupUsers, listDatasets, listReports, listDashboards, listDataflows, getActivityEvents, listCapacities, getModifiedWorkspaces, scanWorkspaces, getScanStatus, getScanResult.

Output Formats

Every tool accepts an outputFormat argument that controls the MCP response shape:
  • verbose (default) — human-readable text optimized for LLM consumption
  • structured — machine-readable JSON in structuredContent
  • both — verbose text plus the structured payload

Tool Details

query

{
  "name": "query",
  "arguments": {
    "action": "executeQuery",
    "groupId": "f089354e-8366-4e18-aae3-a5f3c3b0c4d8",
    "datasetId": "cfafbeb1-8037-4d0c-896e-a46fb27ff229",
    "daxQuery": "EVALUATE TOPN(10, 'Sales', 'Sales'[Amount], DESC)"
  }
}
ParameterRequiredDescription
actionYesexecuteQuery.
datasetIdYesTarget dataset (semantic model) id.
daxQueryYes (or queries)A single DAX query string. Use queries for the raw multi-query body.
groupIdNoWorkspace id; omit for “My workspace”.
impersonatedUserNameNoUPN to impersonate for row-level security (admin / service principal).

datasets

{
  "name": "datasets",
  "arguments": {
    "action": "getSchema",
    "groupId": "f089354e-8366-4e18-aae3-a5f3c3b0c4d8",
    "datasetId": "cfafbeb1-8037-4d0c-896e-a46fb27ff229"
  }
}
ParameterRequiredDescription
actionYesOne of list, get, delete, getTables, getDatasources, updateDatasources, getParameters, updateParameters, takeOver, bindToGateway, getSchema.
datasetIdFor all but listTarget dataset id.
groupIdNoWorkspace id; omit for “My workspace”.
gatewayObjectIdFor bindToGatewayGateway to bind the dataset to.
updateDetailsFor updateDatasources/updateParametersThe update payload (datasource mappings or parameter values).
getTables works only for Push-API datasets. On a normal import / DirectQuery semantic model use getSchema (column schema via DAX), or the query tool with EVALUATE INFO.VIEW.TABLES() / EVALUATE INFO.VIEW.COLUMNS().

refresh

{
  "name": "refresh",
  "arguments": {
    "action": "trigger",
    "groupId": "f089354e-8366-4e18-aae3-a5f3c3b0c4d8",
    "datasetId": "cfafbeb1-8037-4d0c-896e-a46fb27ff229",
    "notifyOption": "MailOnFailure"
  }
}
ParameterRequiredDescription
actionYesOne of trigger, history, getSchedule, updateSchedule, cancel.
datasetIdYesTarget dataset id.
groupIdNoWorkspace id; omit for “My workspace”.
refreshIdFor cancelId of the in-progress refresh to cancel.
notifyOptionNoCompletion notification: MailOnFailure, MailOnCompletion, NoNotification.

reports

{
  "name": "reports",
  "arguments": {
    "action": "export",
    "groupId": "f089354e-8366-4e18-aae3-a5f3c3b0c4d8",
    "reportId": "5b218778-e7a5-4d73-8187-f10824047715",
    "format": "PDF"
  }
}
ParameterRequiredDescription
actionYesOne of list, get, delete, clone, rebind, getPages, getPage, export, getExportStatus, getExportFile, updateContent, generateToken.
reportIdFor all but listTarget report id.
groupIdNoWorkspace id; omit for “My workspace”.
formatFor exportPDF, PPTX or PNG (export is async — poll getExportStatus, then getExportFile).
targetWorkspaceId / targetModelIdFor clone / rebindDestination workspace / dataset to clone into or rebind to.

dashboards

{
  "name": "dashboards",
  "arguments": {
    "action": "generateToken",
    "groupId": "f089354e-8366-4e18-aae3-a5f3c3b0c4d8",
    "dashboardId": "69ffaa6c-b36d-4d01-96f5-1ed67c64d4af",
    "accessLevel": "View"
  }
}
ParameterRequiredDescription
actionYesOne of list, get, create, getTiles, getTile, cloneTile, generateToken.
dashboardIdFor all but list/createTarget dashboard id.
groupIdNoWorkspace id; omit for “My workspace”.
tileIdFor getTile/cloneTileTarget tile id.
accessLevelFor generateTokenEmbed token access level, e.g. View.

admin

{
  "name": "admin",
  "arguments": {
    "action": "getActivityEvents",
    "startDateTime": "2026-06-01T00:00:00Z",
    "endDateTime": "2026-06-01T23:59:59Z"
  }
}
ParameterRequiredDescription
actionYesOne of listGroups, getGroupUsers, listDatasets, listReports, listDashboards, listDataflows, getActivityEvents, listCapacities, getModifiedWorkspaces, scanWorkspaces, getScanStatus, getScanResult.
groupIdFor getGroupUsers and per-workspace listingsWorkspace id.
startDateTime / endDateTimeFor getActivityEventsISO 8601 window (same UTC day, per the Power BI admin API).
workspacesFor scanWorkspacesArray of workspace ids to scan.
scanIdFor getScanStatus/getScanResultId returned by scanWorkspaces.
All admin actions require the connected user to be a Fabric / Power BI administrator; otherwise the provider returns 401 / 403.

Error Handling

HTTP codeMeaning
400Bad request — invalid parameters, malformed body or DAX syntax error.
401Unauthorized — the Power BI access token is missing, expired or revoked. The user must reconnect.
403Forbidden — insufficient OAuth scope, the account lacks access to the resource, or an admin action by a non-admin user.
404Not found — the workspace, dataset, report, dashboard or other id does not exist or is not visible to the account.
409Conflict — e.g. a refresh is already in progress, or a name collision when creating a resource.
429Rate limit / capacity throttling — back off and retry.
500 / 503Power BI service error — transient; retry shortly, no reconnection needed.

Common Issues

“This agent is not authorized to use this connector” — The calling agent is not in the allowlist. Open the configuration app → Authorized agents → tick this agent (or enable Allow all agents) and Save. “The calling agent could not be identified” — The MCP capability Scope does not declare agent_id, so Agent Factory never injects the agent identity. Set the Scope to context_id,agent_id,user_id on the capability, then allow the agent in the config app. “Power BI is not connected for this user” — No per-user OAuth token. Open the configuration app and click Connexion, or use the agent’s connect flow. “Power BI token refresh failed … must reconnect” — The stored refresh token was revoked or expired (Microsoft Entra ID invalidated it). The connection is dropped automatically; the user must reconnect from the config app. “Power BI OAuth is not configured” — The Microsoft Entra ID client ID/secret/tenant is missing. Open the configuration app and enter the OAuth credentials (or ask the platform admin to register the central application). getTables fails with “not Push API dataset”getTables only works on Push-API datasets. To inspect a normal import / DirectQuery semantic model, use the datasets getSchema action, or run a DAX query such as EVALUATE INFO.VIEW.TABLES() / EVALUATE INFO.VIEW.COLUMNS() via the query tool.

External Resources

Power BI REST API

Official reference for the Microsoft Power BI REST API (v1.0).

Tool Agents

Learn how Agent Factory agents consume MCP tools in Prisme.ai.