2

On our public web site we have forms users can use to insert data into lists on our SharePoint BPOS site. We use the web services (authentication/lists) to do this and the piece of code to authenticate is:

public void authentication()
{
   Auth.Authentication authenticationObj = new Auth.Authentication();
   authenticationObj.Url = authServiceUrl;
   authenticationObj.CookieContainer = new System.Net.CookieContainer();
   authenticationObj.AllowAutoRedirect = true;
   authenticationObj.Credentials = new System.Net.NetworkCredential(_authUserName, _authPassword);

   Auth.LoginResult result = authenticationObj.Login(_authUserName, _authPassword);
}

We just got migrated to Office 365 and now the result comes back with PassWordDoesNotMatch but I know the password match because I can log on to the site with it.

I did a google and it seems like this doing this kind of thing has changed from BPOS to Office 365, am I correct?

Thanks in advance.

0

Yes it has changed from BPOS to 365 - 365 uses claims based authentication.

http://www.wictorwilen.se/Post/How-to-do-active-authentication-to-Office-365-and-SharePoint-Online.aspx

http://code.msdn.microsoft.com/Remote-Authentication-in-b7b6f43c

http://blogs.msdn.com/b/cjohnson/archive/2011/05/14/part-2-headless-authentication-with-sharepoint-online-and-the-client-side-object-model.aspx

  • 1
    thanks I got it working with wictor's solution, not sure how to get web from a different site collection than the top one though, if I use any other URL than ourdomain.sharepoint.com then I can't authenticate – John May 21 '12 at 11:44
  • what if you are on linux trying to authenticate with Sharepoint Online? Then what would you do? – Nicholas DiPiazza Dec 19 '16 at 23:00
  • @NicholasDiPiazza - better ask this as a new question I think, its not a comment. – Ryan Dec 20 '16 at 22:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.