I want to access a Sharepoint 2013 / office365 - site from a console application using OAuth-token I saved earlier using a provider hosted app.
I already can connect using credentials:
using (ClientContext context = new ClientContext("https://mypage.sharepoint.com))
{
context.AuthenticationMode = ClientAuthenticationMode.Default;
context.Credentials = new SharePointOnlineCredentials(_username, secureString);
return context;
}
But instead of using _username, secureString (=password) I want to use the saved Token. How can this be done?