AuthenticationManager.GetAzureADNativeApplicationAuthenticatedContext Method

Definition

Overloads

GetAzureADNativeApplicationAuthenticatedContext(String, String, String, TokenCache, AzureEnvironment)

Returns a SharePoint ClientContext using Azure Active Directory authentication. This requires that you have a Azure AD Native Application registered. The user will be prompted for authentication.

GetAzureADNativeApplicationAuthenticatedContext(String, String, Uri, TokenCache, AzureEnvironment)

Returns a SharePoint ClientContext using Azure Active Directory authentication. This requires that you have a Azure AD Native Application registered. The user will be prompted for authentication.

GetAzureADNativeApplicationAuthenticatedContext(String, String, String, TokenCache, AzureEnvironment)

Returns a SharePoint ClientContext using Azure Active Directory authentication. This requires that you have a Azure AD Native Application registered. The user will be prompted for authentication.

public Microsoft.SharePoint.Client.ClientContext GetAzureADNativeApplicationAuthenticatedContext (string siteUrl, string clientId, string redirectUrl, Microsoft.IdentityModel.Clients.ActiveDirectory.TokenCache tokenCache = null, OfficeDevPnP.Core.AzureEnvironment environment = OfficeDevPnP.Core.AzureEnvironment.Production);
member this.GetAzureADNativeApplicationAuthenticatedContext : string * string * string * Microsoft.IdentityModel.Clients.ActiveDirectory.TokenCache * OfficeDevPnP.Core.AzureEnvironment -> Microsoft.SharePoint.Client.ClientContext

Parameters

siteUrl
String

Site for which the ClientContext object will be instantiated

clientId
String

The Azure AD Native Application Client ID

redirectUrl
String

The Azure AD Native Application Redirect Uri as a string

tokenCache
TokenCache

Optional token cache. If not specified an in-memory token cache will be used

environment
AzureEnvironment

SharePoint environment being used

Returns

ClientContext

Client context object

GetAzureADNativeApplicationAuthenticatedContext(String, String, Uri, TokenCache, AzureEnvironment)

Returns a SharePoint ClientContext using Azure Active Directory authentication. This requires that you have a Azure AD Native Application registered. The user will be prompted for authentication.

public Microsoft.SharePoint.Client.ClientContext GetAzureADNativeApplicationAuthenticatedContext (string siteUrl, string clientId, Uri redirectUri, Microsoft.IdentityModel.Clients.ActiveDirectory.TokenCache tokenCache = null, OfficeDevPnP.Core.AzureEnvironment environment = OfficeDevPnP.Core.AzureEnvironment.Production);
member this.GetAzureADNativeApplicationAuthenticatedContext : string * string * Uri * Microsoft.IdentityModel.Clients.ActiveDirectory.TokenCache * OfficeDevPnP.Core.AzureEnvironment -> Microsoft.SharePoint.Client.ClientContext

Parameters

siteUrl
String

Site for which the ClientContext object will be instantiated

clientId
String

The Azure AD Native Application Client ID

redirectUri
Uri

The Azure AD Native Application Redirect Uri

tokenCache
TokenCache

Optional token cache. If not specified an in-memory token cache will be used

environment
AzureEnvironment

SharePoint environment being used

Returns

ClientContext

Client context object

Applies to