Home › Studies › AZ-104 › Virtual Networking › Service & Private Endpoints

Service & Private Endpoints

Service endpoints · private endpoints · connection states · private DNS zones · CLI and PowerShell

By the tools4free.dev team · Last reviewed November 13, 2026

Practice questions for this topic →

Service endpoint or private endpoint

Service endpointPrivate endpoint
What it isExtends the vnet identity to an Azure service over the Azure backbone. Enabled per subnetA NIC in your subnet with a private IP that connects to a Private Link resource
Service IPThe service's DNS name still resolves to its public IPA private IP in your vnet
DNSNo changeNeeds DNS: a private DNS zone, custom DNS or Private Resolver
From on-premisesNot usableReachable over VPN or ExpressRoute, and from peered vnets
ScopePer subnet and per serviceOne endpoint per sub-resource

Microsoft recommends Private Link and private endpoints for secure private access to PaaS services.

Service endpoints

Private endpoints

Connection stateMeaning
ApprovedThe only state that can send traffic
PendingWaiting for the resource owner to approve
RejectedThe owner rejected it
DisconnectedThe owner removed it: delete the endpoint

Auto-approval happens when you have the privateEndpointConnectionsApproval/action permission on the resource. Otherwise use manual approval: the owner approves, rejects or deletes the connection on the target resource.

Private DNS for private endpoints

ServicePrivate DNS zone
Blobprivatelink.blob.core.windows.net
Fileprivatelink.file.core.windows.net
Tableprivatelink.table.core.windows.net
Queueprivatelink.queue.core.windows.net
Data Lakeprivatelink.dfs.core.windows.net
Static websiteprivatelink.web.core.windows.net
SQL Databaseprivatelink.database.windows.net
Key Vaultprivatelink.vaultcore.azure.net
Web Appsprivatelink.azurewebsites.net
Cosmos DB (SQL API)privatelink.documents.azure.com
Service Bus and Event Hubsprivatelink.servicebus.windows.net
Container Registryprivatelink.azurecr.io

Steps and commands

Service endpoint on storage: subnet › Service endpoints › Microsoft.Storage, then on the storage account Networking set Selected networks (default action Deny) and add the vnet and subnet. Private endpoint order: create the endpoint, create the private DNS zone with the recommended name, link the zone to the vnet (registration disabled), add a DNS zone group to the endpoint, then test with nslookup from a VM. It returns the private IP, with the public name as an alias.

TaskCommand
Subnet with service endpointaz network vnet subnet create --vnet-name vnet-1 -g test-rg -n subnet-private --address-prefix 10.0.1.0/24 --service-endpoints Microsoft.Storage
Storage default actionaz storage account update --name $acct -g test-rg --default-action Deny
Allow the subnet on storageaz storage account network-rule add -g test-rg --account-name $acct --vnet-name vnet-1 --subnet subnet-private
Create a private endpointaz network private-endpoint create --connection-name connection-1 --name private-endpoint -g test-rg --subnet subnet-1 --vnet-name vnet-1 --private-connection-resource-id $id --group-id sites
Private DNS zoneaz network private-dns zone create -g test-rg --name "privatelink.azurewebsites.net"
Link zone to vnetaz network private-dns link vnet create -g test-rg --zone-name "privatelink.azurewebsites.net" --name dns-link --virtual-network vnet-1 --registration-enabled false
DNS zone groupaz network private-endpoint dns-zone-group create -g test-rg --endpoint-name private-endpoint --name zone-group --private-dns-zone "privatelink.azurewebsites.net" --zone-name webapp
PowerShell: service endpoint on subnetNew-AzVirtualNetworkSubnetConfig ... -ServiceEndpoint "Microsoft.Storage"
PowerShell: storage firewallUpdate-AzStorageAccountNetworkRuleSet -DefaultAction Deny and Add-AzStorageAccountNetworkRule
PowerShell: private endpointNew-AzPrivateLinkServiceConnection then New-AzPrivateEndpoint (mandatory: -Name, -ResourceGroupName, -Location, -Subnet, -PrivateLinkServiceConnection). -ByManualRequest asks for manual approval

Limits

ItemValue
Private endpoints per vnet1,000
Private endpoints across peered vnets4,000
Private endpoints per subscription64,000
Subscriptions and regions with vnet rules, per vnet per serviceup to 500

Exam Tips

Tick each tip once you can answer it without looking.

“Restrict a storage account to one subnet with no DNS change and no extra charge” → Service endpoint Microsoft.Storage on the subnet plus a storage network rule. Trap: a private endpoint needs DNS configuration.

“Enabled the Microsoft.Storage endpoint but storage is still open to all networks” → Set the default action to Deny (Selected networks) and add the subnet. Trap: rebooting the VM.

“On-premises users must reach storage restricted by a service endpoint” → Add the on-premises or ExpressRoute NAT public IPs to the storage firewall (or use a private endpoint). Trap: service endpoints do not work for on-premises traffic.

“After enabling a service endpoint, a storage IP rule for the VM's public IP stops working” → The source is now the vnet private IP: use a vnet rule. Trap: a DNS cache problem.

“Permission needed to secure a service to a subnet with an endpoint” → joinViaServiceEndpoint/action on the subnet. Trap: networkSecurityGroups/join/action.

“Next hop type for service endpoint traffic in effective routes” → VirtualNetworkServiceEndpoint. Trap: Internet.

“UDR 0.0.0.0/0 to an NVA on a subnet with a Storage endpoint: path to storage” → Still direct: endpoint routes are longer prefixes and a route table cannot override them. Trap: traffic being forced through the NVA.

“Private endpoints for blob and file on one storage account” → Two private endpoints (group IDs blob and file). Trap: one endpoint does not cover all sub-resources.

“Private DNS zone for a blob private endpoint” → privatelink.blob.core.windows.net. Trap: blob.core.windows.net itself.

“Private DNS zones for Azure SQL and Key Vault” → privatelink.database.windows.net and privatelink.vaultcore.azure.net. Trap: privatelink.sql.azure.net is not the recommended SQL name.

“Private endpoint created but the VM resolves the public IP” → The private DNS zone is not linked to the VM's vnet (or there is no zone group or custom DNS forwarder). Trap: an NSG block does not change the DNS answer.

“Private endpoint connection state is Pending” → The resource owner must approve it (manual approval, or you lack approval permission). Trap: restarting the endpoint.

“Private endpoint and its vnet” → Same region and subscription as the vnet; the target resource may be in another region. Trap: the target must be in the same region.

“Private endpoint on a storage account” → General-purpose v2 account. Trap: the Blob Storage kind.

“Private endpoint exists but public access still works” → Restrict or disable public network access on the service. Trap: the endpoint blocking public access automatically.

“Apply NSG or UDR to private endpoint traffic” → Enable network policies on the endpoint subnet. Trap: NSGs always apply to endpoints.

“Two services' endpoints sharing one private DNS zone” → Conflict: use one zone per service type. Trap: a single zone for all.

“Only this private endpoint state can send traffic” → Approved. Trap: Pending and Disconnected states also carry traffic.

Sources

Checked against Microsoft Learn on November 13, 2026.

← Azure BastionAzure DNS →