Ayyappan Anbalagan
Ayyappan Anbalagan

Reputation: 11312

how to get authentication provider from sharepoint through web services?

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 provider from the share point site. how to get that?..

Upvotes: 2

Views: 1067

Answers (1)

Marek Grzenkowicz
Marek Grzenkowicz

Reputation: 17363

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.

Upvotes: 2

Related Questions