public GetAzureADAccessTokenAuthenticatedContext ( String siteUrl, String accessToken ) : ClientContext | ||
siteUrl | String | Site for which the ClientContext object will be instantiated |
accessToken | String | An explicit value for the AccessToken |
Résultat | ClientContext |
internal static SPOnlineConnection InitiateAccessTokenConnection(Uri url, string accessToken, int minimalHealthScore, int retryCount, int retryWait, int requestTimeout, string tenantAdminUrl, bool skipAdminCheck = false, AzureEnvironment azureEnvironment = AzureEnvironment.Production) { var authManager = new OfficeDevPnP.Core.AuthenticationManager(); var context = PnPClientContext.ConvertFrom(authManager.GetAzureADAccessTokenAuthenticatedContext(url.ToString(), accessToken), retryCount, retryWait); var connectionType = ConnectionType.O365; if (skipAdminCheck == false) { if (IsTenantAdminSite(context)) { connectionType = ConnectionType.TenantAdmin; } } return(new SPOnlineConnection(context, connectionType, minimalHealthScore, retryCount, retryWait, null, url.ToString(), tenantAdminUrl, PnPPSVersionTag)); }