I am building a WPF application that uses Microsoft.SharePoint.Client.ClientContext to connect to a SharePoint 2013 site and interact with lists. My SP site uses Windows Authentication, and all users will have normal Active Directory accounts. I have just started looking into authentication via setting the Credentials property of the Client Context. It works, but needs the credentials to be supplied every time the Client Context is instantiated.

My goal is to have a periodic asynchronous process fetching the SharePoint data, without having to prompt the user for credentials every time it runs. Also, I do not want to store the user's password in local storage (I hear that is bad practice).

Is it possible to cache a cookie or authentication token using the client context? I can't seem to find any examples and I'm wondering if it is even possible.

1 Answer 1


You can try a high-trust app, it allows your app to tell SharePoint who you are operating as

  • Ah. I had only considered SP Apps as a solution for web dev on a SharePoint site. Thanks!
    – Chronozoa
    Oct 31, 2014 at 17:55

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.