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

# RDP NLA con Entra ID (problema PKU2U)

Durante la connessione ai sistemi tramite RDP con Entra ID, gli utenti riscontrano spesso l'errore "Le credenziali non hanno funzionato". Questo problema deriva dal protocollo PKU2U, che non è abilitato per impostazione predefinita in Windows.

### Soluzione 1: disabilitare RDP NLA

Disabilitare RDP NLA può risolvere il problema, ma non è consigliato per motivi di sicurezza.

### Soluzione 2: far funzionare RDP NLA con Entra ID (consigliata)

Per far funzionare RDP NLA con Entra ID è necessario soddisfare alcuni requisiti. È la soluzione consigliata anche se il processo è più complesso.

#### PKU2U sul client e sul server RDP

PKU2U deve essere abilitato sia sul client sia sul server RDP. Utilizzi uno dei metodi seguenti.

**Metodo tramite criteri di gruppo**

1. Apra l'Editor Criteri di gruppo (gpedit.msc).
2. Vada in ***Configurazione computer – Impostazioni di Windows – Impostazioni sicurezza – Criteri locali – Opzioni di sicurezza***.
3. Abiliti ***Protezione di rete: consentire alle richieste di autenticazione PKU2U a questo computer di usare identità online***.
4. Riavvii il server.

**Metodo tramite PowerShell**

1. In PowerShell, esegua il comando seguente:

   ```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. Riavvii il server.

#### Accesso a Windows

È necessario aver effettuato l'accesso a Windows con lo stesso account Entra ID oppure essere workplace joined con lo stesso utente Entra ID. Tenga presente che è possibile essere workplace joined con un massimo di tre utenti contemporaneamente.

1. Sulla sua macchina Windows, vada in ***Impostazioni – Account – Email e account***.
2. Clicchi su ***Aggiungi un account aziendale o dell'istituto di istruzione***.
3. Inserisca le sue credenziali Entra ID, quindi clicchi su ***Accedi***.
4. Attenda il completamento del workplace join di Entra ID.

#### Formato corretto del nome utente

* In MSTSC: utilizzi il formato "EntraID\\<user@domain.com>".
* In un file RDP: utilizzi il formato ".\EntraID\\<user@domain.com>" e lasci vuoto il dominio.
* In Remote Desktop Manager: abiliti l'opzione ***Host Entra ID*** nelle proprietà generali della voce RDP.

{% hint style="info" %}
Consulti l'articolo completo per maggiori informazioni: [RDP NLA with Entra ID: The PKU2U Nightmare](https://awakecoding.com/posts/rdp-nla-with-azure-ad-the-pku2u-nightmare/).
{% endhint %}

#### Vedere anche

* [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, and the optional `goal` query parameter:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
