Home › Studies › AZ-700 › Private Access › Service Endpoints

Service Endpoints

When to use · creating endpoints · service endpoint policies · access from on-premises

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

Practice questions for this topic →

What a service endpoint does

A service endpoint extends your virtual network identity to an Azure service over the Azure backbone. You then add a virtual network rule on the service so that only your subnet can reach it. Microsoft recommends Private Link and private endpoints for private access to Azure services.

Service endpointPrivate endpoint
Address usedService keeps its public IP; DNS is unchangedPrivate IP in your subnet; DNS must resolve to it
ScopeEnabled per service, per subnetOne endpoint per resource and subresource
From on-premisesNot usable; allow public or NAT IPs in the service firewallReachable over VPN or ExpressRoute
Extra costNoneSee Azure Private Link pricing

Supported services

ServiceEndpoint resource
Azure StorageMicrosoft.Storage
Azure Storage cross-regionMicrosoft.Storage.Global
Azure SQL DatabaseMicrosoft.Sql
Azure Cosmos DBMicrosoft.AzureCosmosDB
Azure Key VaultMicrosoft.KeyVault
Azure Service BusMicrosoft.ServiceBus
Azure Event HubsMicrosoft.EventHub
Azure App ServiceMicrosoft.Web
Azure Cognitive ServicesMicrosoft.CognitiveServices
Azure Container RegistryMicrosoft.ContainerRegistry

Select the Microsoft.* resource on the subnet side. The service side then needs a virtual network rule (for Storage, set the default action to Deny and add a network rule for the subnet).

Creating service endpoints

Service endpoint policies

A service endpoint policy filters egress traffic over service endpoints to specific Azure Storage accounts. It stops data exfiltration to other accounts. NSG service tags only restrict by region, so they still allow any account in that region.

ItemRule
ServiceAzure Storage (generally available in all global regions)
Applied toA subnet that already has the Microsoft.Storage service endpoint
Scope of an entryA subscription, a resource group, or one storage account (resource ID)
No policy on the subnetAll storage accounts are reachable
Policy attachedOnly listed accounts; everything else is denied (allow policy)
Multiple policiesAllowed on one subnet; traffic to resources in any of them is allowed
Endpoint scopeBecomes global when a policy is applied

Access and verification

CLI and PowerShell

TaskAzure CLIPowerShell
Add a subnet with a Storage service endpointaz network vnet subnet create --vnet-name vnet-1 --resource-group test-rg --name subnet-1 --address-prefix 10.0.0.0/24 --service-endpoints Microsoft.StorageAdd-AzVirtualNetworkSubnetConfig @subnet
Deny public access to a storage account by defaultaz storage account update --name $storageAcctName1 --resource-group test-rg --default-action Deny-
Allow a subnet in the storage firewallaz storage account network-rule add --resource-group test-rg --account-name $storageAcctName1 --vnet-name vnet-1 --subnet subnet-1Add-AzStorageAccountNetworkRule @networkRuleParams1
Create a service endpoint policyaz network service-endpoint policy create --resource-group test-rg --name service-endpoint-policy --location westus2New-AzServiceEndpointPolicy @sepolicyParams
Add a policy definitionaz network service-endpoint policy-definition create --resource-group test-rg --policy-name service-endpoint-policy --name policy-definition --service "Microsoft.Storage" --service-resources $serviceResourceIdNew-AzServiceEndpointPolicyDefinition @policyDefinitionParams
Associate the policy with a subnetaz network vnet subnet update --vnet-name vnet-1 --resource-group test-rg --name subnet-1 --service-endpoints Microsoft.Storage --service-endpoint-policy service-endpoint-policySet-AzVirtualNetworkSubnetConfig @subnetConfigParams

Exam Tips

Tick each tip once you can answer it without looking.

“Secure a PaaS service to a subnet, no extra cost, no private IP or DNS changes” → Service endpoint plus a virtual network rule. Trap: a private endpoint adds a private IP and DNS changes.

“Microsoft's recommended way to reach Azure PaaS privately” → Private Link and private endpoints. Trap: service endpoints keep the service on its public IP.

“On-premises clients must reach a storage account secured with service endpoints” → Allow the on-premises public or NAT IPs in the storage firewall. Trap: service endpoints cannot be used for on-premises traffic.

“Use a service endpoint for a service in a subnet” → Enable it per service, per subnet. Trap: enabling at the virtual network level.

“Enable an endpoint on a busy subnet” → Expect open TCP connections to the service to close. Trap: the switch from public to private source IP drops them.

“Storage firewall allows an Azure public IP; breaks after the endpoint is enabled” → The source IP is now the private address; use a virtual network rule. Trap: IP rules for Azure public IPs stop working.

“Restrict a subnet to only specific storage accounts” → Service endpoint policy. Trap: NSG service tags allow every account in the region.

“Which service do service endpoint policies cover?” → Azure Storage. Trap: assuming SQL or Key Vault.

“Policy attached; a classic storage account stops working” → Classic accounts are denied by default; policies need Resource Manager accounts. Trap: adding the account ID to the policy.

“Subnet with no service endpoint policy” → All storage accounts are reachable. Trap: a policy applies only once attached.

“Subnet has several service endpoint policies” → Traffic to resources in any of them is allowed; the rest is denied. Trap: a resource is allowed if any one attached policy lists it.

“Policy for peered virtual networks” → Apply the policy to each virtual network's subnet. Trap: it does not follow peering.

“Policy must be in a different region than the virtual network” → Not supported: same region and subscription. Trap: cross-region policies.

“Azure SQL Database with a service endpoint” → Virtual network must be in the same region as the resource. Trap: other services allow any region.

“Check that the endpoint is in effect” → Effective routes show next hop VirtualNetworkServiceEndpoint; service logs show the private source IP. Trap: checking DNS: it still returns a public IP.

“Who may secure a service to a subnet?” → Needs joinViaServiceEndpoint/action on the subnet. Trap: write access to the virtual network alone covers only configuring the endpoint.

Sources

Checked against Microsoft Learn on November 13, 2026.

← Private Link & Private EndpointsPrivate Access overview →