Udostępnij za pośrednictwem


CredentialDescription.ClientSecret Property

Definition

When SourceType is ClientSecret, describes the client secret to use as a client credential in a confidential client application. The client secret is a string known only to the application and the identity provider. It needs to match the value configured during the application registration.

public string? ClientSecret { get; set; }
member this.ClientSecret : string with get, set
Public Property ClientSecret As String

Property Value

Examples

The JSON fragment below describes a client secret used as a client credential in a confidential client application:

{
 "ClientCredentials": [
 {
  "SourceType": "ClientSecret",
  "ClientSecret": "blah"
 }]
}

The code below describes programmatically in C#, the same client secret.

CredentialDescription credentialDescription = new CredentialDescription
{
    SourceType = CredentialSource.ClientSecret,
    ClientSecret = "blah"
};

Applies to