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:
- For tenant-wide admin operations (
admintool), 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.
Platform admin (Governance) — one-time platform setup
Platform admin (Governance) — one-time platform setup
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
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:(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.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.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.Point it at the MCP endpoint
Set the capability’s MCP server URL to the connector’s MCP Endpoint, and set its Scope to:The
agent_id in the scope is what lets the connector identify and authorize the calling agent.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.
- Agent builder (Agent Factory)
- Workspace builder (DSUL)
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).
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.Open your agent in Agent Factory
Open the agent you want to extend and go to its capabilities / tools.
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.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.
Option B — Run it from your own workspace (recommended)
For production agents, install the connector in your own workspace and point the agent at that workspace’s MCP endpoint.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.
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.
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: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.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: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 anaction argument selecting the concrete operation, plus the per-action parameters. groupId (the workspace id) is optional on most data tools — empty means “My workspace”.| Tool | Description |
|---|---|
workspaces | Power BI workspaces (groups): list, create, delete and manage workspace users. Actions: list, create, delete, listUsers, addUser, updateUser, deleteUser. |
datasets | Datasets (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. |
query | Run a DAX query against a dataset and return result rows. Action: executeQuery. |
refresh | Dataset refreshes: trigger, read history, get/update schedule, cancel an in-progress refresh. Actions: trigger, history, getSchedule, updateSchedule, cancel. |
reports | Reports: 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. |
dashboards | Dashboards & tiles: list, get, create dashboards; list/get/clone tiles; generate an embed token. Actions: list, get, create, getTiles, getTile, cloneTile, generateToken. |
dataflows | Dataflows: list, get (model.json), delete, refresh, list transactions and datasources. Actions: list, get, delete, refresh, getTransactions, getDatasources. |
gateways | On-premises data gateways: list, get, list/create/delete datasources, get a datasource status. Actions: list, get, getDatasources, createDatasource, deleteDatasource, getDatasourceStatus. |
imports | Imports: list imports, get an import, create a temporary upload location (to publish a PBIX). Actions: list, get, createUploadLocation. |
capacities | Premium / Fabric capacities: list capacities, get workloads, get refreshables. Actions: list, getWorkloads, getRefreshables. |
admin | Tenant 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 anoutputFormat argument that controls the MCP response shape:verbose(default) — human-readable text optimized for LLM consumptionstructured— machine-readable JSON instructuredContentboth— verbose text plus the structured payload
Tool Details
query
| Parameter | Required | Description |
|---|---|---|
action | Yes | executeQuery. |
datasetId | Yes | Target dataset (semantic model) id. |
daxQuery | Yes (or queries) | A single DAX query string. Use queries for the raw multi-query body. |
groupId | No | Workspace id; omit for “My workspace”. |
impersonatedUserName | No | UPN to impersonate for row-level security (admin / service principal). |
datasets
| Parameter | Required | Description |
|---|---|---|
action | Yes | One of list, get, delete, getTables, getDatasources, updateDatasources, getParameters, updateParameters, takeOver, bindToGateway, getSchema. |
datasetId | For all but list | Target dataset id. |
groupId | No | Workspace id; omit for “My workspace”. |
gatewayObjectId | For bindToGateway | Gateway to bind the dataset to. |
updateDetails | For updateDatasources/updateParameters | The 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
| Parameter | Required | Description |
|---|---|---|
action | Yes | One of trigger, history, getSchedule, updateSchedule, cancel. |
datasetId | Yes | Target dataset id. |
groupId | No | Workspace id; omit for “My workspace”. |
refreshId | For cancel | Id of the in-progress refresh to cancel. |
notifyOption | No | Completion notification: MailOnFailure, MailOnCompletion, NoNotification. |
reports
| Parameter | Required | Description |
|---|---|---|
action | Yes | One of list, get, delete, clone, rebind, getPages, getPage, export, getExportStatus, getExportFile, updateContent, generateToken. |
reportId | For all but list | Target report id. |
groupId | No | Workspace id; omit for “My workspace”. |
format | For export | PDF, PPTX or PNG (export is async — poll getExportStatus, then getExportFile). |
targetWorkspaceId / targetModelId | For clone / rebind | Destination workspace / dataset to clone into or rebind to. |
dashboards
| Parameter | Required | Description |
|---|---|---|
action | Yes | One of list, get, create, getTiles, getTile, cloneTile, generateToken. |
dashboardId | For all but list/create | Target dashboard id. |
groupId | No | Workspace id; omit for “My workspace”. |
tileId | For getTile/cloneTile | Target tile id. |
accessLevel | For generateToken | Embed token access level, e.g. View. |
admin
| Parameter | Required | Description |
|---|---|---|
action | Yes | One of listGroups, getGroupUsers, listDatasets, listReports, listDashboards, listDataflows, getActivityEvents, listCapacities, getModifiedWorkspaces, scanWorkspaces, getScanStatus, getScanResult. |
groupId | For getGroupUsers and per-workspace listings | Workspace id. |
startDateTime / endDateTime | For getActivityEvents | ISO 8601 window (same UTC day, per the Power BI admin API). |
workspaces | For scanWorkspaces | Array of workspace ids to scan. |
scanId | For getScanStatus/getScanResult | Id 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 code | Meaning |
|---|---|
400 | Bad request — invalid parameters, malformed body or DAX syntax error. |
401 | Unauthorized — the Power BI access token is missing, expired or revoked. The user must reconnect. |
403 | Forbidden — insufficient OAuth scope, the account lacks access to the resource, or an admin action by a non-admin user. |
404 | Not found — the workspace, dataset, report, dashboard or other id does not exist or is not visible to the account. |
409 | Conflict — e.g. a refresh is already in progress, or a name collision when creating a resource. |
429 | Rate limit / capacity throttling — back off and retry. |
500 / 503 | Power 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 declareagent_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.