Share via


AppPrincipalCredential.CreateFromSymmetricKey method

Creates an instance of AppPrincipalCredential that wraps a symmetric key.

Namespace:  Microsoft.SharePoint.Client
Assembly:  Microsoft.SharePoint.Client (in Microsoft.SharePoint.Client.dll)

Syntax

'Declaration
Public Shared Function CreateFromSymmetricKey ( _
    context As ClientRuntimeContext, _
    symmetricKey As String, _
    notBefore As DateTime, _
    notAfter As DateTime _
) As AppPrincipalCredential
'Usage
Dim context As ClientRuntimeContext
Dim symmetricKey As String
Dim notBefore As DateTime
Dim notAfter As DateTime
Dim returnValue As AppPrincipalCredential

returnValue = AppPrincipalCredential.CreateFromSymmetricKey(context, _
    symmetricKey, notBefore, notAfter)
public static AppPrincipalCredential CreateFromSymmetricKey(
    ClientRuntimeContext context,
    string symmetricKey,
    DateTime notBefore,
    DateTime notAfter
)

Parameters

  • notBefore
    Type: System.DateTime

    An instance is not created if it is before this date and time.

  • notAfter
    Type: System.DateTime

    An instance is not created if it is after this date and time.

Return value

Type: Microsoft.SharePoint.Client.AppPrincipalCredential
A new instance of AppPrincipalCredential.

See also

Reference

AppPrincipalCredential class

AppPrincipalCredential members

Microsoft.SharePoint.Client namespace