Python 如何通过web服务从sharepoint获取身份验证提供程序?
如何通过web服务从共享点获取身份验证提供程序Python 如何通过web服务从sharepoint获取身份验证提供程序?,python,web-services,sharepoint,authentication,provider,Python,Web Services,Sharepoint,Authentication,Provider,如何通过web服务从共享点获取身份验证提供程序 我是从python应用程序登录到共享点的。我需要从共享点站点找到所选的身份验证提供程序。如何获取它?。您无法检索提供程序实例,然后执行类似于成员资格.ValidateUser(用户名、密码)的操作 您需要创建对的引用,执行登录操作(下面的C#示例-您必须在Python中执行类似的操作): 并使用获得的cookie 阅读这篇文章-它可能会给你一些关于从非Microsoft环境访问SharePoint的想法 string siteUrl = "htt
我是从python应用程序登录到共享点的。我需要从共享点站点找到所选的身份验证提供程序。如何获取它?。您无法检索提供程序实例,然后执行类似于
成员资格.ValidateUser(用户名、密码)
的操作
您需要创建对的引用,执行登录操作(下面的C#示例-您必须在Python中执行类似的操作):
并使用获得的cookie
阅读这篇文章-它可能会给你一些关于从非Microsoft环境访问SharePoint的想法
string siteUrl = "http://example.com/sites/hr";
AuthenticationService.Authentication client = new AuthenticationService.Authentication();
client.AllowAutoRedirect = true;
client.CookieContainer = new CookieContainer();
client.Url = siteUrl + "_vti_bin/Authentication.asmx";
AuthenticationService.LoginResult loginResult = client.Login(username, password);
if (loginResult.ErrorCode == AuthenticationService.LoginErrorCode.NoError)
{
string cookie = client.CookieContainer.GetCookieHeader(new Uri(siteUrl));
}