Skip to content

Instantly share code, notes, and snippets.

@Vintaurus
Created December 27, 2017 15:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Vintaurus/e9fe0e3c3cb4a27e7345cae97f7fb876 to your computer and use it in GitHub Desktop.
Save Vintaurus/e9fe0e3c3cb4a27e7345cae97f7fb876 to your computer and use it in GitHub Desktop.
var hostUrl = HttpUtility.ParseQueryString(Request.Url.Query).Get("SPHostUrl");
Uri spHostUrl = new Uri(hostUrl);
using (var clientContext = TokenHelper.GetS2SClientContextWithWindowsIdentity(spHostUrl, Request.LogonUserIdentity))
{
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment