Fix "The sign-in name or password does not match one in the Microsoft account system" Error in SharePoint Online

Problem: Getting "The sign-in name or password does not match one in the Microsoft account system" Error in SharePoint Online.
The sign-in name or password does not match one in the Microsoft account system.

Solution:
I've experienced this error in SharePoint Online PowerShell scripts couple of times and this could happen in any of the PowerShell methods like CSOM, SharePoint Online Management Shell, or PnP PowerShell. Here are the possible causes and solutions:
  1. Your user name or password could be wrong (Obviously!). Check if you are able to login using web browser with the user name and password given in the PowerShell script.
  2. Your password may be expired or account may be locked out or disabled.
  3. Your saved password in Windows credentials store could be incorrect or expired (especially when you use PnP PowerShell module Connect-PnPOnline to get credentials from Windows Credentials store)
  4. Your account may be MFA (Multi-factor authentication) enabled! If yes, either MFA must be turned-OFF or you have to follow the methods described in : How to Connect to SharePoint Online with MFA enabled Accounts from PowerShell?
  5. When you are working with multiple tenants, make sure the supplied credentials are matching the given URL. E.g. If you are trying to connect to https://crescent.sharepoint.com, make sure you are providing [email protected] (or whatever is appropriate!) but not "[email protected]" in SharePoint Online.
  6.  Instead of using User name and password you can use App ID & Password: How to Connect to SharePoint Online using AppID and AppSecret in PnP PowerShell?

No comments:

Please Login and comment to get your questions answered!

Powered by Blogger.