No one has responded to this discussion for at least a year, so this information may be out of date. If you're looking for information about this topic, please search for a more recent discussion or post a new question.

Programmatically authenticate against SharePoint Online ADFS

  • I can use the sample code from Remote Authentication in SharePoint Online Using Claims-Based Authentication as well as the code from How to do active authentication to Office 365 and SharePoint Online to connect to a 'standard' SharePoint Online. But if I try to connect to a SharePoint Online with Federation Service enabled, then after entering my username I am asked to login on the federation server, which causes the sample application to display an error page. The error does not occur if I do the login through my browser.

    So the end result is that currently I cannot do a client login against the SharePoint Online site where Federation Service is enabled. Is there a way to do this?
  • I am having the same problems as outlined in the above post.  Is it even possible to programatically authenticate a user in SharePoint online using ADFS?  Any help would be appreciated!

  • Hi guys... solving the very same problem I came uppon this guy who fixed the official microsoft code sample to accomplish our task, anyway, it shows a login window to the user... so in unattended applications it is unusable.

    blogs.solidq.com/.../Post.aspx

  • I haven't tried this out but some people have reported some success:


    http://stackoverflow.com/questions/11295953/claim-auth-from-adfs/11651778#11651778


    I'm keen to hear how you go!

  • Yes I have tried it already before reading your post... There is also my result of this approach posted at the stackoverflow question... But anyway, thank you for effort

  • Hi,

    Have you found a solution for authenticating against SharePoint Online ADFS?