Skip to content

Extracts SharePoint request cookies out of CSOM ClientContext

License

Notifications You must be signed in to change notification settings

arvosys/SPContextHeaders

Repository files navigation

SPContextHeaders

Extracts SharePoint request cookies out of CSOM ClientContext

using System.Net;
using Microsoft.SharePoint.Client;

using (ClientContext context = new ClientContext("http://sharepoint/")) {

    // context.Credentials = <creds ...>;

    WebHeaderCollection headers = ContextHeaders.GetHeaders(options.Context);

    // Auth headers now can be used for authentication using any request library
    // talking to REST, SOAP, etc.

}

About

Extracts SharePoint request cookies out of CSOM ClientContext

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages