RDP NLA with Entra ID (PKU2U issue)
When connecting to systems using RDP with Entra ID, users often encounter the "Your credentials did not work" error. This issue stems from the PKU2U protocol, which is not enabled by default in Windows.
Solution 1: Disable RDP NLA
Disabling RDP NLA can resolve the issue but is not recommended due to security concerns.
Solution 2: Make RDP NLA work with Entra ID (recommended)
Some requirements need to be met for RDP NLA to work with Entra ID. It is the recommended solution even if the process is more complex.
PKU2U on the RDP client and server
PKU2U needs to be enabled on both the RDP client and server. Use one of the methods below.
Group policy method
Open the Group Policy Editor (gpedit.msc).
Navigate to Computer Configuration – Windows Settings – Security Settings – Local Policies – Security Options.
Enable Network security: Allow PKU2U authentication requests to this computer to use online identities.
Reboot the server.
PowerShell method
In PowerShell, run the following command:
$Pku2uRegPath = 'HKLM:\SYSTEM\CurrentControlSet\Control\Lsa\Pku2u' New-Item -Path $Pku2uRegPath -Force | Out-Null Set-ItemProperty -Path $Pku2uRegPath -Name 'AllowOnlineID' -Value '1' -Type DWORDReboot the server.
Windows login
You need to either be logged into Windows with the same Entra ID account or be workplace joined with the same Entra ID user. Note that you can only be workplace joined with up to three users at the same time.
On your Windows machine, navigate to Settings – Accounts – Email & accounts.
Click on Add a work or school account.
Enter your Entra ID credentials, then click Sign in.
Wait for the Entra ID workplace join to complete.
Correct username format
In MSTSC: Use the format "EntraID\user@domain.com".
In a RDP file: Use the format ".\EntraID\user@domain.com" and leave the domain empty.
In Remote Desktop Manager: Enable the Entra ID host option in the RDP entry general properties.
See also
Last updated
Was this helpful?