Hi All,
We have developed web application in ASP.net C# and all the documents are storing in SharePoint Online. As per the requirement, the documents details should be
taken from SharePoint Online and display in the application. We have an account in SharePoint Online enabled with MFA feature. The code has been authentication. But I am getting error.
Code:
ClientContext ctx = new ClientContext(strSiteURL);
SecureString secureString = new SecureString();
strPassword.ToList().ForEach(secureString.AppendChar);
ctx.Credentials = new SharePointOnlineCredentials(strUserID, secureString);
Site site = ctx.Site;
ctx.Load(site);
ctx.ExecuteQuery();
Error:
The sign-in name or password does not match one in the Microsoft account system.
I want to authenticate the SharePoint Online via MFA enabled user credentials without the OTP prompt or call.
How can I make it possible?
Thanks & Regards
Suresh Sankaran