A fully managed platform in Microsoft Foundry for hosting, scaling, and securing AI agents built with any supported framework or model
This error indicates a DNS/network path problem to the Azure AI Search knowledge base MCP endpoint, not a tool-schema issue.
Use this checklist:
- Verify the MCP endpoint format
- The search service endpoint must be the Azure AI Search service URL.
- The knowledge base name must exactly match the knowledge base created in Azure AI Search.
- For the knowledge base MCP endpoint, use API version
2026-08-01-preview.
- Check whether the endpoint is private or depends on private DNS
- If the Azure AI Search service or MCP path is reachable only through a private endpoint, Foundry agent connectivity depends on the selected network path, DNS, firewall rules, and private endpoint configuration.
- Ensure private endpoints exist for all Azure services the MCP tools access.
- Verify firewall rules permit agent-to-service traffic.
- Validate DNS resolution from the Foundry network path
- The error text explicitly says the host name could not be resolved from the selected network path.
- If the search service was previously or is currently configured with a private endpoint, DNS can resolve the service to a private IP that the agent path cannot reach.
- In that case, review private endpoint connections and private DNS configuration for Azure AI Search.
- Check authorization after DNS is fixed
- If the next error becomes 401 or 403, confirm the project managed identity has
Search Index Data Readeron the search service. - If the connection writes to indexes, also assign
Search Index Data Contributor. - If creating or deleting the project connection fails with 403 from Azure Resource Manager, confirm the user or service principal has permissions on the Microsoft Foundry resource and project.
- If using keyless authentication, confirm sign-in is to the correct tenant and subscription.
- If the next error becomes 401 or 403, confirm the project managed identity has
- Confirm the agent is configured to use the knowledge base tool
- Ensure the MCP tool is configured.
- Ensure
allowed_toolsincludesknowledge_base_retrieve.
- If using private MCP generally in Foundry Agent Service
- Private MCP connectivity requires Standard Agent Setup with private networking.
- Basic agent setup does not support private MCP endpoints.
A practical interpretation for this specific error:
-
Name or service not knownmeans Foundry is failing before authentication, during hostname resolution. - Focus first on Azure AI Search endpoint correctness, private endpoint/private DNS state, and whether the selected Foundry network path can resolve and reach the search service hostname.
References:
- Connect a Foundry IQ knowledge base to Foundry Agent Service
- How to configure network isolation for Microsoft Foundry
- Connect agents to Model Context Protocol servers (rest)
- Not able to connect to Azure AI search from Foundry Agent - Microsoft Q&A
- Query a knowledge base using the retrieve action or MCP endpoint (rest)