具有现代身份验证的 CSOM 后端
我一直在开发一些使用 CSOM 和 .Net Framework 连接到 Sharepoint Online 的后端代码。
_context = new ClientContext(_sharepointDocumentRootUrl);
SecureString securePassword = new SecureString();
foreach (char c in _sharepointPassword)
{
securePassword.AppendChar(c);
}
_context.Credentials = new SharePointOnlineCredentials(_sharepointUserName, securePassword);
在身份验证方法从旧版身份验证更改为现代身份验证之前,这种方法一直运行良好。现在我们收到一条“登录名或密码与 Microsoft 帐户系统中的登录名或密码不匹配”的信息。
当然,我们已经对用户名/密码进行了双重/三重检查。
由于它是后端代码/系统帐户,我们无法使用 OfficeDevPnP。系统帐户已关闭 MFA。 IT 部门不允许我们使用 SharePoint 仅应用程序身份验证方法。他们非常怀疑是否允许对系统帐户进行遗留身份验证。
我一直在谷歌搜索但没有成功。有什么想法吗?
//托马斯
I've been developing some backend code which connects to Sharepoint Online using CSOM and .Net Framework.
_context = new ClientContext(_sharepointDocumentRootUrl);
SecureString securePassword = new SecureString();
foreach (char c in _sharepointPassword)
{
securePassword.AppendChar(c);
}
_context.Credentials = new SharePointOnlineCredentials(_sharepointUserName, securePassword);
This worked well until the auth method was changed from Legacy Auth to Modern Auth. Now we get a "The sign-in name or password does not match one in the Microsoft account system"
Of course, we've double/tripple-checked the username/password.
Since it's backend code/system account we can't use OfficeDevPnP. The system account has MFA turned off. The IT department wont let us use the SharePoint App-Only auth method. And they are very sceptical to allow legacy auth for or system account.
I've been googling around without any success. Any ideas?
//Thomas
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论