- What a service endpoint is and how it works.
- How to enable service endpoints on a subnet so resources in that subnet can securely access supported Azure services.

- A service endpoint extends your virtual network identity to a supported Azure service. When enabled on a subnet, traffic to the selected PaaS service (for example, Azure Storage or Azure SQL Database) stays on the Microsoft backbone instead of going over the public internet.
- The PaaS service can then be configured to accept traffic only from the virtual network/subnet — effectively using the VNet/subnet IP range as an allowlist.
- You enable one or more service endpoints on a subnet and select which Azure service namespace(s) (for example,
Microsoft.Storage) are allowed. - Resources in that subnet (VMs, App Service Environment, etc.) route to the PaaS service using Azure’s internal network.
- The PaaS service sees the request coming from the VNet/subnet and can enforce firewall rules to allow only that VNet/subnet.
- Traffic remains on Microsoft’s private backbone, improving security and reducing exposure to the internet.
- You can lock down service-level firewalls to accept traffic only from specific VNets/subnets.
- Simple to configure and useful for many common scenarios where private connectivity is required but private endpoints are not feasible.
| Service endpoint namespace | Typical Azure service |
|---|---|
Microsoft.Storage | Azure Storage (Blob, File, etc.) |
Microsoft.Sql | Azure SQL Database |
Microsoft.DocumentDB | Azure Cosmos DB |
Microsoft.EventHub | Event Hubs |
Microsoft.ServiceBus | Service Bus |
Microsoft.ContainerRegistry | Azure Container Registry |
Service endpoints are often the fastest way to lock down access to a PaaS service from a VNet. However, for scenarios that require private IP addresses inside your VNet, DNS-based resolution of the service endpoint, or finer-grained resource-level access, consider using Private Endpoints instead. See the “Considerations” section below.
-
Azure Portal (GUI)
- Navigate to your Virtual Network > Subnets.
- Select the subnet you want to modify.
- Under “Service endpoints”, click Add, then choose the service namespace(s) (for example, Storage).
- Save the subnet settings. Next, configure the target PaaS resource’s firewall to allow the VNet/subnet.
- Azure CLI
- Azure PowerShell
- Service Endpoint Policies let you restrict which service resources (for example, which Storage accounts) a subnet can access even when the service endpoint is enabled. This provides control over which specific service instances are reachable.
- Network Security Groups (NSGs) are applied to subnets and still control traffic flow; enabling a service endpoint does not bypass NSG rules.
- Service endpoints do not provide a private IP address for the PaaS service within your VNet. For a private IP in your VNet, use Private Endpoints.
- Some services are better secured with Private Endpoints (preview: using private DNS zones and private IPs). Review each service’s security model before deciding.
- Service endpoints rely on the Azure backbone; cross-region behavior should be verified for your architecture and compliance requirements.
- Ensure your PaaS resource firewall rules are configured to accept VNet/subnet traffic after enabling the endpoint.
Private Endpoints provide stronger isolation and a private IP address in your VNet. If your compliance or security requirements mandate private IPs or resource-level access control, prefer Private Endpoints over Service Endpoints.
- Locking down an Azure Storage account to only accept traffic from a production VNet/subnet.
- Allowing backend VMs in a subnet to access a managed SQL Database without traversing the internet.
- Using Service Endpoint Policies to ensure a subnet can only reach approved storage accounts.
- Azure Virtual Network service endpoints overview
- Use service endpoints to secure Azure Storage and SQL
- Azure Private Endpoint overview (differences vs service endpoints)
- Practice enabling a service endpoint on a non-production subnet and verify traffic flows via the Microsoft backbone.
- Configure a Storage account firewall to allow your VNet and confirm access from a VM in that subnet.