As part of the announcements from Ignite, Microsoft now released a public preview of the native Azure AD authentication on VPN Gateway. Up until now it has been either that you use a certificate based authentication or using RADIUS. Which has been a difficult sell since many VPN providers do pretty well the authentication part.

What do I need to set it up?

To set this up you first need to have an active subscription and gateway that you can configure this on. The existing Gateway that you have needs to have P2S enabled, using OpenSSL and just Azure Certificate based authentication, which you then will use to configure Azure AD authentication on. NOTE: Azure AD Authentication is only working for Windows 10 clients. 

Now you need to following information:

1: Subscription ID
2: Azure AD Tenant ID
3: Name of the VPN Gateway
4: Resource Group name of the tenant

First is you need to give constent to authorize the VPN client this adds an app registration to your Azure AD Client.

1: Constent to the application:

2: Apply the VPN Configuration:
$gw = Get-AzVirtualNetworkGateway -Name <name of VPN gateway> -ResourceGroupName <Resource group>
Set-AzVirtualNetworkGateway -VirtualNetworkGateway $gw -AadTenantUri “<your Directory ID>” -AadAudienceId “41b23e61-6c1e-4545-b367-cd054e0ed4b4” -AadIssuerUri “<your Directory ID>/”

3: Create the VPN Configuration:
$profile = New-AzVpnClientConfiguration -ResourceGroupName AADAuth -Name AADauthGW -AuthenticationMethod “EapTls”


This will create an URL which you can use to download the VPN Profile, which contains an XML file, which you are going to use to in the client.

<cert i:nil="true"/>
<usernamepass i:nil="true"/>

You can download the client from here –> (This is essentially a UI Wrapper on top of OpenVPN that handles the Azure AD authentication)  

Once you’ve installed the client. You need to import the configuration file that you downloaded earlier within the UI

Then all the fields will get pre filled with the information from the configuration file.

Then you can just authenticate with the client.

Setting up Conditional Access Rules for Azure VPN

Using Native Azure AD based authentication, this means that you can use Conditional Access to block and allow access to the service and have a more granular way to handle authentication as well. To allow for a zero-trust model based access.

To create this you basically just need to apply policies for the VPN application, which will be generated as part of the setup. Such as applying MFA and other Conditions that you might want to have in place for each users.

So with this now you don’t need a third party VPN solution to enable zero-trust access to your Azure virtual enviroment which help to provide secure access to enviroments.



Categories: Uncategorized


Leave a Reply

Your email address will not be published.