# Use Private Endpoints to Secure Azure Service Network Traffic Within VNets

- Source: https://support.icompaas.com/support/solutions/articles/62000234781-use-private-endpoints-to-secure-azure-service-network-traffic-within-vnets
- Section: [Solutions](https://support.icompaas.com/support/solutions) › [Azure Database Services Benchmark v1.0.0](https://support.icompaas.com/support/solutions/62000112693) › [Azure Database Services Benchmark](https://support.icompaas.com/support/solutions/folders/62000169261)
- Last updated: 2026-05-29
- Publisher: iCompaas, Inc. (https://www.icompaas.com)

**Profile Applicability:**

-   **Level 2**  
    

**Description:** Private endpoints limit network traffic to approved sources by allowing resources to connect to Azure services over a private IP address within the Virtual Network (VNet). This ensures that traffic does not traverse the public internet.

**Rationale:** Private endpoints provide a more secure communication channel by ensuring that network traffic between services remains within a private network, protecting sensitive data from potential exposure over the internet. It also ensures better control over the communication and improves overall network security.

**Impact:**

-   Pros:  
    
    -   Reduces exposure to external threats by restricting service access to private IPs.  
        
    -   Ensures that all communication is handled within the trusted network environment.  
        
    -   Improves compliance by ensuring data does not flow over the public internet.  
        
-   Cons:  
    
    -   May require changes to the network architecture, especially when scaling services.  
        
    -   Requires careful configuration to ensure that necessary services can still communicate without issues.  
        

**Default Value:**

-   By default, Azure services do not have private endpoints enabled and are accessible via public IP addresses unless configured otherwise.  
    

**Pre-requisites:**

-   A Virtual Network (VNet) and appropriate subnet must be in place.  
    
-   Ensure that Azure services support private endpoints and have been configured for this purpose.  
    

**Remediation**

**Test Plan:**

**Using Azure Portal:**

1.  Open the Azure Portal: [https://portal.azure.com](https://portal.azure.com/).  
    
2.  Navigate to the Azure Cosmos DB (or relevant service).  
    
3.  Select the Networking option.  
    
4.  Ensure Public network access is set to Selected networks.  
    
5.  Under Private access, verify that a Private Endpoint is created and that its connection state is Approved.  
    

**Using Azure CLI:** 1. Run the following command to verify that the private endpoint is in use:

az cosmosdb show --resource-group <resource-group-name> --name <cosmos-db-name> --query "properties.privateEndpointConnections"

  

-   The output should indicate that the private endpoint connection is approved.  
    

**Implementation Plan:**

**Using Azure Portal:**

1.  Go to Azure Cosmos DB (or relevant service).  
    
2.  Navigate to Networking and select Private access.  
    
3.  Click + Private Endpoint.  
    
4.  Provide a Name and select Next.  
    
5.  Choose the Resource type and select Microsoft.AzureCosmosDB/databaseAccounts.  
    
6.  Provide appropriate VNet and DNS configurations.  
    
7.  Click Review + Create, then click Create to set up the private endpoint.  
    

**Using Azure CLI:** 1. To create a private endpoint for a Cosmos DB instance, run the following:

az cosmosdb update --resource-group <resource-group-name> --name <cosmos-db-name> --set privateEndpointConnections\[0\].privateLinkServiceConnectionState.status=Approved

  

**Backout Plan:**

**Using Azure Portal:**

1.  Go to Azure Cosmos DB (or the relevant service).  
    
2.  Under Networking, click Private access.  
    
3.  Delete the private endpoint or revert it to using public access if required.  
    

**Using Azure CLI:**  
1.  To remove the private endpoint, run:

az cosmosdb update --resource-group <resource-group-name> --name <cosmos-db-name> --set privateEndpointConnections\[0\].privateLinkServiceConnectionState.status=Rejected

  

References:

-   [Azure Cosmos DB - Configure Private Endpoints  
    ](https://learn.microsoft.com/en-us/azure/cosmos-db/how-to-configure-private-endpoints)
    
-   [Private Link Overview  
      
    ](https://learn.microsoft.com/en-us/azure/private-link/tutorial-private-endpoint-cosmosdb-portal)

## Related compliance guidance

- [SOC 2 compliance: a practical implementation guide for cloud-native SaaS teams](https://support.icompaas.com/compliance/soc-2-trust-services-criteria): Configuration checks like this one are the technical half of a SOC 2 / ISO 27001 programme — the guide shows where they fit, what else an auditor expects, and how to evidence them.
- [ISO/IEC 27001:2022 compliance: a practical implementation guide](https://support.icompaas.com/compliance/iso-27001-2022): ISO 27001 Annex A.8 (technological controls) is where cloud hardening evidence lands; the guide shows how to run the ISMS around it.
