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:
- "Connect-MsolService: Exception of type was thrown" error
- "Access Denied" error
- "The user name or password is incorrect" error
More information
For more information about Azure Active Directory module for Windows PowerShell, see Manage Microsoft Entra ID using Windows PowerShell.
Source: Microsoft Learn / IT Pro troubleshooting by Microsoft and contributors. Documentation licensed CC BY 4.0. Code samples are covered by the MIT License. Converted from Markdown, with links normalized and embedded media omitted.
