Method | Description | |
---|---|---|
GetADFSCertificateMixedAuthenticationContext ( string siteUrl, string serialNumber, string sts, string idpId, int logonTokenCacheExpirationWindow = 10 ) : ClientContext | ||
GetADFSUserNameMixedAuthenticatedContext ( string siteUrl, string user, string password, string domain, string sts, string idpId, int logonTokenCacheExpirationWindow = 10 ) : ClientContext |
Returns a SharePoint on-premises ClientContext for sites secured via ADFS
|
|
GetAppOnlyAuthenticatedContext ( string siteUrl, string appId, string appSecret ) : ClientContext |
Returns an app only ClientContext object
|
|
GetAppOnlyAuthenticatedContext ( string siteUrl, string realm, string appId, string appSecret, string acsHostUrl = "accesscontrol.windows.net", string globalEndPointPrefix = "accounts" ) : ClientContext |
Returns an app only ClientContext object
|
|
GetAzureADAccessTokenAuthenticatedContext ( String siteUrl, String accessToken ) : ClientContext |
Returns a SharePoint ClientContext using Azure Active Directory authentication. This requires that you have a Azure AD Web Application registered. The user will not be prompted for authentication, the current user's authentication context will be used by leveraging an explicit OAuth 2.0 Access Token value.
|
|
GetAzureADAppOnlyAuthenticatedContext ( string siteUrl, string clientId, string tenant, StoreName storeName, StoreLocation storeLocation, string thumbPrint, AzureEnvironment environment = AzureEnvironment.Production ) : ClientContext |
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 siteUrl, string clientId, string tenant, |
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 siteUrl, string clientId, string tenant, string certificatePath, |
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 siteUrl, string clientId, string tenant, string certificatePath, string certificatePassword, AzureEnvironment environment = AzureEnvironment.Production ) : ClientContext |
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.
|
|
GetAzureADNativeApplicationAuthenticatedContext ( string siteUrl, string clientId, |
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 siteUrl, string clientId, string redirectUrl, |
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.
|
|
GetAzureADWebApplicationAuthenticatedContext ( String siteUrl, String>.Func |
Returns a SharePoint ClientContext using Azure Active Directory authentication. This requires that you have a Azure AD Web Application registered. The user will not be prompted for authentication, the current user's authentication context will be used by leveraging ADAL.
|
|
GetNetworkCredentialAuthenticatedContext ( string siteUrl, string user, |
Returns a SharePoint on-premises / SharePoint Online Dedicated ClientContext object
|
|
GetNetworkCredentialAuthenticatedContext ( string siteUrl, string user, string password, string domain ) : ClientContext |
Returns a SharePoint on-premises / SharePoint Online Dedicated ClientContext object
|
|
GetSharePointOnlineAuthenticatedContextTenant ( string siteUrl, string tenantUser, |
Returns a SharePointOnline ClientContext object
|
|
GetSharePointOnlineAuthenticatedContextTenant ( string siteUrl, string tenantUser, string tenantUserPassword ) : ClientContext |
Returns a SharePointOnline ClientContext object
|
|
GetWebLoginClientContext ( string siteUrl, System icon = null ) : ClientContext |
Returns a SharePoint on-premises / SharePoint Online ClientContext object. Requires claims based authentication with FedAuth cookie.
|
|
RefreshADFSCertificateMixedAuthenticationContext ( string siteUrl, string serialNumber, string sts, string idpId, int logonTokenCacheExpirationWindow = 10 ) : void | ||
RefreshADFSUserNameMixedAuthenticatedContext ( string siteUrl, string user, string password, string domain, string sts, string idpId, int logonTokenCacheExpirationWindow = 10 ) : void |
Refreshes the SharePoint FedAuth cookie
|
Method | Description | |
---|---|---|
AcquireNativeApplicationTokenAsync ( string authContextUrl, string resourceId ) : Task |
||
EnsureToken ( string siteUrl, string realm, string appId, string appSecret, string acsHostUrl, string globalEndPointPrefix ) : void | ||
GetAccessTokenLease ( System.DateTime expiresOn ) : System.TimeSpan |
Get the access token lease time span.
|
|
clientContext_NativeApplicationExecutingWebRequest ( object sender, WebRequestEventArgs e ) : void |
public GetADFSCertificateMixedAuthenticationContext ( string siteUrl, string serialNumber, string sts, string idpId, int logonTokenCacheExpirationWindow = 10 ) : ClientContext | ||
siteUrl | string | |
serialNumber | string | |
sts | string | |
idpId | string | |
logonTokenCacheExpirationWindow | int | |
return | ClientContext |
public GetADFSUserNameMixedAuthenticatedContext ( string siteUrl, string user, string password, string domain, string sts, string idpId, int logonTokenCacheExpirationWindow = 10 ) : ClientContext | ||
siteUrl | string | Url of the SharePoint site that's secured via ADFS |
user | string | Name of the user (e.g. administrator) |
password | string | Password of the user |
domain | string | Windows domain of the user |
sts | string | Hostname of the ADFS server (e.g. sts.company.com) |
idpId | string | Identifier of the ADFS relying party that we're hitting |
logonTokenCacheExpirationWindow | int | Optioanlly provide the value of the SharePoint STS logonTokenCacheExpirationWindow. Defaults to 10 minutes. |
return | ClientContext |
public GetAppOnlyAuthenticatedContext ( string siteUrl, string appId, string appSecret ) : ClientContext | ||
siteUrl | string | Site for which the ClientContext object will be instantiated |
appId | string | Application ID which is requesting the ClientContext object |
appSecret | string | Application secret of the Application which is requesting the ClientContext object |
return | ClientContext |
public GetAppOnlyAuthenticatedContext ( string siteUrl, string realm, string appId, string appSecret, string acsHostUrl = "accesscontrol.windows.net", string globalEndPointPrefix = "accounts" ) : ClientContext | ||
siteUrl | string | Site for which the ClientContext object will be instantiated |
realm | string | Realm of the environment (tenant) that requests the ClientContext object |
appId | string | Application ID which is requesting the ClientContext object |
appSecret | string | Application secret of the Application which is requesting the ClientContext object |
acsHostUrl | string | Azure ACS host, defaults to accesscontrol.windows.net but internal pre-production environments use other hosts |
globalEndPointPrefix | string | Azure ACS endpoint prefix, defaults to accounts but internal pre-production environments use other prefixes |
return | ClientContext |
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 |
return | ClientContext |
public GetAzureADAppOnlyAuthenticatedContext ( string siteUrl, string clientId, string tenant, StoreName storeName, StoreLocation storeLocation, string thumbPrint, AzureEnvironment environment = AzureEnvironment.Production ) : ClientContext | ||
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 | Indicates which Azure AD environment is being used |
return | ClientContext |
public GetAzureADAppOnlyAuthenticatedContext ( string siteUrl, string clientId, string tenant, |
||
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 | ||
environment | AzureEnvironment | |
return | ClientContext |
public GetAzureADAppOnlyAuthenticatedContext ( string siteUrl, string clientId, string tenant, string certificatePath, |
||
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 | Password to the certificate | |
environment | AzureEnvironment | Indicates which Azure AD environment is being used |
return | ClientContext |
public GetAzureADAppOnlyAuthenticatedContext ( string siteUrl, string clientId, string tenant, string certificatePath, string certificatePassword, AzureEnvironment environment = AzureEnvironment.Production ) : ClientContext | ||
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 | Indicates which Azure AD environment is being used |
return | ClientContext |
public GetAzureADNativeApplicationAuthenticatedContext ( string siteUrl, string clientId, |
||
siteUrl | string | Site for which the ClientContext object will be instantiated |
clientId | string | The Azure AD Native Application Client ID |
redirectUri | The Azure AD Native Application Redirect Uri | |
tokenCache | Optional token cache. If not specified an in-memory token cache will be used | |
return | ClientContext |
public GetAzureADNativeApplicationAuthenticatedContext ( string siteUrl, string clientId, string redirectUrl, |
||
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 | Optional token cache. If not specified an in-memory token cache will be used | |
return | ClientContext |
public GetAzureADWebApplicationAuthenticatedContext ( String siteUrl, String>.Func |
||
siteUrl | String | Site for which the ClientContext object will be instantiated |
accessTokenGetter | String>.Func | The AccessToken getter method to use |
return | ClientContext |
public GetNetworkCredentialAuthenticatedContext ( string siteUrl, string user, |
||
siteUrl | string | Site for which the ClientContext object will be instantiated |
user | string | User to be used to instantiate the ClientContext object |
password | Password (SecureString) of the user used to instantiate the ClientContext object | |
domain | string | Domain of the user used to instantiate the ClientContext object |
return | ClientContext |
public GetNetworkCredentialAuthenticatedContext ( string siteUrl, string user, string password, string domain ) : ClientContext | ||
siteUrl | string | Site for which the ClientContext object will be instantiated |
user | string | User to be used to instantiate the ClientContext object |
password | string | Password of the user used to instantiate the ClientContext object |
domain | string | Domain of the user used to instantiate the ClientContext object |
return | ClientContext |
public GetSharePointOnlineAuthenticatedContextTenant ( string siteUrl, string tenantUser, |
||
siteUrl | string | Site for which the ClientContext object will be instantiated |
tenantUser | string | User to be used to instantiate the ClientContext object |
tenantUserPassword | Password (SecureString) of the user used to instantiate the ClientContext object | |
return | ClientContext |
public GetSharePointOnlineAuthenticatedContextTenant ( string siteUrl, string tenantUser, string tenantUserPassword ) : ClientContext | ||
siteUrl | string | Site for which the ClientContext object will be instantiated |
tenantUser | string | User to be used to instantiate the ClientContext object |
tenantUserPassword | string | Password of the user used to instantiate the ClientContext object |
return | ClientContext |
public GetWebLoginClientContext ( string siteUrl, System icon = null ) : ClientContext | ||
siteUrl | string | Site for which the ClientContext object will be instantiated |
icon | System | Optional icon to use for the popup form |
return | ClientContext |
public RefreshADFSCertificateMixedAuthenticationContext ( string siteUrl, string serialNumber, string sts, string idpId, int logonTokenCacheExpirationWindow = 10 ) : void | ||
siteUrl | string | |
serialNumber | string | |
sts | string | |
idpId | string | |
logonTokenCacheExpirationWindow | int | |
return | void |
public RefreshADFSUserNameMixedAuthenticatedContext ( string siteUrl, string user, string password, string domain, string sts, string idpId, int logonTokenCacheExpirationWindow = 10 ) : void | ||
siteUrl | string | Url of the SharePoint site that's secured via ADFS |
user | string | Name of the user (e.g. administrator) |
password | string | Password of the user |
domain | string | Windows domain of the user |
sts | string | Hostname of the ADFS server (e.g. sts.company.com) |
idpId | string | Identifier of the ADFS relying party that we're hitting |
logonTokenCacheExpirationWindow | int | Optioanlly provide the value of the SharePoint STS logonTokenCacheExpirationWindow. Defaults to 10 minutes. |
return | void |