@SR-7559 Apologies for the delay in response and all the inconvenience caused because of the issue.
I did repro in my lab and below are my findings as per your use case:
Firstly I created windows VM as per specification mentioned by you in the query. Once created I did RDP to the machine and tried to run netplwiz command which allowed me to add my email account and make it an admin as below:
I then went to user setting to set the password for this user as below :
Once set I tried doing RDP to the system in the format vmname\username which is the expected format. Now I tried both with email as well as the Display name for the user but Login failed both time with same error.
Just to be sure I tried another scenario where I created user locally on the VM and then with the help of netplwiz command changed the user from user type to Admin and this time I was able to log in to system without any problem:
So here we can safely assume that we can RDP to the system with the local user created in the VM but the problem is arising with the Microsoft account or the email accounts with the same account
I did some digging and found few articles which talk about connecting Microsoft account to Azure VM.One such article was this which I followed and even though it was for Windows 8 I was successfully able to apply same setting for windows 10
Disabled NAL (not recommended) for testing purpose. Unchecked option after clicking on Advanced option:
Now as per recommendation in article you need to change the RDP file with setting as below:
But here is a catch if you directly do the change as per mentioned in article you will get the error “The connection cannot proceed because authentication is not enabled and the remote computer requires that authentication be enabled to connect.”
Reason being In the more modern versions of Microsoft Windows (for example Windows 10 & Windows Server 2016) the RDP defaults have changed. The default for “SecurityLayer” has been changed from 0 to 2. Disabling: “Allow connections only from computers running Remote Desktop with Network Level Authentication (recommended)” doesn’t change that value to a 0 either.
For that to happen first login to VM with local account and made these registry changes:
- Go to: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp
- Change “SecurityLayer” to 0
Once you made the change I went ahead made the RDP file change as mentioned and was successfully able to login with username as my Microsoft account and password you can put any at first attempt:
Even though I was able to go through it but I won't recommend this since there might be security issues involved as well. You might like to check this which talks about the user login in general.
Another way is to reach out to Support as well to get better insights.
Hope it helps!!!
Please "Accept as Answer" if it helped so it can help others in community looking for help on similar topics.