Secure terminal Services (RDP) using Azure Multi-factor Authentication (MFA) – Part 1

Hello Everyone,

In First article of this series, we discussed the general concept of Azure Multifactor Authentication, and how MFA participate in securing your on premise environment and Hybrid one if exist.

In this article we will go in more technical details about how to use Azure Multifactor Authentication using a real example.

One of my customers have a server which contains a highly secure data and only around 6 users have a remote desktop access to that server, the customer need to add more security layer for accessing this server.

I suggest the customer to use Azure MFA, since it will add a highly secure layer to the remote desktop access to the server in addition to the low cost of this service.

so let’s start the technical steps to do that, remember that we need to integrate remote desktop protocol access (RDP) with Azure MFA.

in this part we will prepare the Azure MFA provider and download the MFA server setup files, In next part we will deploy and configure the MFA server to secure the RDP.

First of all let’s summarize the requirements to implement this scenario:

1- we need an azure account (Azure Tenant) to configure and install the Azure setup, if you don’t have account you can sign up for one month as trial, for more info follow this link :

2- integrate RPD protocol with Azure MFA is not supported in windows 2012 R2 (until the date of this article), which means if you need to integrate RPD with Azure MFA you need to install windows 2012 and earlier such as windows 2008 R2.

3- To secure the remote desktop protocol (RDP) with Azure Multifactor, you must install the Azure MFA server in the same RDP server, in other word assume you have a server called “SRV1”, then you should install the MFA setup in the “SRV1” server, if you look back to point #2 you can conclude that you cannot secure the RDP for windows 2012 R2 (until the date of this article).

This deployment called MFA stand alone server since all deployment will be on premise and no integration will be done between local AD and Azure AD.

Now, log in to your azure tenant using, go to active directory tab from left pane:


Now choose MULTI-FACTOR AUTH PROVIDERS option from the top options,


Click New:


MULTI-FACTOR AUTH PROVIDERS used to install the MFA server setup files, also the provider will be responsible for the usage calculations and you can customize your setup from the provide such as fraud alerts.

Now choose App Services -> Active Directory -> MULTI-FACTOR AUTH PROVIDERS – Quick Create.


Name: choose any meaning full name for your provider.
Usage Model: you have two options here, per user enabled and per authentication, this option cannot be changed later, if you need to change it later you must create new provider, the difference between the two model is how Microsoft will charge you, if you choose per enabled user then you will be charged for how many users using MFA regardless of how many actual authentication occurs, if you choose per authentication you will be charged every time the users try to authenticate using Azure MFA.
Directory: choose Don’t link a directory since we will install the stand alone MFA server without integration with Azure AD.

After you fill the required information, click create:


after less than minute a new provider will be available in your tenant as shown below:


Click in the provider just created, then click in the MANAGE button in the bottom of the portal page:


The MFA Management page will appear, click in Downloads button as below:

in the download server page, it’s list the supported OS versions for MFA server including windows 2012 R2 and this is not what I said before, be smart I mentioned that the RPD feature is not supported in windows 2012 R2 but there is a lot of features that work in windows 2012 R2, Now click in Generate Activation Credentials button to generate the credential which will be used to register your server in MFA provider during the setup.


Email and password credential will  be generated, these credential valid to be used within 10 minutes, if you take more than 10 min to start the setup you can re generate a new credentials.


Now click the download text to start the downloading of the MFA setup:


After the download complete, copy the setup file to the server you need to secure the RDP on it and double click on the setup to start the installation.

In Next Part we will continue our demo by installing the multifactor server and configuring it to secure remote desktop access.

So keep tuned 🙂

About Blogger …

Ahmad Yasin (MCSA office 365, MCSE : Messaging, Azure Certified)

Ahmad Yasin (MCSA office 365, MCSE : Messaging, Azure Certified)

Ahmad Yasin in a Microsoft Cloud Engineer and the Owner & publisher of AzureDummies blog. He also hold many certificates in office 365 and windows azure including Developing Microsoft Azure Solutions, Implementing Microsoft Azure Infrastructure Solutions and MCSA office 365.
Ahmad is currently working in Specialized Technical Services Company (STS).
Find Ahmad at Facebook and LinkedIn





  1. You mention that RDP with Azure MFA is not supported in 2012 R2. Any idea when this might change? Seems like a really stupid thing to have it not work with an OS that has been out for several years now.

    I went through the steps for a 2012 R2 RDS server anyways and was able to get a successful test phone call/authentication, but when I log on to the server via RDP with the test account it doesn’t perform the MFA and just allows the test account to log on. I am assuming this is the “not supported” bit?

    • Hello Ethan ,

      Thank you for your comments, yes unfortunately this is not work in windows 2012 R2 and it’s not mentioned by Microsoft when this will be supported, anyway I will post when Microsoft announce the support for this.

  2. Does anyone know how to get this working when the MFA server is installed on a domain controller that is already running NPS. Even logs on the MFA server just say A RADIUS message was received from the invalid RADIUS client IP address **.**.160.3

    Works fine if i install the MFA on a different server, the only problem is the other server is at the end of a VPN and is a little slow to communicate with Azure

    • Hello Will Jones,

      Thank you for your comment, i will release a new article regarding this maybe this week, stay tuned 🙂

  3. I have installed and configured Azure MFA for RDP on my Windows 10 workstation. User test was successful. But when I RDP in to this workstation it doesn’t call my phone to request the PIN. Did I miss something in the setup?

    • My workstation is the Master. Status is Online. Terminal Services is Enabled and “Require Multi-Factor Authentication user match” is selected. I imported my user account from Active Directory. Set up my phone number and a 4 digit PIN. I tested my user account and received the phone call, entering my PIN was successful. But when I remote in to my workstation from another computer I do not get the phone call, but RDP still works.

  4. Hi Ahmad,
    Thanks for all your effort and sharing on the MFA/RD/NPS setup as below. I have followed the steps highlighted so religiously but could not get it to work as expected. As a few people already have posted, the MFA test isn’t a problem but the actual RD –>RG/NPS—->MFA authentication does not work. IS there anything missing in this setup? Please did anyone ever get it working? Any help will be needed. I logged call with Microsoft on this but we are not making any appreciable progress, which is a shame.

  5. Hi, I have the same problem as the others, I have installed and configured Azure MFA for RDP on my Windows Server. User test was successful. But when I RDP in to the server it doesn’t call my phone or send OTP or anything. Did I miss something in the setup? I have tried everything but to no avail

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.