When trying to connect to MSOLService by running Connect-MsolService , you get this message:
Unable to authenticate your credentials. Make sure that your user name is in the format: <username>@<domain>. If this issue persists, contact Support.
You have tried the obvious things like re-installing the Sign-in assistant, configured microsoftonline.com in your Proxy accordingly and verifying the credentials by logging on to the Admin portal etc. Maybe you even followed all the steps in KB2494043. Everything seems fine, but still you get this error message about credentials in the wrong format etc.
There is one more thing to do. Try the following:
- Fire up the Registry Editor
- Navigate yourself to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSOnlinePowerShell\Path
- Investigate the Key called WebServiceUrl – it might contain a misspelling! I have seen microsoftonline.com been thrown around to onlinemicrosoft
- Verify that the value is https://provisioningapi.microsoftonline.com/provisioningwebservice.svc
- Re-start PowerShell.exe and try connecting again.
I have seen this issue in the field, after installing Windows Azure Active Directory PowerShell cmdlets on the same machine as DirSync is running. It is obvious a misspelling caused by human error.