Private Link & Private Endpoints
Private endpoints · approval · network policies · DNS integration · Private Link service · on-premises access
By the tools4free.dev team · Last reviewed November 13, 2026
Practice questions for this topic →
Private endpoint basics
A private endpoint is a network interface that uses a private IP address from your virtual network. It brings the service into your virtual network. Traffic between your virtual network and the service travels the Microsoft backbone network.
| Property | What it sets |
|---|---|
| Subnet | The subnet where the private IP address is assigned |
| Private-link resource | The target, chosen by resource ID or alias |
| Target subresource | The part of the service to connect to (for example blob, file, sqlServer, vault, sites) |
| Connection approval method | Automatic or manual |
| Request message | Text shown to the owner when approval is manual |
| Connection status | Read-only: Approved, Pending, Rejected or Disconnected |
- The private endpoint must be in the same region and subscription as the virtual network. The private-link resource can be in a different region.
- A private endpoint maps to one instance of a PaaS resource, not the whole service. Access to other resources in the service is blocked, which protects against data leakage.
- Each subresource needs its own private endpoint. For Storage,
blobandfileneed separate endpoints. Private endpoints can be created only on a general-purpose v2 storage account. - Connections are one-way: only the client side that connects to the private endpoint can start them. The provider has no route into the consumer network.
- A read-only network interface is created automatically with a dynamic private IP. The IP does not change for the life of the endpoint.
- Clients can reach a private endpoint from the same virtual network, regionally or globally peered networks, and on-premises over VPN or ExpressRoute.
- A private endpoint gives a private IP but does not necessarily turn off public access to the service. Restrict public access on the service itself.
- Private Link and virtual networks span availability zones. For high availability, the target resource must also be zone resilient.
- Azure Monitor shows data in and out for a private endpoint. Static IP configuration is not supported for AKS, Application Gateway, HDInsight, Recovery Services vaults or third-party Private Link services.
Creating a private endpoint
| Setting | Rule |
|---|---|
| Static IP address | Set only at creation; cannot be added to an existing endpoint |
| Network interface name | Set only at creation; renaming an existing endpoint's NIC is not supported |
| Subscriptions | The subscription with the private-link resource and the one with the private endpoint must both be registered with the Microsoft network resource provider |
| Permissions | Owner, Contributor or Network contributor; a custom role needs Microsoft.Network/virtualNetworks/subnets/join/action and Microsoft.Network/privateEndpoints/write |
GroupIdis the subresource;MemberNameis the unique stamp for the private IP address. Both are needed to set a static IP. List them withaz network private-link-resource listorGet-AzPrivateLinkResource.- Several private endpoints can target the same resource. With one shared DNS configuration, use a single private endpoint per resource to avoid duplicate or conflicting DNS entries.
- In the portal, choose the resource type (for example
Microsoft.Web/sites), the resource and the target subresource, then the virtual network, subnet and IP allocation (dynamic or static). - To connect with an alias, create the endpoint with the manual approval method.
Connection approval
| Provider action | Endpoint state | Meaning |
|---|---|---|
| None (manual request) | Pending | Waiting for the resource owner |
| Approve (or automatic) | Approved | Ready; only this state sends traffic |
| Reject | Rejected | Owner refused the connection |
| Remove | Disconnected | Owner removed it; delete the endpoint to clean up |
- Automatic approval needs RBAC permission on the target resource (
Microsoft.<Provider>/<resource_type>/privateEndpointConnectionsApproval/action). Without it, use manual approval. - A connection that was rejected cannot be approved later. Remove it and create a new connection.
- To approve a connection from another subscription or tenant, both sides must have the right resource providers registered (
Microsoft.Networkfor the provider). - The owner can delete a connection in any state. The private endpoint owner can then only delete the endpoint.
Network policies and traffic control
- By default, network policies are disabled on a subnet. NSGs and UDRs do not apply to private endpoints until you enable them. The setting is per subnet and affects all private endpoints in it.
- Enable for NSGs only, UDRs only, or both. PowerShell values:
Disabled,NetworkSecurityGroupEnabled,RouteTableEnabled,Enabled. The CLI takes only true or false, so it cannot pick one. - A private endpoint adds a /32 route. A UDR default route (0.0.0.0/0) does not override it. To send traffic to a firewall or NVA, use a UDR with a prefix equal to or larger than the virtual network address space prefix length, with UDR policies enabled.
- NSG flow logs are not available for inbound traffic to a private endpoint, and effective routes and security rules are not shown for its NIC. An application security group used on the endpoint subnet should have no more than 50 members.
- When inspecting private endpoint traffic, prefer Azure Firewall application rules: they always SNAT, which keeps flow symmetry. With network rules or an NVA, configure SNAT yourself.
- A route table holds up to 400 routes. A dedicated virtual network for private endpoints in a hub-and-spoke design needs only one route to the endpoint address space and avoids that limit.
DNS integration
DNS must resolve the service FQDN to the private IP of the endpoint. Azure adds a CNAME in public DNS that points to the privatelink name. A private DNS zone linked to your network answers with the private IP. Application connection URLs do not change.
| Resource | Subresource | Private DNS zone |
|---|---|---|
| Storage | blob | privatelink.blob.core.windows.net |
| Storage | file | privatelink.file.core.windows.net |
| Azure SQL Database | sqlServer | privatelink.database.windows.net |
| Key Vault | vault | privatelink.vaultcore.azure.net |
| Web Apps / Functions | sites | privatelink.azurewebsites.net |
| Cosmos DB | Sql | privatelink.documents.azure.com |
| Service Bus / Event Hubs | namespace | privatelink.servicebus.windows.net |
- DNS options: a private DNS zone, Azure DNS Private Resolver, or the hosts file (testing only).
- Automatic zone configuration works only with the recommended zone names.
- Do not link one private DNS zone to endpoints of two different services. It deletes the first A record. Use one zone per service.
- Virtual network workloads without a custom DNS server query Azure-provided DNS
168.63.129.16, which resolves the linked private DNS zone. - Peered networks: add a virtual network link from the one private DNS zone to every peered network. In hub-and-spoke, link the same zones to the hub and all spokes.
- On-premises: queries must come from a virtual network linked to the zone. Use a DNS forwarder in Azure or Azure DNS Private Resolver, and a conditional forwarder on-premises that targets the public zone name (
database.windows.net), not theprivatelinkname. - A private DNS zone group ties the zone to the endpoint: records are added and removed with the endpoint. A zone group holds up to 5 zones, one zone per zone name, and a private endpoint supports only one zone group.
- If a linked private zone has no record for a resource that has no private endpoint, the query gets NXDOMAIN. Enable fallback to internet (
NxDomainRedirect) on the virtual network link. - Azure file shares connected through the public endpoint must be remounted. Kudu on a web app needs a second record for
scm.
Private Link service (provider side)
A Private Link service publishes your own service, behind a Standard Load Balancer, to consumers who create a private endpoint to it.
| Setting | What it does |
|---|---|
| Load balancer frontend IP configuration | The frontend that receives the traffic; different from the NAT IP configuration |
| NAT IP configuration | Source-side NAT on the provider network; the service sees the NAT IP as the client. Up to 8 NAT IPs; keep at least 1 |
| Alias | Globally unique, generated by Azure (prefix.GUID.region.azure.privatelinkservice); the prefix cannot change |
| Visibility | Who may see and request: RBAC only, restricted by subscription, or anyone with the alias |
| Auto-approval | Subscriptions approved automatically; a subset of visibility |
| TCP Proxy v2 | Passes the consumer source IP and the private endpoint LinkID to the service |
- The service must be in the same region as its virtual network and load balancer. Basic Load Balancer is not supported, and neither is a Standard Load Balancer whose backend pool is configured by IP address.
- IPv4 only; TCP and UDP only. Idle timeout is about 5 minutes (300 seconds), so use TCP keepalives lower than that.
- Set
privateLinkServiceNetworkPoliciesto Disabled on the NAT subnet before creating the service. Plan at least 8 NAT IP addresses in the subnet. - A request from a subscription in the visibility list but not the auto-approval list stays Pending until the provider approves it.
- Before deleting the service, reject or remove all private endpoint connections.
- If TCP Proxy v2 is on, the service must parse the header or requests fail. Turn it on for every Private Link service that shares the load balancer or backend pool, or health probes fail.
- Consumers and providers can be in different subscriptions and Microsoft Entra tenants, and in any public region.
- On-premises clients reach a Private Link service through a private endpoint over ExpressRoute private peering or VPN. They do not need Microsoft peering or the internet. The service sees NAT IPs; use TCP Proxy v2 to get the real source address.
CLI and PowerShell
| Task | Azure CLI | PowerShell |
|---|---|---|
| Create a private endpoint (dynamic IP) | az network private-endpoint create --connection-name connection-1 --name private-endpoint --private-connection-resource-id $id --resource-group test-rg --subnet subnet-1 --group-id sites --vnet-name vnet-1 | New-AzPrivateEndpoint @pe |
| Static IP at creation | az network private-endpoint create --connection-name connection-1 --name private-endpoint --private-connection-resource-id $id --resource-group test-rg --subnet subnet-1 --group-id sites --ip-config name=ipconfig-1 group-id=sites member-name=sites private-ip-address=10.0.0.10 --vnet-name vnet-1 | - |
| Name the NIC at creation (PowerShell: set CustomNetworkInterfaceName in the @pe parameters) | az network private-endpoint create --connection-name myConnection --name myPrivateEndpoint --private-connection-resource-id $id --resource-group myResourceGroup --subnet myBackendSubnet --group-id sites --nic-name myPrivateEndpointNIC --vnet-name myVNet | New-AzPrivateEndpoint @pe |
| Find GroupId and MemberName | az network private-link-resource list --resource-group MyResourceGroup --name myWebApp1979 --type Microsoft.Web/sites | Get-AzPrivateLinkResource -PrivateLinkResourceId $webapp.ID |
| Enable endpoint network policies on a subnet (PowerShell: PrivateEndpointNetworkPoliciesFlag = 'Enabled' in the @sub parameters) | az network vnet subnet update --disable-private-endpoint-network-policies false --name default --resource-group myResourceGroup --vnet-name myVNet | Set-AzVirtualNetworkSubnetConfig @sub |
| Create a private DNS zone | az network private-dns zone create --resource-group test-rg --name "privatelink.azurewebsites.net" | New-AzPrivateDnsZone |
| Link the zone to a virtual network | az network private-dns link vnet create --resource-group test-rg --zone-name "privatelink.azurewebsites.net" --name dns-link --virtual-network vnet-1 --registration-enabled false | New-AzPrivateDnsVirtualNetworkLink |
| Create a DNS zone group | az network private-endpoint dns-zone-group create --resource-group test-rg --endpoint-name private-endpoint --name zone-group --private-dns-zone "privatelink.azurewebsites.net" --zone-name webapp | New-AzPrivateDnsZoneGroup @zg |
| Approve a connection | az network private-endpoint-connection approve --name myPrivateEndpointConnection --resource-group myResourceGroup | Approve-AzPrivateEndpointConnection @approve |
| Reject a connection | az network private-endpoint-connection reject --name myPrivateEndpointConnection --resource-group myResourceGroup | Deny-AzPrivateEndpointConnection @deny |
| Remove a connection | az network private-endpoint-connection delete --name myPrivateEndpointConnection --resource-group myResourceGroup | Remove-AzPrivateEndpointConnection @remove |
| Disable Private Link service network policy | az network vnet subnet update --name subnet-1 --vnet-name vnet-1 --resource-group test-rg --private-link-service-network-policies Disabled | ($vnet | Select -ExpandProperty subnets | Where-Object {$_.Name -eq $subnet}).privateLinkServiceNetworkPolicies = "Disabled" |
| Create a Private Link service | az network private-link-service create --resource-group test-rg --name private-link-service --vnet-name vnet-1 --subnet subnet-1 --lb-name load-balancer --lb-frontend-ip-configs frontend --location eastus2 | New-AzPrivateLinkService @privlinksettings |
Exam Tips
Tick each tip once you can answer it without looking.
“Private IP in your virtual network for a PaaS database; traffic must stay on the Microsoft backbone” → Private endpoint (Private Link). Trap: a service endpoint keeps the service on its public IP.
“Allow access to one specific storage account only, not the whole service” → Private endpoint: it maps to one resource instance. Trap: a service endpoint opens the service type, not one instance.
“Storage account needs both blob and file access over private endpoints” → Two private endpoints, one per subresource. Trap: one endpoint covers only its target subresource.
“Private endpoint created, but the service is still reachable from the internet” → Disable public network access or set the service firewall on the resource. Trap: the endpoint alone does not turn off public access.
“Need a static private IP for the endpoint, endpoint already exists” → Re-create the endpoint with a static IP. Trap: static IP and NIC name can be set only at creation.
“You lack RBAC permission on the target resource” → Manual approval; status stays Pending until the owner approves. Trap: automatic approval needs the privateEndpointConnectionsApproval permission.
“A rejected connection must work now” → Remove it and create a new connection. Trap: a rejected connection cannot be approved.
“NSG rules seem ignored for private endpoint traffic” → Enable private endpoint network policies on the subnet. Trap: policies are disabled by default.
“Force private endpoint traffic through a firewall with a UDR” → Enable UDR policy and use a route with prefix equal to or larger than the VNet prefix length. Trap: 0.0.0.0/0 loses to the endpoint's /32 route.
“Inspect private endpoint traffic with Azure Firewall and keep return traffic symmetric” → Application rules (Azure Firewall always SNATs them). Trap: network rules or an NVA need SNAT configured.
“Clients still get the public IP for the SQL server name” → Link a private DNS zone privatelink.database.windows.net to the VNet. Trap: the endpoint creates no record without a zone.
“Peered spokes must resolve the endpoint” → Link the one private DNS zone to every spoke and the hub. Trap: separate zones of the same name need manual record merging.
“On-premises clients must resolve a private endpoint name” → Azure DNS forwarder or Private Resolver; conditional forward to the public zone name. Trap: forwarding to the privatelink zone name.
“Two services' endpoints share one private DNS zone and records disappear” → One private DNS zone per service. Trap: a zone linked to two services deletes the first A record.
“Publish your own app to other tenants privately” → Private Link service behind a Standard Load Balancer. Trap: Basic Load Balancer is not supported.
“Consumer subscriptions should connect without approval” → Add them to the auto-approval list. Trap: visibility only controls who can request.
“Provider app needs the consumer's real source IP” → Enable TCP Proxy v2 and parse the header. Trap: without it the app sees only the NAT IP.
“Private Link service creation fails on the subnet” → Set privateLinkServiceNetworkPolicies to Disabled. Trap: leaving the policy enabled.
Sources
- What is Azure Private Link?
- What is a private endpoint?
- What is Azure Private Link service?
- Private endpoint private DNS zone values
- Private endpoint DNS integration scenarios
- Manage private endpoints
- Manage network policies for private endpoints
- Azure Firewall scenarios to inspect traffic destined to a private endpoint
- Azure RBAC permissions for Azure Private Link
- Create a private endpoint with the Azure CLI
- Create a private endpoint with Azure PowerShell
- Create a private endpoint in the portal
- Create a Private Link service with the Azure CLI
- Create a Private Link service with Azure PowerShell
- Fallback to internet for Azure Private DNS zones
Checked against Microsoft Learn on November 13, 2026.