Skip to main content
This tutorial series uses the 2026-05-01-preview REST API for agentic retrieval. The 2026-05-01-preview is licensed to you as part of your Azure subscription and is subject to the terms applicable to “Previews” in the Microsoft Product Terms, the Microsoft Products and Services Data Protection Addendum (“DPA”), and the Supplemental Terms of Use for Microsoft Azure Previews.
This article is part one of a three-part tutorial series. In this part of the tutorial, you set up inbound private connectivity from Microsoft Foundry to Azure AI Search. By establishing this private request path, you ensure that later retrieval and dependency validation occur inside the intended network boundary.

Prerequisites

  • An Azure subscription where your account has Contributor or Owner access at the subscription or resource group scope used for this tutorial.
  • The following resource providers registered in your subscription:
    • Microsoft.CognitiveServices
    • Microsoft.MachineLearningServices
    • Microsoft.App
    • Microsoft.ContainerService
    • Microsoft.ContainerRegistry
    • Microsoft.Network
    • Microsoft.Search
    • Microsoft.Storage
    • Microsoft.DocumentDB
  • The Azure CLI installed and authenticated with az login.
  • An in-VNet client, such as a jumpbox, VM, dev box, or Azure Bastion-connected workstation, connected to the private network path used in your deployment and able to reach your private endpoints. You use this same client in part three to run data plane REST calls over private endpoints.

Create a private network

Create the virtual network boundaries that carry private traffic between Foundry and Azure AI Search. This section defines subnets for runtime, private endpoints, and optional in-VNet test clients. To create the private network:
  1. Create the resource group and VNet.
  2. Create two subnets: agent-subnet for agent runtime and pe-subnet for private endpoints.
The deployment requires agent-subnet to be dedicated to this environment. If the subnet is already used by another environment or service, deployment can fail. Use a new VNet or a new, unused subnet range for each isolated tutorial deployment.
  1. (Optional) Create an in-VNet subnet named mcp-subnet if you need to place workloads inside the VNet, such as jumpboxes, validation VMs, or MCP hosts. If you don’t need in-VNet components, skip this step.

Deploy private infrastructure

With the network in place, use the foundry-samples deployment artifact to create the private infrastructure (private services, private endpoints, and private DNS zones) for this tutorial series. To deploy the private infrastructure:
  1. Get your subscription ID to use as <subscription-id> throughout the tutorial series.
  2. Set the deployment template URL and the existing VNet resource ID used by the deployment.
  3. Validate the deployment configuration.
    If your subscription enforces a policy that requires Azure AI Search to disable local authentication, this sample deployment can be denied during validation or deployment. In that case, precreate a compliant Azure AI Search service and reuse it by supplying the optional aiSearchResourceId template parameter. A compliant bring-your-own Search service for this tutorial should meet the following requirements before you pass its resource ID to the template:
    • A supported region and SKU for agentic retrieval.
    • A system-assigned managed identity.
    • Role-based access enabled for the data plane.
    • Local authentication disabled if required by policy.
    • Public network access disabled if required by policy.
    For example:
  4. Deploy the private services, endpoints, and DNS zones. The deployment typically takes 10 to 20 minutes to finish, and the command doesn’t return until it completes.
    If you reuse an existing Azure AI Search service to satisfy a subscription policy, append aiSearchResourceId='<search-resource-id>' to the deployment parameters.
  5. Confirm that the deployment created the following resources:
    • Foundry resource and project
    • Azure AI Search service
    • Azure Storage account
    • Azure Cosmos DB account
    • Azure Container Registry that supports the standard agent environment
    • Private endpoints for the deployed resources
    • Private DNS zones with virtual network links required by the deployment
    The command should return Succeeded. The exact number of private endpoints and DNS zones can change as the sample deployment evolves, so use the deployment output as the source of truth.
  6. Record the generated resource names. The deployment appends a unique suffix to globally unique resources to avoid naming collisions, so the deployed names differ from the input names. Record the actual names now. Throughout this tutorial series, substitute them for the placeholders <foundry-resource-name>, <search-service-name>, <storage-account-name>, and <cosmos-account-name>.

Verify private infrastructure

Inbound private connectivity depends on three controls working together: network exposure settings, private endpoint attachment state, and private DNS resolution paths. In this section, you validate each control so you can trust that requests are constrained to private network routes. To verify the private infrastructure:
  1. Check that public access is disabled for all four services.
    Each service should return Disabled.
  2. Check that the private endpoint connections are approved for the four core services.
    Each private endpoint connection should show an Approved status.
  3. Check that the required private DNS zones exist and are linked to the VNet.
    Each command should return a VNet link, which confirms that the private DNS zone is linked to your virtual network.

Validate private connectivity

With networking configured, validate reachability by confirming private DNS resolution and TCP 443 connectivity. You must run these checks from inside the virtual network, such as from an Azure Bastion-connected VM, jumpbox, dev box, or another private access path. If you don’t have an in-VNet client yet, create one in (Optional) Add a Linux jumpbox and Azure Bastion or (Optional) Add a Windows VM and Azure Bastion, and then return to this section. To validate the private connectivity:
  1. Verify that DNS resolves to private IP addresses.
    These endpoints should resolve to private IP addresses in the 10.x.x.x range.
  2. Verify TCP 443 connectivity to the endpoints used in later parts of the tutorial.
    Each endpoint should return OK.

(Optional) Add a Linux jumpbox and Azure Bastion

If you need a repeatable in-VNet client for CLI and REST validation over private endpoints, provision a Linux jumpbox behind Azure Bastion. To configure this setup:
  1. Ensure mcp-subnet exists. If you didn’t create this subnet yet, complete the optional mcp-subnet step in Create the private network.
  2. Create the Linux VM network interface and VM.
  3. Create the Azure Bastion subnet and public IP.
  4. Deploy Azure Bastion.
After you set up the Linux jumpbox and Azure Bastion:
  1. Connect to the VM through Azure Bastion by using an interactive shell session.
  2. From the Linux VM, run the DNS resolution and TCP 443 connectivity checks from Validate private connectivity to confirm the inbound path is working.
  3. Use az vm run-command invoke for repeatable, noninteractive validation when you automate testing workflows.
  4. Save the VM connection details if you plan to validate commands from inside the VNet in later parts of the tutorial.

(Optional) Add a Windows VM and Azure Bastion

If you want to test the browser-based Foundry portal or agent playground over the private path, provision a Windows VM behind Azure Bastion. To configure this setup:
  1. Ensure mcp-subnet exists. If you didn’t create this subnet yet, complete the optional mcp-subnet step in Create the private network.
  2. Create the Windows VM network interface and VM.
  3. Create the Azure Bastion subnet and public IP.
  4. Deploy Azure Bastion.
After you set up the Windows VM and Azure Bastion:
  1. Open Azure Bastion in the Azure portal and connect to the Windows VM by using the username and password you set during VM creation.
  2. From within the VM, launch Edge or Chrome and verify you can access the Foundry portal over the private network path. This confirms browser connectivity through the inbound private endpoint.
  3. Save the VM connection details if you plan to validate commands from inside the VNet in later parts of the tutorial.
For Azure Bastion username and password sign-ins, use strong passwords to avoid errors when copying and pasting.

Troubleshooting

When the inbound private path between Foundry and Azure AI Search doesn’t behave as expected, start by confirming DNS resolution, private endpoint approval, and TCP 443 reachability from an in-VNet client.

Learn more

For more information about the topics covered in this part of the tutorial, see the following articles:

Next step

Set up private outbound connectivity