> 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/da/knowledge-base/troubleshooting-articles/rdp-nla-with-entra-id-pku2u-issue.md).

# RDP NLA med Entra ID (PKU2U-problem)

Ret fejlen med RDP NLA, hvor legitimationsoplysningerne ikke virkede, med Entra ID ved at aktivere protokollen PKU2U på både RDP-klienten og serveren.

Når der oprettes forbindelse til systemer ved hjælp af RDP med Entra ID, støder brugerne ofte på fejlen "Your credentials did not work". Problemet stammer fra protokollen PKU2U, som ikke er aktiveret som standard i Windows.

### Løsning 1: Deaktiver RDP NLA

Deaktivering af RDP NLA kan løse problemet, men anbefales ikke af sikkerhedsmæssige årsager.

### Løsning 2: Få RDP NLA til at virke med Entra ID (anbefales)

Nogle krav skal være opfyldt, for at RDP NLA kan virke med Entra ID. Det er den anbefalede løsning, selvom processen er mere kompleks.

#### PKU2U på RDP-klienten og serveren

PKU2U skal være aktiveret på både RDP-klienten og serveren. Brug en af metoderne nedenfor.

**Metode med gruppepolitik**

1. Åbn Editor til gruppepolitik (gpedit.msc).
2. Gå til ***Computerkonfiguration – Windows-indstillinger – Sikkerhedsindstillinger – Lokale politikker – Sikkerhedsindstillinger***.
3. Aktivér ***Netværkssikkerhed: Tillad, at PKU2U-godkendelsesanmodninger til denne computer bruger onlineidentiteter***.
4. Genstart serveren.

**PowerShell-metode**

1. Kør følgende kommando i PowerShell:

   ```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. Genstart serveren.

#### Windows-logon

De skal enten være logget på Windows med den samme Entra ID-konto eller være tilsluttet arbejdspladsen med den samme Entra ID-bruger. Bemærk, at De kun kan være tilsluttet arbejdspladsen med op til tre brugere på samme tid.

1. På Deres Windows-computer skal De gå til ***Indstillinger – Konti – E-mail & konti***.
2. Klik på ***Tilføj en arbejds- eller skolekonto***.
3. Indtast Deres Entra ID-legitimationsoplysninger, og klik derefter på ***Log på***.
4. Vent på, at tilslutningen til Entra ID-arbejdspladsen fuldføres.

#### Korrekt format for brugernavn

* I MSTSC: Brug formatet "EntraID\\<user@domain.com>".
* I en RDP-fil: Brug formatet ".\EntraID\\<user@domain.com>", og lad domænet være tomt.
* I Remote Desktop Manager: Aktivér valgmuligheden ***Entra ID-vært*** i RDP-postens generelle egenskaber.

{% hint style="info" %}
Se den fulde artikel for flere oplysninger: [RDP NLA med Entra ID: PKU2U-mareridtet](https://awakecoding.com/posts/rdp-nla-with-azure-ad-the-pku2u-nightmare/).
{% endhint %}

#### Se også

* [RDP NLA med Azure AD: PKU2U-mareridtet](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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
