I am prototyping a tool that runs every few minutes and goes off to an office 365 site and to retrieve and then process information.
At the moment I have started with the MSDN guide "Remote Authentication in SharePoint Online Using Claims-Based Authentication" which points to a very helpful code sample that gets a clientcontext object based on a user logging in and then extracts the cookie.
I want to be able to run my code within task scheduler, so that you will be able to specify the office username and password in a configuration somewhere.
Does anyone have any code that will do this or a starting point. something like
using (ClientContext ctx = SomeClass.GetContext(targetSiteUrl, username, password))
{
if (ctx != null)
{
//dostuffhere
}
}
I have seen this blog post Automatic Login for SharePoint using Claims authentication but the code on the site doesn't appear to be complete / I cannot get it working
Just to note that I am referring to the current release of office 365 (based on 2010) and not the newly available beta of 2013