The error The logon attempt failed
may occur for several reasons you are unable to access into RDP in your Windows 11 Pro laptop.
To resolve the issue, check the below steps:
When I attempt to RDP VM in Azure with AAD credentials, I got login attempt failed error.
When creating virtual machine and login with Azure AD ensure that the extension AADLoginForWindows extension.
is Provisioning succeeded like below:


To authorize log into the VM, ensure that you have assigned RBAC role assignment of Virtual Machine Administrator Login and Virtual Machine User Login

Verify whether your computer or virtual machine has joined Azure AD by logging into the Azure VM, open Settings and select Accounts -> Access for work or school. Check your PCs are connected to Azure AD and connect to organization Azure AD.
In system properties -> Remote -> Untick Allow connections only from computers running Remote Desktop with Network Level Authentication like below:

Add Azure AD user to the remote desktop users group on the VM Refer
Additionally, you should make sure that per-user multi-factor authentication is turned off for the user account as it is not supported for Azure AD-joined VMs.
Modify the RDP file and add a username and domain prompts the user to enter the credentials directly like below:

authentication level:i:2
enablecredsspsupport:i:0
username:s:USERNAME@DOMAIN.onmicrosoft.com
domain:s:AzureAD
Using Azure AD-account on VM AzureAD\USERNAME@DOMAIN.onmicrosoft.com
login successfully like below:
