When attempting to use Connect-MsolService with an MFA-enabled admin account you may receive a legacy auth prompt as opposed to a modern auth prompt. This incorrect prompt is due to the MSOnline PowerShell module being out of date.
If you were to enter credentials in the legacy prompt you would be unable to connect and would receive the following cryptic error.
C:\> Connect-MsolService
Connect-MsolService : Exception of type 'Microsoft.Online.Administration.Automation.MicrosoftOnlineException' was thrown.
At line:1 char:1
Connect-MsolService
~~~~~~~~~~~~~~~~~~~
CategoryInfo : OperationStopped: (:) [Connect-MsolService], MicrosoftOnlineException
FullyQualifiedErrorId : 0x800434D4,Microsoft.Online.Administration.Automation.ConnectMsolService
So, all we need to do is update, right?
Well, depending on how you originally installed the MSOnline module the update process may not be intuitive as you might think.
[Read more…] about Connect-MsolService may fail when MFA is enabled