"Your credentials did not work" error when connecting to Windows Azure VM’s


Below specified is the error that might occur while connecting to Windows Azure VM’s via remote desktop (mstsc).

 

One very common reason that all of us are aware for this issue is “wrong password”. However, I often come across situations where users are definitely specifying correct username, password and still the issue seem to occur. I have worked with multiple customers regarding this very issue and investigation revealed that “invalid” username value is causing the issue. Let me explain!

While configuring remote desktop credentials via “Configure Remote Desktop Connections” option that is available in Publish wizard, Windows Azure tools does a pretty good job of validating the password, confirm password fields. However it does not validate username field. In below example, I have configured invalid values for both username, password. Notice that explanation mark highlighted below with circle appeared next to password field. But, there is no warning message appeared for username field.  

 

 

Since, validation is not performed by Windows Azure Tools for username field, one needs to be cautious about what value that is being configured. What really happens behind the scenes is, Windows Azure creates a specified user on the VM and grants permissions required for Remote Desktop access. So, generic username requirements/guidelines are applicable here as well.

Some of standard requirements

  1. Username should not match with existing user accounts. Few user accounts that are already presented on the Windows Azure VM’s are Administrator”, “Guest”. Hence, do not use these names while configuring remote desktop access.
  2. Names may not consist entirely of periods and/or spaces, or contain these characters:  \ / ” [ ] : | < > + = ; , ? * @
  3. Length of username should be <=20
  4. Username should not be null
  5. Password cannot contain the username or part of username

 

Quick test you can perform to reduce errors is to create a user in local machine with specified username, password and proceed with remote desktop configuration only after local test succeeds!

How to connect to VM using Remote Desktop(RDP) on Windows Azure (Cloud)
http://blogs.msdn.com/b/narahari/archive/2010/12/01/how-to-connect-to-vm-on-windows-azure.aspx

 

Comments (12)

  1. Can Bilgin says:

    nice catch mate… after 100 new certificates, reboots, uploads… came across this explanation. In my experience, I had an instance on staging and defined the user name as "Admin", then wanted to upload a solution to production with the same UserId and same encryption certificate… I was getting the same error over and over again until I changed the username to admin@<somethingarbitrary> for the production instance.

    Thanks again…

  2. hari_d says:

    I'm glad this helped Can Bilgin.

  3. Joy says:

    Thanks so much, this is very helpful!

  4. hari_d says:

    You are welcome Joy.

  5. himanshu barmola says:

    where i can find publish wizard…………..

  6. hari_d says:

    Hi Himanshu,

    In Visual Studio, If you right click on the cloud service, you should see "Publish" option. Clicking on the publish option will bring publish wizard.

    If you do not see that publish option, ensure latest Windows Azure SDK is installed.

    Thanks,

    Hari.

  7. John says:

    With the thread "Connect to VM using Azure cloud" is it able to be used with other Remote destinations?

  8. hari_d says:

    Hi John,

    I'm not what you meant by "Other Remote Destinations". Blog Post blogs.msdn.com/…/how-to-connect-to-vm-on-windows-azure.aspx is meant for connecting to VMs hosted in Azure.

    Thanks,

    Hari

  9. Doug Landholt says:

    I'm not using the Publisher — just creating machines and users manually. After adding users to the Azure Active Directory Domain, (e.g. smith@mydomain.onmicorosft.com), I tried logging in as one of those users, but got "Your credentials did not work." After some trial and error, I found that I had to add the users (e.g. smith) as local users on the VMs. Once I did that, and assigned, passwords, the users could RDP in.

  10. Naveen Bhat says:

    Thanks it helped. In my case it was "-" which caused the issue. You can mention this as well in your list.

  11. jinso says:

    1. select use another account

    2. enter username as :  "domainusername"   (instead of simple username)

    3. enter pswd

    4. OK

    ITS WORKING

  12. ali says:

    jinso please give me screenshoot.