예제 #1
0
        public static ClientContext GetWebApplicationClientContext(TokenCache tokenCache)
        {
            string siteUrl = GetSharePointResourceID(tokenCache);

            OfficeDevPnP.Core.AuthenticationManager authManager = new OfficeDevPnP.Core.AuthenticationManager();
            ClientContext context = authManager.GetAzureADWebApplicationAuthenticatedContext(
                siteUrl,
                (s) => GetTokenForApplication(s, tokenCache));

            return(context);
        }