A fully managed platform in Microsoft Foundry for hosting, scaling, and securing AI agents built with any supported framework or model
The failure is consistent with private DNS or private dependency reachability, not with agent creation being unsupported.
For Foundry Agent Service in a private networking setup, a healthy private endpoint to the Foundry project alone is not enough. Agent operations also depend on backend services, and those dependencies must resolve and route correctly over the private path. The accepted Microsoft guidance for similar 502 upstream_dependency_failed and agent/network failures is to validate dependency connectivity, private endpoints, DNS zones, and RBAC for services such as Azure AI Search, Storage, and Cosmos DB.
Given the current setup, the most important point is that host file entries on user machines do not validate or fix DNS for the agent runtime path. The documented troubleshooting focuses on DNS resolution from inside the virtual network and on private DNS zone linkage or custom DNS forwarding.
Recommended checks:
- Validate DNS from a machine inside the VNet
Run
nslookup <your-foundry-endpoint-hostname>and alsonslookup resourcename.search.windows.netfrom a VM connected to the same virtual network path used for the private setup. Expected result: the names resolve to private IPs, not public IPs. - Confirm the private DNS design
If DNS returns a public IP, verify that the required private DNS zone for the
privatelinksubdomain exists and is linked to the virtual network. If custom DNS is used, confirm it forwards queries for theprivatelinksubdomain to Azure DNS168.63.129.16. - Verify which DNS mode the VNet is using
In Azure portal, open the private endpoint resource, then:
Overview → Network Interface → IP Configurations → Virtual network → DNS servers
-
Default (Azure-provided)means Azure DNS is in use. - Any listed IP means custom DNS is in use.
-
- Check private endpoint approval and subnet permissions
If any private endpoint is stuck in
Pending, approval is required from Networking → Private endpoint connections. If endpoint creation failed earlier, verifyNetwork Contributoron the VNet/subnet and confirm the subnet has available IP addresses. - Test TCP 443 reachability From an in-VNet machine, test connectivity to the resolved endpoint on port 443. For classic troubleshooting guidance, the expected healthy result is successful DNS to a private IP and successful TCP 443 connectivity.
- Review NSG, firewall, and routing If DNS is correct but connections still fail, verify outbound traffic to the private endpoint IP on port 443 is allowed and that no firewall is blocking the connection. If access is from on-premises, verify the VPN/ExpressRoute path is active and routing tables include the VNet address space.
- Validate all agent dependencies, not only Foundry Similar Microsoft guidance for agent creation failures indicates that private endpoints and DNS must be correct for all required backend services the agent uses. A working Foundry private endpoint does not guarantee that Azure AI Search, Storage, Cosmos DB, or other dependencies are reachable.
- If MCP tools or evaluations are involved Microsoft guidance also calls out that agents fail when private endpoints are missing for Azure services the tools access, when managed identity RBAC is missing, or when firewall rules block agent-to-service traffic.
What the current symptoms suggest:
- The error specifically naming
resourcename.search.windows.netstrongly points to DNS resolution for Azure AI Search. - Using host file records for limited admin scenarios can help a user workstation, but it does not replace the documented requirement for correct private DNS zone linkage or custom DNS forwarding for the private networking path.
- In a peered VNet plus on-prem VPN design, intermittent or failed resolution is commonly caused by DNS not being reachable from all subnets or by custom DNS not forwarding
privatelinkqueries correctly.
Most likely next action path:
- From a VM inside the VNet, run
nslookupfor the Search endpoint. - If it does not return the expected private IP, fix private DNS zone linkage or custom DNS forwarding.
- If it resolves correctly, test TCP 443.
- If TCP 443 fails, review NSG/firewall/routing.
- Repeat the same validation for every dependency used by the agent, not just the Foundry endpoint.