What to do when your Windows PC with Microsoft ID login won't let your RDP in?

What to do when your Windows PC with Microsoft ID login won't let your RDP in?

I just found out that if you are running a Windows 11 PC that uses your Microsoft ID as primary login works perfectly when logging in locally but doesn't let you RDP in, claiming that the credentials are invalid, all you need to do is run (Win + R or from PowerShell):

runas /u:MicrosoftAccount\your.microsoftid@outlook.com explorer.exe 

This command runs the explorer (or any other program of your liking for that matter) under the credentials of the Microsoft account which is the primary user account on the machine.

You should see a dialog asking for your Microsoft ID credentials after which the explorer should open.

This refreshes and caches your Microsoft account credentials after which, RDPing into this machine using the specified Microsoft ID will work again like a charm.