SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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:

share|improve this question

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

share|improve this answer
up vote 0 down vote accepted

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.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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