> For the complete documentation index, see [llms.txt](https://docs.devolutions.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.devolutions.net/rdm/knowledge-base/troubleshooting-articles/rdp-nla-with-entra-id-pku2u-issue.md).

# 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**

1. Open the Group Policy Editor (gpedit.msc).
2. Navigate to ***Computer Configuration – Windows Settings – Security Settings – Local Policies – Security Options***.
3. Enable ***Network security: Allow PKU2U authentication requests to this computer to use online identities***.
4. Reboot the server.

**PowerShell method**

1. In PowerShell, run the following command:

   ```powershell
   $Pku2uRegPath = 'HKLM:\SYSTEM\CurrentControlSet\Control\Lsa\Pku2u'
   New-Item -Path $Pku2uRegPath -Force | Out-Null
   Set-ItemProperty -Path $Pku2uRegPath -Name 'AllowOnlineID' -Value '1' -Type DWORD
   ```
2. Reboot 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.

1. On your Windows machine, navigate to ***Settings – Accounts – Email & accounts***.
2. Click on ***Add a work or school account***.
3. Enter your Entra ID credentials, then click ***Sign in***.
4. 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.

{% hint style="info" %}
Refer to the full article for more information: [RDP NLA with Entra ID: The PKU2U Nightmare](https://awakecoding.com/posts/rdp-nla-with-azure-ad-the-pku2u-nightmare/).
{% endhint %}

#### See also

* [RDP NLA with Azure AD: The PKU2U Nightmare](https://awakecoding.com/posts/rdp-nla-with-azure-ad-the-pku2u-nightmare/)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.devolutions.net/rdm/knowledge-base/troubleshooting-articles/rdp-nla-with-entra-id-pku2u-issue.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
