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.
Prerequisites
-
An Azure subscription where your account has
ContributororOwneraccess at the subscription or resource group scope used for this tutorial. -
The following resource providers registered in your subscription:
Microsoft.CognitiveServicesMicrosoft.MachineLearningServicesMicrosoft.AppMicrosoft.ContainerServiceMicrosoft.ContainerRegistryMicrosoft.NetworkMicrosoft.SearchMicrosoft.StorageMicrosoft.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:-
Create the resource group and VNet.
-
Create two subnets:
agent-subnetfor agent runtime andpe-subnetfor 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.-
(Optional) Create an in-VNet subnet named
mcp-subnetif 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:-
Get your subscription ID to use as
<subscription-id>throughout the tutorial series. -
Set the deployment template URL and the existing VNet resource ID used by the deployment.
-
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
aiSearchResourceIdtemplate 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.
-
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. -
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 returnSucceeded. 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. -
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:-
Check that public access is disabled for all four services.
Each service should return
Disabled. -
Check that the private endpoint connections are approved for the four core services.
Each private endpoint connection should show an
Approvedstatus. -
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:-
Verify that DNS resolves to private IP addresses.
These endpoints should resolve to private IP addresses in the
10.x.x.xrange. -
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:-
Ensure
mcp-subnetexists. If you didn’t create this subnet yet, complete the optionalmcp-subnetstep in Create the private network. -
Create the Linux VM network interface and VM.
-
Create the Azure Bastion subnet and public IP.
-
Deploy Azure Bastion.
Recommended workflow
After you set up the Linux jumpbox and Azure Bastion:- Connect to the VM through Azure Bastion by using an interactive shell session.
- From the Linux VM, run the DNS resolution and TCP 443 connectivity checks from Validate private connectivity to confirm the inbound path is working.
-
Use
az vm run-command invokefor repeatable, noninteractive validation when you automate testing workflows. - 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:-
Ensure
mcp-subnetexists. If you didn’t create this subnet yet, complete the optionalmcp-subnetstep in Create the private network. -
Create the Windows VM network interface and VM.
-
Create the Azure Bastion subnet and public IP.
-
Deploy Azure Bastion.
Recommended workflow
After you set up the Windows VM and Azure Bastion:- Open Azure Bastion in the Azure portal and connect to the Windows VM by using the username and password you set during VM creation.
- 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.
- Save the VM connection details if you plan to validate commands from inside the VNet in later parts of the tutorial.
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:- Add, change, or delete a subnet
- Create a private endpoint for a secure connection to Azure AI Search
- Manage Azure private endpoints
- Azure Private Endpoint private DNS zone values
- Connect to a Linux VM using SSH with Azure Bastion
- Connect to a Windows VM using RDP with Azure Bastion