I was having a struggle to authenticate with Sharepoint Online
I was using the Client Object Model and when I was trying to create a connection to sharepoint so I could check if folders had been added for CRM but I was getting a 403 forbidden message.
In the back of mind I was thinking the problem had to be linked to SharePoint/Office 365 online which both need you to login.
This page has a good overall description of the problem, you basically need to authenticate before you can start using SharePoint 2010 Online
Remote Authentication in SharePoint Online Using Claims-Based Authentication
The only problem with code I got from here is it popped up a login if the authenticated cookies were not on the machine. As my code would be running from a plugin I needed to automate that
Authentication with SharePoint Online and the Client Side Object Model
this code works
Part 2: “Headless” Authentication with SharePoint Online and the Client Side Object Model
one gotcha to mention with the code above is you have to put on the forward slash at the end of the SharePoint url
if you don’t put the forward slash on it won’t work.
I also had problems because my pc clock was over 5 minutes out, it wasn’t letting me login.
some other useful links regarding writing .Net code for SharePoint 2010