Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"Remote machine is AAD" but "The logon attempt failed"

I setup Remote Desktop Connection and the computer says: AzureAD\username already has access:

enter image description here

Very good, let's try to connect using AzureAD\username:

enter image description here

Unfortunately it says:

Your credential did not work. Remote machine is AAD joined. If you are signing in to your work account, try using your work email address.

Of course it didn't work. Any idea?

like image 780
Francesco Mantovani Avatar asked Jun 10 '20 15:06

Francesco Mantovani


People also ask

How do I connect a machine to AAD?

Open Settings, and then select Accounts. Select Access work or school, and then select Connect. On the Set up a work or school account screen, select Join this device to Azure Active Directory. On the Let's get you signed in screen, type your email address (for example, [email protected]), and then select Next.


3 Answers

To successfully connect to an AzureAD joined computer using Remote Desktop, you will need to first save your connection settings to a .rdp file.

To do this, open the Remote Desktop Connection program, enter the IP Address or computer name, then click the "Save As" button at the bottom of the screen. Save it someplace convenient, since we'll need to edit this file by hand.

Next, Right-Click the saved .rdp file and open with Notepad.

Go to the very bottom of the file, add the following lines:

enablecredsspsupport:i:0
authentication level:i:2

Save the file and close.

Now, try double clicking the modified .rdp file and login using the format:

AzureAD\YourFullUsername

Screenshots, original information and credit go to bradleyschacht.com

like image 62
SnakeDoc Avatar answered Oct 17 '22 00:10

SnakeDoc


from your window, it doesn't seem like you logged in with an azuread account, try with [email protected] as a username?

as per here:https://learn.microsoft.com/en-us/windows/client-management/connect-to-remote-aadj-pc

When you connect to the remote PC, enter your account name in this format: AzureAD UPN. The local PC must either be domain-joined or Azure AD-joined. The local PC and remote PC must be in the same Azure AD tenant.

like image 38
alphaz18 Avatar answered Oct 17 '22 00:10

alphaz18


As long as RDP is enabled on the remote machine and the user you are trying to logon is with authorized, it should work.

The Azure Active Directory username is not exactly clear though.

Joined computer via '[email protected]', an Azure Active Directory domain account.

Computer shows 'AzureAD\FirstNameLastName' as authorized for RDP since it's an administrator account.

Must use 'AzureAD\[email protected]' for RDP username.

No other settings changes needed, no manual editing of RDP file just had to get the username right.

like image 1
Montané Hamilton Avatar answered Oct 17 '22 00:10

Montané Hamilton