Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/heroku/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 如何通过web服务从sharepoint获取身份验证提供程序?_Python_Web Services_Sharepoint_Authentication_Provider - Fatal编程技术网

Python 如何通过web服务从sharepoint获取身份验证提供程序?

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

如何通过web服务从共享点获取身份验证提供程序


我是从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));
}