In March 2025, we announced that agents in Microsoft Foundry could use Fabric data agents to answer questions about data in Microsoft Fabric. In the earlier integration, you connected to a data agent by adding it as a custom tool. For details, refer to Consume a data agent in Microsoft Foundry.
What’s changing
We are deprecating the earlier custom-connection integration. Starting 11/6/2026, that integration will no longer be supported. If your Foundry agents use a Fabric data agent as a custom tool, you must migrate them before that date.
The replacement integration (Preview) uses the Fabric IQ (OneLake Catalog) tool, which makes your data available to agents and applications. In the Foundry portal, you can use this tool to add a published Fabric data agent to a Foundry agent. For configuration steps, refer to Consume Fabric data agent from Microsoft Foundry via Fabric IQ.
Capabilities with the new integration
The replacement integration changes how you find and connect Fabric data agents: Select accessible published data agents from the catalog. In the Foundry portal, the OneLake Catalog shows the published data agents available to you by name, so the connection workflow does not require you to enter a workspace ID or an artifact ID.
- Connect more than one data agent. A Foundry agent can call multiple data agents, such as separate agents for sales data and customer support data. The earlier custom-connection integration only supported one Fabric data agent.
- Connect through a Model Context Protocol (MCP) endpoint. MCP is an open standard for how an agent calls a tool. Each selected Fabric data agent is presented to the Foundry agent as a tool through a MCP endpoint.
Coming soon, when a data agent answers a question, its response will also include the query it used to generate the answer.
What you need to do
If any of your Foundry agents use a Fabric data agent as a custom tool, complete the following steps before 11/6/2026:
- In Microsoft Fabric, make sure to publish your Fabric data agent with a rich and detailed description.
- Open the agent in the Microsoft Foundry portal.
- In the Tools section, add the Fabric IQ (OneLake Catalog) tool, and then select your data agent from the catalog.
- Update the Foundry agent's instructions. Name each data agent and describe the types of questions it should handle.
- Remove the earlier custom tool and then save the Foundry agent.
- Test the Foundry agent with representative questions for each connected data agent.
If you connect data agents in code, update your implementation to use the Fabric IQ tool. For samples in Python, C#, and JavaScript, refer to Connect agents to Microsoft Fabric with Fabric IQ.
Guides to migrate from Fabric Data Agent to Fabric IQ tool
Option 1: Migrate in Foundry Portal
Navigate to Foundry Portal and open the Tools Catalog, select “Fabric IQ (OneLake Catalog)”.
Figure: Select FabricIQ (OneLake Catalog) from the tools.In the OneLake catalog, filter by “Data agent” type.
Figure: Filter by Data Agent in the OneLake Catalog and select data agent.Select any data agent you want to use, and you are ready to go. Provide instructions to your Foundry agent about how to use Fabric data agent.
Figure: Add Fabric data agent to your Foundry agent and provide instructions.Option 2: Migrate in SDK/Rest API
After you publish the Fabric data agent, open its Settings and go to the Model Context Protocol tab. This tab shows:
- Data agent MCP server name
- MCP server URL (copy this value; you can use in every client)
- Data agent MCP tool name
- MCP server tool description
Once you get the data agent MCP server URL, proceed with the following steps:
Step 1: Get an access token
az account get-access-token --resource https://management.azure.com --query accessToken -o tsv
Step 2: Create a Foundry connection to the Fabric data agent
A connection stores the Fabric data agent endpoint and how to sign in to it. Your agent uses this connection to reach Fabric. Replace each value in angle brackets, then run the request:
curl --request PUT \
--url 'https://management.azure.com/subscriptions/<azure-subscription-id>/resourceGroups/<resource-group>/providers/Microsoft.CognitiveServices/accounts/<foundry-account-name>/projects/<foundry-project-name>/connections/<connection-name>?api-version=2025-04-01-preview' \
--header 'Authorization: Bearer <access-token-from-step-1>' \
--header 'Content-Type: application/json' \
--data '{
"type": "Microsoft.MachineLearningServices/workspaces/connections",
"properties": {
"authType": "UserEntraToken",
"group": "AzureAI",
"category": "RemoteTool",
"target": "<fabric-data-agent-mcp-endpoint>",
"audience": "https://api.fabric.microsoft.com/.default",
"isSharedToAll": true,
"sharedUserList": [],
"UseCustomConnector": false,
"Credentials": {
"ClientId": "fake"
},
"metadata": {
"ApiType": "Azure"
}
}
}'
Main field capabilities:
| Field | Value | What it means |
|
authType |
UserEntraToken |
The agent calls Fabric as the signed in user, with that user's Microsoft Entra token. |
|
category |
RemoteTool |
The connection points to a remote tool, in this case an MCP endpoint. |
|
target |
Your MCP endpoint |
The address of your Fabric data agent. |
|
audience |
https://api.fabric.microsoft.com/.default |
The token is issued for the Fabric API. |
|
isSharedToAll |
true |
Every user in the Foundry project can use the connection. |
|
Credentials.ClientId |
fake |
Keep this value as shown. |
The response includes an id field. This is the full resource ID of the connection. Save it for step 4. It looks like this:
/subscriptions/<azure-subscription-id>/resourceGroups/<resource-group>/providers/Microsoft.CognitiveServices/accounts/<foundry-account-name>/projects/<foundry-project-name>/connections/<connection-name>
Step 3: Install the Python packages
pip install "azure-ai-projects>=2.2.0" azure-identity
Step 4: Set the environment variables
|
Variable |
Where to find it |
|---|---|
|
FOUNDRY_PROJECT_ENDPOINT |
The Overview page of your Foundry project. |
|
FOUNDRY_MODEL_NAME |
The deployment name of your model in your Foundry project. |
|
FABRIC_IQ_PROJECT_CONNECTION_ID |
The full connection resource ID from step 2. Use the full ID, not only the connection name. |
export FOUNDRY_PROJECT_ENDPOINT="<your-project-endpoint>"
export FOUNDRY_MODEL_NAME="<your-model-deployment-name>"
export FABRIC_IQ_PROJECT_CONNECTION_ID="<your-connection-resource-id>"
Step 5: Create an agent that uses the Fabric IQ tool and ask it a question
This script creates a prompt agent with the Fabric IQ tool, sends it one question, prints the answer, and then deletes the agent.
import os
from azure.identity import DefaultAzureCredential
from azure.ai.projects import AIProjectClient
from azure.ai.projects.models import PromptAgentDefinition, FabricIQPreviewTool
endpoint = os.environ["FOUNDRY_PROJECT_ENDPOINT"]
with (
# Signs in with your Azure command line interface account (from az login).
DefaultAzureCredential() as credential,
AIProjectClient(endpoint=endpoint, credential=credential) as project_client,
project_client.get_openai_client() as openai_client,
):
# 1. Define the Fabric IQ tool. It uses the connection you created in step 2.
fabric_iq_tool = FabricIQPreviewTool(
project_connection_id=os.environ["FABRIC_IQ_PROJECT_CONNECTION_ID"],
require_approval="never", # The agent calls the tool without asking you first.
)
# 2. Create the agent with your model, its instructions, and the Fabric IQ tool.
agent = project_client.agents.create_version(
agent_name="MyAgent",
definition=PromptAgentDefinition(
model=os.environ["FOUNDRY_MODEL_NAME"],
instructions="Use the available Fabric IQ tools to answer questions and perform tasks.",
tools=[fabric_iq_tool],
),
)
print(f"Agent created (id: {agent.id}, name: {agent.name}, version: {agent.version})")
# 3. Ask the agent a question. Change this to a question about your own data.
user_input = "Which customers placed orders above $10,000 last quarter?"
response = openai_client.responses.create(
input=user_input,
extra_body={"agent_reference": {"name": agent.name, "type": "agent_reference"}},
)
print(f"Agent response: {response.output_text}")
# 4. Delete this agent version so unused versions don't build up in your project.
project_client.agents.delete_version(agent_name=agent.name, agent_version=agent.version)
print("Agent deleted")
Finally, run the script.
python fabric_iq_agent.py
Learn more and share feedback
We recommend that you move to Fabric IQ as soon as you can. We look forward to improving this integration, and we’d like to hear your feedback. Join the community discussion to share feedback and report issues.
For more information, see these articles:
- Consume Fabric data agent from Microsoft Foundry via Fabric IQ
- Connect agents to Microsoft Fabric with Fabric IQ