A unified Azure platform for creating and managing AI models, agents, and applications with built‑in enterprise security, monitoring, and governance
Microsoft Foundry Hosted Agent cannot resolve its own Foundry endpoint — DNS failure during MCP initialization
We are experiencing a persistent DNS resolution issue with a Microsoft Foundry Hosted Agent deployed in Sweden Central.
Our Hosted Agent was working correctly on October 20, 2026, but started failing by October 26, without changes to the original deployed agent version.
Error
The agent fails during FoundryToolbox.connect():
MCP server failed to initialize:
[Errno -3] Temporary failure in name resolution
The container starts successfully, but the agent cannot initialize its Foundry Toolbox MCP connection.
Environment
- Microsoft Foundry Hosted Agent
Python 3.13
Microsoft Agent Framework
Foundry Toolbox connected to Azure AI Search
Region: Sweden Central
Public network access: Enabled (All networks)
Private Endpoint: Approved
Private DNS Zone: privatelink.services.ai.azure.com configured
VNet Injection: Not configured
Managed Virtual Network: Disabled
The issue is reproducible on both the original agent version and newly deployed versions.
Diagnostics performed
We added read-only DNS diagnostics directly inside the Hosted Agent container using Python socket.getaddrinfo().
Results:
| Hostname | Result |
aif-<resource>.services.ai.azure.com |
DNS resolution FAILED |
| Azure API Management hostname | DNS resolution OK |
The Foundry hostname consistently returns:
socket.gaierror: [Errno -3]
Temporary failure in name resolution
DNS resolution continues to fail after the container has been running for more than two minutes.
Additional findings:
Managed Identity authentication succeeds.
Foundry Storage API requests succeed.
The Hosted Agent container starts successfully.
The Foundry Toolbox MCP endpoint is accessible from our local machine.
Both MCP initialize and tools/list return HTTP 200 when invoked locally.
Azure Service Health shows no active service issues for our subscription.
We have not identified a relevant networking configuration change.
The deployed environment uses agent-framework-core 1.17.0, agent-framework-foundry-hosting 1.0.0b260821, and mcp 1.30.0.
Questions
Is there a known DNS resolution issue affecting Microsoft-managed Foundry Hosted Agent sandboxes in Sweden Central?
Why would the Hosted Agent container fail to resolve the Foundry project endpoint while other Azure service hostnames resolve correctly?
Could this be related to the combination of public network access and an existing Private Endpoint, even without VNet Injection?
Has there been any recent change to Hosted Agent networking or DNS behavior that could explain this regression?
A potentially related issue has also been reported here:
However, our case differs because we are not using VNet Injection, and the DNS failure persists well beyond container startup.We are experiencing a persistent DNS resolution issue with a Microsoft Foundry Hosted Agent deployed in Sweden Central.