开发者

how to get authentication provider from sharepoint through web services?

开发者 https://www.devze.com 2023-02-09 05:32 出处:网络
How to get authentication provider from share point through web services?.. I am log in to share point from python application. I need to find the selected authentication provid开发者_开发技巧er from

How to get authentication provider from share point through web services?..

I am log in to share point from python application. I need to find the selected authentication provid开发者_开发技巧er from the share point site. how to get that?..


You cannot retrieve provider instance and then do something like Membership.ValidateUser(username, password).

You need to create a reference to the Authentication Web service, perform login operation (C# example below - you have to do something similar in Python):

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));
}

and use obtained cookie.


Read the Reading a SharePoint list with PHP post - it might give you some ideas regarding accessing SharePoint from a non-Microsoft environment.

0

精彩评论

暂无评论...
验证码 换一张
取 消