Foundry Agent cannot resolve Azure AI Search MCP endpoint ("Name or service not known")

70351079 0 Reputation points
2026-09-08T15:07:54.8266667+00:00

Environment:

  • Microsoft Foundry (New Foundry experience)
  • Azure AI Search Knowledge Base
  • MCP endpoint generated by Foundry IQ

Error:

Error encountered while enumerating tools from remote server.

Endpoint:

https://ai-search-cooh-ts-brd-mvc.search.windows.net/knowledgebases/historical-loe-v2/mcp

Message:

Name or service not known.

The host name could not be resolved from the selected network path.

Screenshot 2026-09-08 103424

Foundry Agent Service
Foundry Agent Service

A fully managed platform in Microsoft Foundry for hosting, scaling, and securing AI agents built with any supported framework or model


2 answers

Sort by: Oldest
  1. AI answer

    2026-09-08T15:08:17.63+00:00

    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:

    1. 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.
    2. 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.
    3. 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.
    4. Check authorization after DNS is fixed
      • If the next error becomes 401 or 403, confirm the project managed identity has Search Index Data Reader on 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.
    5. Confirm the agent is configured to use the knowledge base tool
      • Ensure the MCP tool is configured.
      • Ensure allowed_tools includes knowledge_base_retrieve.
    6. 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 known means 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:

    AI-generated content may be incorrect. Read our transparency notes for more information.

    Was this answer helpful?

  2. 70351079 0 Reputation points
    2026-09-09T13:55:14.77+00:00

    Hi Team, 

    I am requesting assistance with private network connectivity between Azure AI Search and the GPT-4o deployment used by a Foundry IQ knowledge base. 

    The historical LOE knowledge source and knowledge base were created successfully and both show as Active. However, retrieval fails when Azure AI Search attempts to invoke the GPT-4o model. 

    Confirmed backend error 

    POST /knowledgebases/historical-loe-v2/retrieve  HTTP 403 Forbidden    Could not complete model action. The model endpoint returned status code '403' (Forbidden). Public access is disabled. Please configure private endpoint. 

    Relevant resources 

    Azure AI Search service: ai-search-cooh-ts-brd-mvc 

    Knowledge base: historical-loe-v2 

    Foundry/OpenAI resource: ai-foundry-resource-cooh-ts 

    Model deployment: gpt-4o 

    Model endpoint: ai-foundry-resource-cooh-ts.openai.azure.com 

    Foundry private endpoint: pe-foundry-cooh-ts 

    OpenAI private endpoint IP shown in DNS configuration: 10.19.200.125 

    Configuration already verified 

    Public network access on the Foundry resource is disabled, as required by IQVIA policy. 

    The policy prevents enabling public access for testing: Cognitive Services accounts should disable public network access. 

    The Foundry private endpoint connection is Approved. 

    Private endpoint DNS entries exist for the Foundry Cognitive Services, OpenAI, and services.ai endpoints. 

    The Azure AI Search knowledge source and knowledge base are Active. 

    The failure occurs specifically when Azure AI Search invokes the GPT-4o model during knowledge retrieval. 

    Request 

    Could you please review and configure the supported private network path from Azure AI Search to the Foundry/OpenAI model endpoint? Specifically, please verify: 

    DNS resolution from the Azure AI Search agentic-retrieval runtime to ai-foundry-resource-cooh-ts.openai.azure.com resolves through the appropriate private DNS configuration. 

    1. Network connectivity from the Azure AI Search retrieval runtime to the Foundry/OpenAI private endpoint on TCP 443. Hi Team,  I am requesting assistance with private network connectivity between Azure AI Search and the GPT-4o deployment used by a Foundry IQ knowledge base.  The historical LOE knowledge source and knowledge base were created successfully and both show as Active. However, retrieval fails when Azure AI Search attempts to invoke the GPT-4o model.  Confirmed backend error  POST /knowledgebases/historical-loe-v2/retrieve HTTP 403 Forbidden  Could not complete model action. The model endpoint returned status code '403' (Forbidden). Public access is disabled. Please configure private endpoint.  Relevant resources 
      • Azure AI Search service: ai-search-cooh-ts-brd-mvc 
      • Knowledge base: historical-loe-v2 
      • Foundry/OpenAI resource: ai-foundry-resource-cooh-ts 
      • Model deployment: gpt-4o 
      • Model endpoint: ai-foundry-resource-cooh-ts.openai.azure.com 
      • Foundry private endpoint: pe-foundry-cooh-ts 
      • OpenAI private endpoint IP shown in DNS configuration: 10.19.200.125 
      Configuration already verified 
      • Public network access on the Foundry resource is disabled, as required by IQVIA policy. 
      • The policy prevents enabling public access for testing: Cognitive Services accounts should disable public network access. 
      • The Foundry private endpoint connection is Approved. 
      • Private endpoint DNS entries exist for the Foundry Cognitive Services, OpenAI, and services.ai endpoints. 
      • The Azure AI Search knowledge source and knowledge base are Active. 
      • The failure occurs specifically when Azure AI Search invokes the GPT-4o model during knowledge retrieval. 
      Request  Could you please review and configure the supported private network path from Azure AI Search to the Foundry/OpenAI model endpoint? Specifically, please verify: 
      1. DNS resolution from the Azure AI Search agentic-retrieval runtime to ai-foundry-resource-cooh-ts.openai.azure.com resolves through the appropriate private DNS configuration. 
      2. Network connectivity from the Azure AI Search retrieval runtime to the Foundry/OpenAI private endpoint on TCP 443. 

    Was this answer helpful?

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.