Items marked (preview) in this article are currently in public preview. This preview is provided without a service-level agreement, and we don’t recommend it for production workloads. Certain features might not be supported or might have constrained capabilities. For more information, see Supplemental Terms of Use for Microsoft Azure Previews.
Prerequisites
- Virtual network (VNet) support depends on the Fabric item type. For details, see Virtual network support.
- Fabric IQ isn’t available in regions where Power BI is the only Fabric workload. Confirm your Fabric workspace is in a region that supports the full Fabric stack. For more information, see Microsoft Fabric region availability.
- A Microsoft Fabric license that grants access to the Fabric items your agent queries. Users who invoke Fabric IQ through your agent must also have this license.
- An active Microsoft Foundry project with a deployed model.
- For a Fabric data agent:
- A published data agent on paid F2 or higher Fabric capacity, or Power BI Premium P1 or higher capacity with Microsoft Fabric enabled.
- Cross-geo processing and storage enabled when required by your Fabric data agent tenant settings.
- At least one supported data source with data. The calling user or service principal needs read access to the data agent and each data source.
- The data agent and its data sources on capacities in the same region.
- Azure RBAC roles:
- Foundry User role on the Foundry project for the developer identity, the agent’s runtime identity, and any user identity involved in OAuth flows.
- Foundry Project Manager role on the Foundry project for creating a Foundry connection to the Fabric IQ endpoint.
- Foundry Toolkit: Install Visual Studio Code and Foundry Toolkit for Visual Studio Code.
Run your first Fabric IQ query
Choose the Fabric item that matches the question your agent needs to answer. Authentication differs by item and connection path.
To get a successful response before completing the administration sections:
- Confirm the item is published and that the connection identity can read the item and its data sources.
- Copy the endpoint for your item from Find your Fabric IQ server details.
- Create the matching connection, and then add the Fabric IQ tool to your agent.
- Ask a question that uses terms defined by the selected item, such as Which customers placed orders above $10,000 last quarter?
- Confirm the response uses the expected Fabric data. If a permitted user gets a result and a user without access doesn’t, permission enforcement is working as expected.
Usage support
How it works
- Your agent dispatches a tool call — When the agent model identifies a task that requires Fabric data, it emits a tool call to the
fabric_iq_previewtool. - Fabric IQ processes the request — Fabric IQ receives the natural-language query and routes it based on the target item type:
- Ontology — The Natural Language to Ontology (NL2Ontology) layer converts the query into a structured ontology query against your enterprise entities, relationships, and data bindings.
- Fabric data agent — The query goes directly to the data agent for conversational Q&A over ontology-grounded data.
- Power BI semantic models — Fabric IQ queries the semantic model’s measures and hierarchies to return analytics results.
- The result is returned to your agent — Fabric IQ returns the synthesized response. Your agent incorporates it into its reply to the user. Fabric enforces the permissions and governance policies assigned to the connection identity.
Connect to Fabric IQ
The following steps will guide you through the steps to connect agents to Fabric IQ, including server URL patterns and authentication methods.Find your Fabric IQ server details
Fabric IQ exposes different MCP endpoint URLs depending on the type of Fabric item you’re connecting to. The value you supply asserver_url follows one of these patterns:
Replace the placeholders as follows:
{host}— The Fabric API host, typicallyapi.fabric.microsoft.com{workspaceId}— The GUID of your Microsoft Fabric workspace{itemId}/{dataAgentId}— The GUID of the specific Fabric item
api.fabric.microsoft.com with the workspace-specific host. See Connect to a data agent over a workspace-level private link.
Among the Fabric IQ item types, only the data agent MCP endpoint supports long-running operations through background mode. Ontology and Power BI semantic model endpoints run synchronously and are subject to the standard tool-call timeout. Because the data agent endpoint is an MCP server, you run it in background mode the same way as any other MCP tool - set background to true and poll the response until it completes. For code samples, see Long-running operations.
For server_label, use any short lowercase identifier with hyphens, for example fabriciq-ontology. This label appears in approval prompts when the model calls the tool.
Add the Fabric IQ tool to your agent
Annotation chunks are returned in
result.structuredContent.documents[]. Each document includes title and url fields that you can use to generate citation details in your application.Use Fabric IQ with a hosted agent
This sample creates a Fabric IQ toolbox, then uses a hosted agent to discover and invoke Fabric IQ through the toolbox MCP endpoint.Python
C#
Run a Fabric data agent in background mode
Fabric data agent queries can take longer than the standard synchronous tool-call timeout. To let these calls run to completion, enable background mode and use a model that supports it, such asgpt-5.4 or gpt-5.5. You can enable background mode in code or in the Microsoft Foundry portal playground.
To enable background mode and run a data agent in the portal:
- Open your agent, and select the Playground tab.
-
In the Model list, select a model that supports background mode, such as
gpt-5.4orgpt-5.5. - Select the parameters icon next to the model, and turn on Background mode.
- Under Tools, select Add > Browse all tools > Fabric IQ (OneLake Catalog), and then select Add tool.
- In the OneLake Catalog, select a Data agent item, and then select Add.
- Send a message. The agent starts a background run and shows its progress while the data agent completes the long-running query. When the run finishes, the response appears in the chat.
Authentication and security
Fabric IQ authentication depends on the Fabric item type. Ontology and Power BI semantic model connections use Microsoft Entra ID delegated authentication (On-Behalf-Of, OBO), so requests run in the context of the signed-in user. A published Fabric data agent MCP endpoint accepts a token for either a user or a service principal. For direct MCP clients, request the token with thehttps://api.fabric.microsoft.com/.default scope. Fabric applies the permissions and governance policies assigned to that identity. This application-only support is specific to the data agent MCP endpoint.
The authentication method available depends on the Fabric item type:
- Ontology - BYO Entra app or managed OAuth. To use BYO Entra app, register a dedicated Entra application with Power BI delegated permissions.
- Data agent — BYO Entra app or managed OAuth for the Foundry connection, or a user or service-principal bearer token for a direct MCP client.
- Power BI semantic model — BYO Entra app or managed OAuth.
Set up your Entra app for ontology (one-time, per organization)
An Entra admin must complete the following one-time tenant operation before you can create a Fabric IQ connection for an ontology item in Foundry. For steps that require the Global Administrator role, use Microsoft Entra Privileged Identity Management (PIM) to activate the role just in time, and deactivate it when setup is complete. Day-to-day Fabric IQ users don’t need this role.Create the app registration
- Go to the Microsoft Entra admin center. In the left navigation, select Entra ID > App registrations.
- Select New registration. Give the app a descriptive name and set Supported account types to Accounts in this organizational directory only. Select Register.
- Copy the Application (client) ID. You need this value when creating the Foundry connection.
- Select API permissions > Add a permission > Microsoft APIs. Find and select Power BI Service, select Delegated permissions, and add the following permissions:
Item.Execute.AllItem.Read.All

- Select Grant admin consent for {your-organization} in the Configured permissions panel. A Global Administrator must approve this one-time tenant operation. This step allows users in your organization to authenticate through the Fabric IQ connection.
- Select Certificates & secrets > New client secret. Add a description and expiration. Select Add, then immediately copy the secret Value — it’s only shown once. Store the value in Azure Key Vault or another approved secret store. Never commit, print, or log it, and rotate it before expiration.
- Copy your Directory (tenant) ID from the Microsoft Entra ID overview page.
Fill in the Foundry connection values
In Microsoft Foundry, open your project and go to Settings > Connections > New connection > Fabric IQ. Fill in the following fields:
Replace
{tenant-id} with your Directory (tenant) ID from step 7. Select Save to create the connection.
For data agent connections using BYO Entra, use the DataAgent.Execute.All delegated permission instead of the Power BI scopes listed earlier. Add https://analysis.windows.net/powerbi/api/DataAgent.Execute.All as the scope in the Foundry connection, and grant admin consent for that permission in your app registration.
Add the redirect URI to your app registration
After Foundry creates the connection, it displays an OAuth redirect URL. Add this URL to your app registration:- In the Microsoft Entra admin center, go to Entra ID > App registrations and select your app.
- Select Authentication > Add a platform > Web.
- Under Redirect URIs, paste the OAuth redirect URL from Foundry.
- Select Configure.
Virtual network support
Virtual network (VNet) support through Azure Private Link depends on the Fabric item type you connect to.
Tenant-level private links apply network restrictions across your whole tenant and don’t change the
server_url you configure. Data agent items also support workspace-level private links, which isolate a single workspace and require a workspace-specific endpoint and a dedicated Foundry connection, as described in the next section. Power BI semantic models support public access only.
Connect to a data agent over a workspace-level private link
When a workspace blocks public access through a workspace-level private link, you can’t reach its data agent at the sharedapi.fabric.microsoft.com host. Use the workspace-specific private endpoint instead, and create a Foundry connection that forwards the signed-in user’s Entra token to that endpoint.
Build the workspace private endpoint URL
Replace theapi.fabric.microsoft.com host in the data agent server_url with the workspace fully qualified domain name (FQDN):
https://{workspaceId}.z{xy}.w.api.fabric.microsoft.com/v1/mcp/workspaces/{workspaceId}/dataagents/{dataAgentId}/agent
Where:
{workspaceId}is the workspace ID with the dashes removed.zis a literal part of the host name.{xy}is the first two characters of the workspace ID.
1234567890abcdef1234567890abcdef, the host is 1234567890abcdef1234567890abcdef.z12.w.api.fabric.microsoft.com. For more information, see Connecting to workspaces.
Create the Foundry connection
Create a remote tool connection that uses Microsoft Entra ID On-Behalf-Of (OBO) authentication with the user’s token and connects through the workspace private endpoint. Configure the audience as the Power BI API resourcehttps://analysis.windows.net/powerbi/api, which authorizes data agent execution using the DataAgent.Execute.All permission scope.
Azure Developer CLI
Add the connection to theresources section of your azure.yaml file, then run azd provision:
REST API
Send a PUT request to the connections API. Replace the placeholders with your subscription, resource group, Foundry account, and project names. Supply a Microsoft Entra access token for Azure Resource Manager.project_connection_id. The connection’s target already points to the workspace private endpoint, so requests route over the workspace-level private link.
Data governance and compliance
Fabric IQ queries involve your Fabric workspace, the Foundry project, and the identity configured for the connection. Review the data handling, regional configuration, and compliance requirements for every service in that request path with your privacy and compliance teams.Data residency
Your Fabric workspace location determines the Fabric region. The Foundry project and other services in the request path can use different regions. Review Microsoft Fabric region availability and your organization’s residency requirements before connecting the services.If your Foundry project is in a different Azure region than your Fabric workspace, query results are returned cross-region. Review Microsoft Fabric region availability and your organization’s data residency requirements before connecting a Fabric workspace in a different region.
Compliance review
For compliance documentation and audit reports, use your organization’s Microsoft compliance resources and confirm that they cover the complete Fabric IQ and Foundry deployment.Admin management
Grant admin consent
A Global Administrator must grant tenant-wide admin consent for the Entra app registration as a one-time tenant operation before users can authenticate with the Fabric IQ connection. Use Microsoft Entra PIM to activate the role just in time, and deactivate it after granting consent. Day-to-day Fabric IQ users don’t need this role:- In the Microsoft Entra admin center, go to Entra ID > App registrations and select your app.
- Select API permissions.
- Select Grant admin consent for {your-organization} and approve. Each listed permission shows a green checkmark when consent is granted.
DataAgent.Execute.All also requires admin consent. If you use this permission for data agent connections, follow the same process.