We have an on premise SharePoint 2010 farm, and a SharePoint Online 2013 farm. We would like to be able to have a solution running on the on premise farm that will talk to the online farm.

Since the 2010 solution would have to use .NET 3.5, is it even possible to have this solution load Microsoft.SharePoint.Client and use it to authenticate and connect to SharePoint Online? Or will I have to have something outside of SharePoint 2010 running to connect to SharePoint Online, and then serve data to the SharePoint 2010 solution?

This is my reference for connecting to SharePoint 2013 Online: http://code.msdn.microsoft.com/office/SharePoint-2013-Hello-0fd15fbf/sourcecode?fileId=77290&pathId=933217996

2 Answers 2


SharePoint 2013 Client library use .net 4.0 . You should use webservice.


It can work, as seen here:


and explained here:


however with this solution, if no cookie exists yet, this code opens a WebBrowser window to provide the user with a way to log in, so this can't work for a fully automated solution.

this code solves that problem:


but if the user you want to log on with must go through ADFS, try this code:


but before you do that, ask yourself if you really need to go through ADFS. I thought I needed to, but then I thought that actually it's easier to just make a "service account" on O365 and use that to do the client object model stuff.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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