[Solved] Microsoft.SharePoint.Client.IdcrlException: The sign-in name or password does not match one in the Microsoft account system error in SharePoint Online

This SharePoint Online tutorial explains how to solve error “the sign-in name or password does not match one in the Microsoft account system” which comes while working with csom in SharePoint Online.

Recently I was trying to bind list templates to a dropdown list using client-side object model (csom) in SharePoint Online using visual studio 2017. While retrieving list items it gave below error: Microsoft.SharePoint.Client.IdcrlExpection: The sign-in name or password does not match one in the Microsoft account system. The error looks like below:

the sign-in name or password does not match one in the Microsoft account system
the sign-in name or password does not match one in the Microsoft account system

I was using the below csom code to retrieve items from a SharePoint list.

void BindItemsToDropDownList()
{
using (ClientContext clientContext = new ClientContext("https://onlysharepoint2013.sharepoint.com/sites/Raju"))
{
clientContext.AuthenticationMode = ClientAuthenticationMode.Default;
clientContext.Credentials = new SharePointOnlineCredentials("Padmini@onlysharepoint2013.onmicrosoft.com", GetSPOSecureStringPassword());

Web web = clientContext.Web;
ListTemplateCollection templateColl = web.ListTemplates;
clientContext.Load(templateColl);

clientContext.ExecuteQuery();

//Further Code
}
}

private SecureString GetSPOSecureStringPassword()
{
try
{
var secureString = new SecureString();
foreach (char c in "YourAccountPassword")
{
secureString.AppendChar(c);
}

return secureString;
}
catch
{
throw;
}
}
}

the sign-in name or password does not match one in the Microsoft account

The error was coming because the Password was not correct for the Office 365 account user name I was trying.

The problem was I was not using that account from a long time, so the account password expired already. So I had to reset my Office 365 account password and then update the new password in csom code. Then it started working.

Once I gave the correct password, the error “the sign-in name or password does not match one in the Microsoft account” did not come.

You may like following SharePoint csom examples:

Hope this SharePoint tutorial helps to solve the sign-in name or password does not match one in the Microsoft account system error in SharePoint.

Donwload Hub site pdf

Download SharePoint Online Tutorial PDF FREE!

Get update on Webinars, video tutorials, training courses etc.

Bijay Kumar

I am Bijay from Odisha, India. Currently working in my own venture TSInfo Technologies in Bangalore, India. I am Microsoft Office Servers and Services (SharePoint) MVP (5 times). I works in SharePoint 2016/2013/2010, SharePoint Online Office 365 etc. Check out My MVP Profile.. I also run popular SharePoint web site SharePointSky.com

  • Mathieu M. says:

    One other possibility for this error that I would like to add, is when Multi Factor Authentication is enabled. When your username and password is correct, you can still run into this.

    This is especially hard to identify when MFA only kicks in when certain conditions are met, ex. when you are not on your company network. In this way the scenario can work from your own machine, but when you deploy it to Azure it will fail with the same username and password combination.

  • >