"The user name or password is incorrect" when you use connect-MSOLService to connect to Office 365

Problem

When you try to use the connect-MSOLService cmdlet in the Microsoft Azure Active Directory Module for Windows PowerShell to connect to a Microsoft cloud service such as Microsoft Office 365, Azure, or Microsoft Intune, your attempt is unsuccessful. Additionally, you may receive the following error message:

Connect-MsolService : The user name or password is incorrect. Verify your user name, and then type your password again.

Cause

This issue may occur if the user name or password that you're using is incorrect or if there's a problem with the user account.

Solution

To resolve this issue, see You can't sign in to your organizational account such as Office 365, Azure, or Intune.

More information

Still need help? Go to Microsoft Community or the Azure Active Directory Forums website.