AuthenticationManager.GetAzureADAppOnlyAuthenticatedContext Method

Definition

Overloads

GetAzureADAppOnlyAuthenticatedContext(String, String, String, X509Certificate2, AzureEnvironment)

Returns a SharePoint ClientContext using Azure Active Directory App Only Authentication. This requires that you have a certificated created, and updated the key credentials key in the application manifest in the azure AD accordingly.

GetAzureADAppOnlyAuthenticatedContext(String, String, String, String, SecureString, AzureEnvironment)

Returns a SharePoint ClientContext using Azure Active Directory App Only Authentication. This requires that you have a certificated created, and updated the key credentials key in the application manifest in the azure AD accordingly.

GetAzureADAppOnlyAuthenticatedContext(String, String, String, String, String, AzureEnvironment)

Returns a SharePoint ClientContext using Azure Active Directory App Only Authentication. This requires that you have a certificated created, and updated the key credentials key in the application manifest in the azure AD accordingly.

GetAzureADAppOnlyAuthenticatedContext(String, String, String, StoreName, StoreLocation, String, AzureEnvironment)

Returns a SharePoint ClientContext using Azure Active Directory App Only Authentication. This requires that you have a certificated created, and updated the key credentials key in the application manifest in the azure AD accordingly.

GetAzureADAppOnlyAuthenticatedContext(String, String, String, X509Certificate2, AzureEnvironment)

Returns a SharePoint ClientContext using Azure Active Directory App Only Authentication. This requires that you have a certificated created, and updated the key credentials key in the application manifest in the azure AD accordingly.

public Microsoft.SharePoint.Client.ClientContext GetAzureADAppOnlyAuthenticatedContext (string siteUrl, string clientId, string tenant, System.Security.Cryptography.X509Certificates.X509Certificate2 certificate, OfficeDevPnP.Core.AzureEnvironment environment = OfficeDevPnP.Core.AzureEnvironment.Production);
member this.GetAzureADAppOnlyAuthenticatedContext : string * string * string * System.Security.Cryptography.X509Certificates.X509Certificate2 * OfficeDevPnP.Core.AzureEnvironment -> Microsoft.SharePoint.Client.ClientContext
Public Function GetAzureADAppOnlyAuthenticatedContext (siteUrl As String, clientId As String, tenant As String, certificate As X509Certificate2, Optional environment As AzureEnvironment = OfficeDevPnP.Core.AzureEnvironment.Production) As ClientContext

Parameters

siteUrl
String

Site for which the ClientContext object will be instantiated

clientId
String

The Azure AD Application Client ID

tenant
String

The Azure AD Tenant, e.g. mycompany.onmicrosoft.com

certificate
X509Certificate2

Certificate used to authenticate

environment
AzureEnvironment

SharePoint environment being used

Returns

ClientContext

Applies to

GetAzureADAppOnlyAuthenticatedContext(String, String, String, String, SecureString, AzureEnvironment)

Returns a SharePoint ClientContext using Azure Active Directory App Only Authentication. This requires that you have a certificated created, and updated the key credentials key in the application manifest in the azure AD accordingly.

public Microsoft.SharePoint.Client.ClientContext GetAzureADAppOnlyAuthenticatedContext (string siteUrl, string clientId, string tenant, string certificatePath, System.Security.SecureString certificatePassword, OfficeDevPnP.Core.AzureEnvironment environment = OfficeDevPnP.Core.AzureEnvironment.Production);
member this.GetAzureADAppOnlyAuthenticatedContext : string * string * string * string * System.Security.SecureString * OfficeDevPnP.Core.AzureEnvironment -> Microsoft.SharePoint.Client.ClientContext
Public Function GetAzureADAppOnlyAuthenticatedContext (siteUrl As String, clientId As String, tenant As String, certificatePath As String, certificatePassword As SecureString, Optional environment As AzureEnvironment = OfficeDevPnP.Core.AzureEnvironment.Production) As ClientContext

Parameters

siteUrl
String

Site for which the ClientContext object will be instantiated

clientId
String

The Azure AD Application Client ID

tenant
String

The Azure AD Tenant, e.g. mycompany.onmicrosoft.com

certificatePath
String

The path to the certificate (*.pfx) file on the file system

certificatePassword
SecureString

Password to the certificate

environment
AzureEnvironment

SharePoint environment being used

Returns

ClientContext

Client context object

Applies to

GetAzureADAppOnlyAuthenticatedContext(String, String, String, String, String, AzureEnvironment)

Returns a SharePoint ClientContext using Azure Active Directory App Only Authentication. This requires that you have a certificated created, and updated the key credentials key in the application manifest in the azure AD accordingly.

public Microsoft.SharePoint.Client.ClientContext GetAzureADAppOnlyAuthenticatedContext (string siteUrl, string clientId, string tenant, string certificatePath, string certificatePassword, OfficeDevPnP.Core.AzureEnvironment environment = OfficeDevPnP.Core.AzureEnvironment.Production);
member this.GetAzureADAppOnlyAuthenticatedContext : string * string * string * string * string * OfficeDevPnP.Core.AzureEnvironment -> Microsoft.SharePoint.Client.ClientContext
Public Function GetAzureADAppOnlyAuthenticatedContext (siteUrl As String, clientId As String, tenant As String, certificatePath As String, certificatePassword As String, Optional environment As AzureEnvironment = OfficeDevPnP.Core.AzureEnvironment.Production) As ClientContext

Parameters

siteUrl
String

Site for which the ClientContext object will be instantiated

clientId
String

The Azure AD Application Client ID

tenant
String

The Azure AD Tenant, e.g. mycompany.onmicrosoft.com

certificatePath
String

The path to the certificate (*.pfx) file on the file system

certificatePassword
String

Password to the certificate

environment
AzureEnvironment

SharePoint environment being used

Returns

ClientContext

Client context object

Applies to

GetAzureADAppOnlyAuthenticatedContext(String, String, String, StoreName, StoreLocation, String, AzureEnvironment)

Returns a SharePoint ClientContext using Azure Active Directory App Only Authentication. This requires that you have a certificated created, and updated the key credentials key in the application manifest in the azure AD accordingly.

public Microsoft.SharePoint.Client.ClientContext GetAzureADAppOnlyAuthenticatedContext (string siteUrl, string clientId, string tenant, System.Security.Cryptography.X509Certificates.StoreName storeName, System.Security.Cryptography.X509Certificates.StoreLocation storeLocation, string thumbPrint, OfficeDevPnP.Core.AzureEnvironment environment = OfficeDevPnP.Core.AzureEnvironment.Production);
member this.GetAzureADAppOnlyAuthenticatedContext : string * string * string * System.Security.Cryptography.X509Certificates.StoreName * System.Security.Cryptography.X509Certificates.StoreLocation * string * OfficeDevPnP.Core.AzureEnvironment -> Microsoft.SharePoint.Client.ClientContext

Parameters

siteUrl
String

Site for which the ClientContext object will be instantiated

clientId
String

The Azure AD Application Client ID

tenant
String

The Azure AD Tenant, e.g. mycompany.onmicrosoft.com

storeName
StoreName

The name of the store for the certificate

storeLocation
StoreLocation

The location of the store for the certificate

thumbPrint
String

The thumbprint of the certificate to locate in the store

environment
AzureEnvironment

SharePoint environment being used

Returns

ClientContext

ClientContext being used

Applies to