Using a private endpoint to connect an App Service to SQL Server on Azure VMs
You have an Azure subscription that contains SQL Server on Azure virtual machines located in the West US Azure region. The virtual machines are only accessible by using private IP addresses. You plan to deploy a Windows-based Azure App Service web apps in the East US Azure region. You need to recommend a solution to provide the web apps access to the SQL Server databases. What should you include in the recommendation?
Community Votes
71% of anonymous learners picked answer B. Votes are pick records left by other test-takers — they are not the verified answer.
Community Insight
A private endpoint provides secure private connectivity to the SQL servers; a service endpoint is regional (same region only) and Bastion is for management access, not app data; a VPN gateway is heavier than the required private link.
To let an Azure App Service web app privately reach SQL Server on Azure VMs (private IP only) across regions, use a private endpoint, which gives the web app a private connection to the SQL servers without exposing them publicly.
Choosing a service endpoint (C) — it works only within the same region (East US web app to West US SQL would fail) and is for PaaS, not for reaching a cross-region SQL VM privately.
Community Discussion (6 comments)
Comments & Corrections
No comments yet — spotted an error or have a note? Share it below.
Expert Analysis
Why the Answer Is Correct
A private endpoint provides a private IP-based connection from the App Service's network into the SQL Server environment, allowing the web apps to reach the SQL Server databases over private addresses without public exposure, and it works across Azure regions.Why the Other Options Are Wrong
A service endpoint (C) is regional only and cannot connect an East US web app to a West US SQL VM. Azure Bastion (D) is for administrative RDP/SSH access, not application data paths. An Azure VPN gateway (A) is a heavier connectivity option than the private link the scenario needs.Community Comment Notes
The community favored B (71 votes). Comments cite the private-link FAQ confirming private endpoints can connect across regions, and note the SQL VM's private-only accessibility makes a private endpoint the fit; a minority (A, 29 votes) suggested a VPN gateway.Official Reference
Related Analysis
Practice All SC-100 Questions
Access 110 questions with complete answers and detailed explanations.
View Full SC-100 Practice Test →