Remote Desktop “Logon attempt failed” with a Microsoft account

December 01, 2026 · Networking

If Remote Desktop says the logon attempt failed when you sign in with a Microsoft account, a local account on the target PC is a workaround that has worked for others. The thread I used is on Microsoft Q&A. The top answer doesn’t explain the cause, so treat this as a workaround.

1. Find the local account name. On the PC you’re connecting to, open PowerShell or Command Prompt and run:

whoami

The output looks like COMPUTERNAME\username. You need the username part.

2. Run a program as that account.

runas /user:.\username "notepad.exe"

Enter that account’s password when prompted. Notepad opens under the local account. Close it.

3. Try RDP again from the other computer, signing in as .\username with the same password.

GUI version: Hold Shift, right-click a shortcut such as PowerShell or Notepad (on Windows 11, choose “Show more options” first), and select “Run as different user.” If the user name is filled in, choose “Use a different account,” then enter .\username.