Forum Discussion
Setting up a connection using a Virtual Network Data Gateway to an Azure SQL Database
- 9 months ago
Hi RosG ,
The behavior you’re seeing is expected with the current VNet Data Gateway. The gateway doesn’t support Azure AD / Entra (OAuth) authentication for SQL Server, which is why your Entra MFA login works fine in SSMS but not through the gateway. SSMS supports modern authentication, whereas the VNet gateway can only connect to SQL Server using a SQL username and password. Because of that, Entra MFA succeeds in SSMS, fails through the gateway, and SQL authentication is the only method that works when using the VNet gateway.For reference, here are the Microsoft docs:
VNet Data Gateway
Use virtual network data gateway and data sources in Power BI | Microsoft Learn
Azure SQL – Entra Authentication Overview (explains why SSMS works)
https://learn.microsoft.com/en-us/azure/azure-sql/database/authentication-aad-overview
If you require Entra-based authentication, the supported alternative is to use Managed VNet / Dataflows Gen2, which do support Entra ID and Managed Identity, unlike the VNet Data Gateway.
Hi v-sshirivolu,
I've done all of the above.
Not only can I not get the connection working with a service principal, I also can't get it to work using OAuth with my own Azure credentials. So, from SQL management studio, I can create a connection using 'Microsoft Entra MFA', but I can't use the same credentials via the VNet data gateway selecting OAuth 2.0 authentication.
I might have misunderstood, but it seems to me that I can authenticate with the SQL server via the gateway using a SQL server account, but not using Entra and I can authenticate using Entra but not via the gateway, so I'm not sure where to look next.
Hi RosG ,
The behavior you’re seeing is expected with the current VNet Data Gateway. The gateway doesn’t support Azure AD / Entra (OAuth) authentication for SQL Server, which is why your Entra MFA login works fine in SSMS but not through the gateway. SSMS supports modern authentication, whereas the VNet gateway can only connect to SQL Server using a SQL username and password. Because of that, Entra MFA succeeds in SSMS, fails through the gateway, and SQL authentication is the only method that works when using the VNet gateway.
For reference, here are the Microsoft docs:
VNet Data Gateway
Use virtual network data gateway and data sources in Power BI | Microsoft Learn
Azure SQL – Entra Authentication Overview (explains why SSMS works)
https://learn.microsoft.com/en-us/azure/azure-sql/database/authentication-aad-overview
If you require Entra-based authentication, the supported alternative is to use Managed VNet / Dataflows Gen2, which do support Entra ID and Managed Identity, unlike the VNet Data Gateway.
- v-sshirivolu9 months agoCommunity Support
Hi RosG ,
I hope the above details help you fix the issue. If you still have any questions or need more help, feel free to reach out. We’re always here to support you