# Public Endpoint and Azure SQL (Entra-only) Considerations

When using an Azure SQL server as part of a customer Azure Managed Application, the connection model differs from a storage account. Azure SQL can be configured for Entra-only authentication, which means that no SQL logins, keys, or connection strings are involved. Access is always based on Microsoft Entra ID tokens from the customer tenant.&#x20;

This section outlines the trade-offs between using a public endpoint with Entra-only authentication versus configuring a private endpoint via VNet integration.&#x20;

![Shape](data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAl4AAAABCAYAAAAPZqCNAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAZSURBVEhL7cExAQAAAMKg9U9tCy8gAAAeagl5AAEdUhn2AAAAAElFTkSuQmCC)&#x20;

### Public Endpoint + Entra-only Authentication:&#x20;

#### Simplicity&#x20;

Using a public endpoint with Entra-only authentication is straightforward:&#x20;

* Azure SQL supports direct Microsoft Entra ID connections from Power BI and other Azure services.&#x20;
* No secrets or keys need to be managed; authentication happens with access tokens from Entra ID.&#x20;

#### Automation and Cost&#x20;

* Low complexity and low cost: no VNet, DNS, or data gateways required.&#x20;
* Automation friendly: identities and permissions can be provisioned through IaC templates.&#x20;
* Managed identities from the Managed Application can be granted least-privilege contained users in the SQL database.&#x20;

#### Security & Governance&#x20;

* No storage keys or passwords: all access goes through Microsoft Entra ID.&#x20;
* Governance can be strictly enforced by:&#x20;
* Restricting access to customer-tenant identities only.&#x20;
* Assigning roles to Managed Identities and service principals with fine-grained RBAC.&#x20;
* Firewall rules on the SQL server can limit exposure to required IP ranges or Azure services.&#x20;

![Shape](data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAl4AAAABCAYAAAAPZqCNAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAZSURBVEhL7cExAQAAAMKg9U9tCy8gAAAeagl5AAEdUhn2AAAAAElFTkSuQmCC)&#x20;

### Private Endpoint via VNet (Customer-managed)&#x20;

#### Setup Complexity&#x20;

Configuring a private endpoint for Azure SQL requires:&#x20;

1. Creating a VNet and subnet for the private endpoint.&#x20;
2. Integrating DNS so that the SQL server’s hostname resolves to the private IP.&#x20;
3. Managing firewall, routing, and network security group (NSG) rules.&#x20;
4. Deploying a VNet Data Gateway for Power BI connectivity, since Power BI cannot connect directly to private endpoints.&#x20;
5. Integration complexity with the other components in the Managed Application.&#x20;

#### Cost & Maintenance&#x20;

* Higher cost due to additional networking infrastructure, DNS zones, and requirement for Power BI Premium/Fabric capacity to run the VNet Data Gateway.&#x20;
* Ongoing maintenance overhead: ensuring gateway uptime, managing DNS resolution, and handling VNet peering or firewall updates.&#x20;

#### Security & Governance&#x20;

* Provides maximum isolation: SQL server is not exposed to the internet.&#x20;
* Full alignment with strict compliance requirements.&#x20;
* Governance at both the network layer (VNet, NSG, firewall) and identity layer (Entra-only authentication).&#x20;

![Shape](data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAl4AAAABCAYAAAAPZqCNAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAZSURBVEhL7cExAQAAAMKg9U9tCy8gAAAeagl5AAEdUhn2AAAAAElFTkSuQmCC)&#x20;

### Argument Summary&#x20;

1. Simplicity & Automation&#x20;

* Public endpoint + Entra-only authentication is the simplest and most automation-friendly path.&#x20;
* No secrets to manage, and no reliance on connection strings.&#x20;

2. Security Trade-offs&#x20;

* Public endpoints are internet-facing, but with Entra-only authentication and firewall rules, risks are minimized.&#x20;
* Private endpoints remove internet exposure but at the cost of complexity, capacity requirements, and higher ongoing operations.&#x20;

3. Governance Controls&#x20;

* Public endpoint + Entra-only auth centralizes governance in Microsoft Entra ID.&#x20;
* Private endpoint adds network-level governance for customers who require full isolation.&#x20;

#### Bsure Insights Setup&#x20;

* Azure SQL per customer: Each customer has a dedicated Azure SQL instance deployed in their subscription via the Managed Application.&#x20;
* Entra-only authentication:&#x20;
* Configure a Microsoft Entra admin on the SQL server.&#x20;
* Create contained principals for:&#x20;
* The Managed Application’s Managed Identity.&#x20;
* The Power BI refresh identity (service principal).&#x20;
* Assign only the necessary database roles (e.g., read-only for reporting).&#x20;
* No keys, no passwords: all authentication is token-based.&#x20;

#### &#x20;Connectivity options:&#x20;

* Public endpoint: Power BI can connect directly using Entra ID authentication, with no gateway required.&#x20;
* Private endpoint: Requires VNet Data Gateway bound to Power BI Premium/Fabric capacity, adding complexity and cost but delivering maximum isolation.&#x20;
