Based on this old thread :
First you need to Configure the Azure VPN Client - Azure AD authentication - Windows
Then :
- Navigate to "Firewalls and virtual networks" of you SQL server and make sure to set "Deny public network access" to yes.
- Create an Azure private endpoint. It will create endpoint for SQL server within your virtual network and it'll be assigned a private IP from within subnet's IP range. You will use this private IP to connect to SQL server.
- On your local machine, make sure you're connected to VPN and open SQL Server Management Studio:
- Under "Server name" enter private IP address of Azure private endpoint created in step 2.
- Under "Login" field, enter username in format "username@public_sql_server_name" (e.g. admin@my-sql-server.database.windows.net). For password, just enter your password.
- Last thing to do is to click on "Options" and navigate to "Connection properties". Make sure to check "Encrypt connection" and "Trust server certificate". This is required as server's certificate is issued to "my-sql-server.database.windows.net" and you're accessing it via private IP. If this wasn't checked, management studio wouldn't trust server's certificate and would refuse connection.
- Navigate to "Firewalls and virtual networks" of you SQL server and make sure to set "Deny public network access" to yes.
- Create an Azure private endpoint. It will create endpoint for SQL server within your virtual network and it'll be assigned a private IP from within subnet's IP range. You will use this private IP to connect to SQL server.
- On your local machine, make sure you're connected to VPN and open SQL Server Management Studio:
Under "Server name" enter private IP address of Azure private endpoint created in step 2.
Under "Login" field, enter username in format "username@public_sql_server_name" (e.g. admin@my-sql-server.database.windows.net). For password, just enter your password.
Last thing to do is to click on "Options" and navigate to "Connection properties". Make sure to check "Encrypt connection" and "Trust server certificate". This is required as server's certificate is issued to "my-sql-server.database.windows.net" and you're accessing it via private IP. If this wasn't checked, management studio wouldn't trust server's certificate and would refuse connection.