Hello @SafiyullahSA,
Thank you for posting your query on Microsoft Q&A.
The error message, "Remote machine is AAD" combined with "The logon attempt failed," indicates an issue with how the Azure Virtual Server is attempting to authenticate with the Azure Active Directory joined physical machine.
Here are some of possible causes:
Azure AD Credentials Format:
Azure AD-joined devices typically require credentials in the format AzureAD\username (or .\username if it's a local account).
Ensure you are using this format in the RDP client on the Azure VM. For example, if your username is user@domain.com, try entering AzureAD\user@domain.com for the RDP session.
Credential Issues: Ensure that the credentials being used are correct and have the necessary permissions.
Remote Desktop Settings: The RDP file may not have the necessary configurations. Ensure that the following lines are included in the RDP file:
enablecredsspsupport:i:0
authentication level:i:2
Additionally, please review the following links for troubleshoot: https://stackoverflow.com/questions/62307900/remote-machine-is-aad-but-the-logon-attempt-failed
https://learn.microsoft.com/en-us/troubleshoot/azure/virtual-machines/windows/troubleshoot-rdp-connection
I hope this information is helpful. Please feel free to reach out if you have any further questions.
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".