I'm attempting to add a certificate into Azure Active Directory using New-MsolServicePrincipalCredential. This is for the purposes of authenticating Azure VMs into Key Vault via an AAD App in order to encrypt the drives using BitLocker.
Whenever I attempt to log in using Connect-MsolService I get the below error message:
connect-msolservice : The user name or password is incorrect. Verify your user name, and then type your password again.
At line:1 char:1+ connect-msolservice+ ~~~~~~~~~~~~~~~~~~~+ CategoryInfo : OperationStopped: (:) [Connect-MsolService], MicrosoftOnlineException+ FullyQualifiedErrorId : 0x80048821,Microsoft.Online.Administration.Automation.ConnectMsolService
The user I'm attempting to log in with is the Service Administrator on the Subscription, and Global Admin of the Directory, so I'm a little confused as to why I'm getting the error and/or which account I should be logging in with? I've
tried a number of different options, all without success.
This is a Microsoft Account (i.e. not an external, federated account) and Two Factor Authentication is NOT enabled. I also have the Sign On Assistant installed on my device. I can log into the Azure portal using this
account, so the password is known and correct, and the account isn't locked.
Late last night I was able to log in by manually creating a new user directly within AAD via the Management Portal, but I don't see that as a real solution as it breaks my ability to automate the whole process, which I'm certain I should be able to do as
others seem capable if you read their blogs.
Thanks in advance,
Andy