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:
I was using the below csom code to retrieve items from a SharePoint list.
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;
private SecureString GetSPOSecureStringPassword()
var secureString = new SecureString();
foreach (char c in “YourAccountPassword”)
Solution to error 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.
You may like following SharePoint csom examples:
- the remote server returned an error 500 internal server error. SharePoint client object model
- the remote server returned an error (403) forbidden SharePoint client object model
- Get list content types using C#.Net client object model code in SharePoint online
- How to bind dropdown list from an array using jQuery? And how to retrieve from control values using jQuery?
- Retrieve Content type by Id using csom in SharePoint Online
- Steps to add items from CSV file to SharePoint Online List using PowerShell in CSOM
- How to remove UserCustomActions from Ribbon in SharePoint online list using csom?
- How to Use CAML Query for Boolean field for SharePoint 2013/2016/Online Object Model CSOM
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 Also like the Following SharePoint Tutorials: