This web page requires JavaScript to be enabled.

JavaScript is an object-oriented computer programming language commonly used to create interactive effects within web browsers.

How to enable JavaScript?

Remote Desktop on Windows 11 with Microsoft Account MFA

Blog November 2, 2021 17

This is the guide to use Remote Desktop on Windows 11 Pro with Microsoft Account logged in and enabled MFA.

Remote Dektop - NREADY.NET

On Windows 11 Pro (also Windows 10 Pro), If the user has signed in to Microsoft Account and enabled MFA, so the Local Account password is swept out once switching to Microsoft Account and we cannot using the Local Account password anymore.

So how can we use the Remote Desktop to remote to that computer? Tried the Local password or Microsoft Account password but cannot to connect?

The fact that, It’s still worked but seem there are some issues with this new OS, so we have to do some tricks.

Let’s say:

  • namle-zenbook: the remote computer
  • namle-az: the Local Account username on the remote computer
  • le***@li**.com: the Microsoft Account username on the remote computer
  1. Enable Remote Desktop on the Computer that you want to remote.

Remote Dektop - NREADY.NET

  1. On that remote computer, Run the following command in the Run…
    runas /u:MicrosoftAccount\[email protected] cmd.exe

Runas - NREADY.NET

  1. A Command Prompt will be shown, type your current Microsoft Account password and enter.

Remote Dektop - NREADY.NET

Now, you can connect to that computer via Remote Desktop.

We can use both Local Account user (ex: namle-az) and Microsoft Account username (ex: le***@li**.com), with password is the current Microsoft Account password.

Remote Dektop - NREADY.NET


Nam Le,
Personal experiment, https://nready.net


Last modified on January 28th, 2022 at 11:32 pm

Nam Le
lequocnam



17 responds

  1. TheIcemanCometh says:

    Thank you for this. I’d been racking my brain for more than an hour trying to get in this way, and this article solved it. Thanks again!

  2. There is a much easier way.
    Login to windows 11 locally with your Microsoft account, open a non-administrative CMD
    Issue the command whoami
    it will return a username in the format machine\name
    use that in the RDP username dialog box,

  3. Neil Yoder says:

    Mine works with this username format, but not with the result from ‘whoami’ command:

    azuread\[email address]

  4. Andrew says:

    So many answers to this question, this is the only one that worked. Took me days to find your answer. Thank you so much for posting it. Someone tell Microsoft please.

  5. Timi S says:

    I swear I have spent hours working on a solutíon and this one worked flawlessly! Thank you so much for helping me in these dire needs and Microsoft not being able to answer….

  6. mali says:

    If you try running this command on a fresh install Windows 11 you will get some weird error. Fix is simple, reboot the machine and try again 🙂

  7. Alliteration says:

    The command syntax did not work for me, instead I substituted runas /user:d##.##@outlook.com cmd.exe
    This being the same MS account that I had used to login to Windows the first time and each time since installing W11 on
    System Manufacturer: Dell Inc.
    System Model: OptiPlex 7020
    System Type: x64-based PC
    Processor(s): 1 Processor(s) Installed.
    [01]: Intel64 Family 6 Model 60 Stepping 3 GenuineIntel ~3401 Mhz
    BIOS Version: Dell Inc. A18, 5/30/2019

  8. Nam Le says:

    Thanks Alliteration, so we have another useful command.

  9. Ken Robertson says:

    This worked for me – tried about a dozen things that didn’t. Thanks for posting this!

  10. Balour says:

    Many thanks to you! The frustration level was at such a height 😡😂 This did it for me. I was suspecting the MFA but was in the dark…

  11. Mike Jensen says:

    So, from what I gathered, Win11 Pro doesn’t try authenticate RDP connections with the Microsoft authentication server, it simply checks it’s local cache. When using say Hello or a Pin or the authenticator app, the local password is wiped out?

    So, I figured I needed to disable these, login with the latest password so it would cache, then login. From what I gather, doing the RunAs is a way to authenticate via password and get it into the cache so RDP works. I’m curious if this cache sticks around if I use Hello or Pin again.

    I’ll try when I get home. So many ways this can be better, passing through credentials on a trusted network from another device logged into the same Microsoft account. Use of Yubi key. Redirect to authenticator app, relay authentication to the Microsoft server.

    So much for going passwordless, you’d never be able to RDP.

    (Frustrating and ridiculous… I wonder if I can use Okta authentication/authorization instead?!)

  12. Geir A says:

    This solved it for me 🙂

    https://www.augmastudio.com/2021/11/11/resolve-the-remote-desktop-app-connection-issue-with-azure-ad-joined-pc/

  13. Thomas Spitzer says:

    This works to resolve the same issue on Windows 10. thanks. Its like magic. I guess it works like Mike Jensen said above. I would never have guessed it on my own!

  14. Rafee says:

    Worked like a charm. Would it be possible to share a bit more detail on exactly what’s happening here? Why does it work?

  15. Ruciak says:

    Hi, I use a Remote desktop connection client from a macbook to a mini PC MELE Quieter used to run an astrophotograpy setup. Your solution works like a charm, it was the only one to solve definitely my crucial problem as I need to be connected with my MS account on the target PC to let some files be synchronized with onedrive.
    Thanks again, Frederic

    1. Nam Le says:

      Oh wow, glad to help you!

  16. The runas /u:MicrosoftAccount\[email protected] cmd.exe and entering the password on the target machine, then connecting from the other machine, worked. Thanks a ton.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.