Skip navigation

Effective October 28, 2019 Duo Security will be transitioning to Cisco's Privacy Statement. View the Duo Privacy Data Sheet.


Duo Authentication for Microsoft Remote Desktop Web on Windows 2012 and Later

Last Updated: April 3rd, 2019

Duo integrates with Remote Desktop Web Access (previously Terminal Services) to add two-factor authentication to RD Web logons, complete with inline self-service enrollment and Duo Prompt.


Duo Authentication for Microsoft Remote Desktop Web Access adds two-factor authentication protection to RD Web portal browser logons. When logging on to the RD Web portal, users receive the Duo enrollment or authentication page after primary authentication.

Remote applications may no longer be launched from the "RemoteApp and Desktop Connections" app feed after Duo is installed on your RD Web server.

Before you begin deploying Duo in your RDS environment, please read our Duo 2FA for Microsoft Remote Desktop Services overview to understand the capabilities and limitations of the different deployment options.

If you want to enforce two-factor authentication for all your clients, you should ensure that they must connect through RD Web Access with Duo and/or RD Gateway with Duo. If clients can establish a direct connection to your RD Connection Broker and/or Session Host(s), then they may be able to bypass two­-factor authentication. Block direct RDP access to these hosts to mitigate the potential for bypass.

Deployment Tip

Set your application's "New user policy" to "Allow Access" while testing. Enrolled users receive the Duo authentication prompt, while all other users are transparently let through.

Then (when you're ready) change the "New user policy" to "Require Enrollment." This forces all your users to authenticate to Duo (or enroll) after RD Web logon.


Make sure to complete these requirements before installing Duo Authentication for RD Web.

  1. Check your server version. These instructions are for installing Duo Authentication for RD Web on Windows Server 2012, 2012 R2, 2016, and 2019. If you are running Windows 2008 R2, see the RD Web 2008 R2 instructions.

  2. Make sure you have installed .NET Framework 4.5. You can do this, for example, by running the following PowerShell commands:

    Import-Module ServerManager
    Add-WindowsFeature NET-Framework-Core
  3. Also make sure you have installed ASP.NET 4.5 support for IIS. The PowerShell commands for this are:

    Import-Module ServerManager
    Add-WindowsFeature NET-Framework-45-ASPNET
  4. Ensure that the IIS Management Scripts and Tools feature is turned on as well. PowerShell example:

    Import-Module ServerManager
    Add-WindowsFeature Web-Scripting-Tools

Connectivity Requirements

This application communicates with Duo's service on TCP port 443. Firewall configurations that restrict outbound access to Duo's service with rules using destination IP addresses or IP address ranges aren't recommended, since these may change over time to maintain our service's high availability. If your organization requires IP-based rules, please review this Duo KB article.

First Steps

  1. Sign up for a Duo account.
  2. Log in to the Duo Admin Panel and navigate to Applications.
  3. Click Protect an Application and locate Microsoft RD Web in the applications list. Click Protect this Application to get your integration key, secret key, and API hostname. (See Getting Started for help.)
  4. Download the Duo Authentication for Remote Desktop Web Installer Package. View checksums for Duo downloads here.

Treat your secret key like a password

The security of your Duo application is tied to the security of your secret key (skey). Secure it as you would any sensitive credential. Don't share it with unauthorized individuals or email it to anyone under any circumstances!


  1. Launch the Duo Security installer MSI from an elevated command prompt (right-click "Command Prompt" and select the "Run as Administrator" option). Accept the license agreement and continue.

  2. Enter the integration key, secret key, and API hostname from the properties page of the "Microsoft RD Web" application you created earlier.

    Enter Duo Information

    If you leave the "Bypass Duo authentication when offline" box in the Duo installer checked, then your users will be able to logon without completing two-factor authentication if the Duo Security cloud service is unreachable. If that box is unchecked then all RD Web login attempts will be denied if there is a problem contacting the Duo service.

    Duo for RD Web sends a user's Windows sAMAccountName to Duo's service by default. To send the userPrincipalName to Duo instead, check the Use UPN username format box.

    If you enable the UPN username format option, you must also change the properties of your RD Web application in the Duo Admin Panel to change the "Username normalization" setting to None. Otherwise, Duo drops the domain suffix from the username sent from RD Web to our service, which may cause user mismatches or duplicate enrollment.

  3. If you only have one Windows Server instance running the Remote Desktop Web Access role, select the option to automatically generate a new key. However, if you have multiple servers running RD Web Access role then you should manually generate a random string at least 40 characters long, and use the same string as the session key during installation on each of the servers.

    Create Session Key

    For example, you could use the following PowerShell commands to generate a suitable session key:

    $bytes = new-object "System.Byte[]" 30
    (new-object System.Security.Cryptography.RNGCryptoServiceProvider).GetBytes($bytes)
  4. Complete the Duo installation. The Duo installer stops and then restarts IIS services on your RD Web server automatically.

Test Your Setup

To test your setup, log into Remote Desktop Web Access. Duo's enrollment or login prompt appears after you enter your username and password:

RD Web Duo Authentication Prompt

With Duo installed on only the RD Web server, when you launch a RemoteApp there is no additional two-factor authentication verification. If your session host is configured to use RD Gateway we recommend installing Duo on your RD Gateway server as well. See the RD Web and RD Gateway instructions.

If you installed Duo Authentication for both RD Web and RD Gateway, you receive an additional Duo authentication request via push or phone call when you launch a RemoteApp.

Updating Duo for RD Web

You can upgrade your Duo installation over the existing version; there's no need to uninstall first.

  1. Download the most recent Duo RD Web Installer Package and run the MSI from an elevated command prompt. View checksums for Duo downloads here.

  2. Follow the on-screen prompts to complete the upgrade installation. Note that the installer restarts IIS services.


Need some help? Take a look at the RDS Frequently Asked Questions (FAQ) page or try searching our RDS Knowledge Base articles or Community discussions. For further assistance, contact Support.