Can't connect to Office 365, Azure, or Intune using the Azure Active Directory module for Windows PowerShell

This article describes an issue in which you can't connect to a Microsoft cloud service such as Office 365, Azure, or Microsoft Intune by using the Connect-MSOLService cmdlet.

Original product version:   Microsoft Entra ID, Microsoft Intune, Azure Backup, Office 365 User and Domain Management, Office 365 Identity Management
Original KB number:   2494043

Symptoms

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 Office 365, Microsoft Azure, or Microsoft Intune, your attempt is unsuccessful. Instead, you receive one of the following error messages:

Connect-MsolService : Exception of type 'Microsoft.Online.Administration.Automation.MicrosoftOnlineException' was thrown.

Connect-MsolService : Access Denied. You do not have permissions to call this cmdlet.

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

Resolution

To resolve this issue, refer one of the following articles, as appropriate for your situation:

More information

For more information about Azure Active Directory module for Windows PowerShell, see Manage Microsoft Entra ID using Windows PowerShell.

Contact us for help

If you have questions or need help, create a support request, or ask Azure community support. You can also submit product feedback to Azure feedback community.