AuthenticationManager.GetADFSCertificateMixedAuthenticationContext(String, String, String, String, Int32) Method

Definition

Returns a SharePoint on-premises ClientContext for sites secured via ADFS

public Microsoft.SharePoint.Client.ClientContext GetADFSCertificateMixedAuthenticationContext (string siteUrl, string serialNumber, string sts, string idpId, int logonTokenCacheExpirationWindow = 10);
member this.GetADFSCertificateMixedAuthenticationContext : string * string * string * string * int -> Microsoft.SharePoint.Client.ClientContext
Public Function GetADFSCertificateMixedAuthenticationContext (siteUrl As String, serialNumber As String, sts As String, idpId As String, Optional logonTokenCacheExpirationWindow As Integer = 10) As ClientContext

Parameters

siteUrl
String

Url of the SharePoint site that's secured via ADFS

serialNumber
String

Represents the serial number of the certificate as displayed by the certificate dialog box, but without the spaces, or as returned by the System.Security.Cryptography.X509Certificates.X509Certificate.GetSerialNumberString method

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
Int32

Optioanlly provide the value of the SharePoint STS logonTokenCacheExpirationWindow. Defaults to 10 minutes.

Returns

ClientContext

ClientContext to be used by CSOM code

Applies to