次の方法で共有


IdentityApplicationOptions.ClientCredentials Property

Definition

Description of the client credentials that the app provides to prove its identity to the IdP, See CredentialSource for the list of supported credential types.

public System.Collections.Generic.IEnumerable<Microsoft.Identity.Abstractions.CredentialDescription>? ClientCredentials { get; set; }
member this.ClientCredentials : seq<Microsoft.Identity.Abstractions.CredentialDescription> with get, set
Public Property ClientCredentials As IEnumerable(Of CredentialDescription)

Property Value

Examples

Here is an example of client credentials in the AzureAd section of the appsetting.json. The app will try to use workload identity federation from Managed identity (when setup and deployed in Azure), and otherwise, will use a certificate from Key Vault, and otherwise, will use a client secret.

 "ClientCredentials": [
  {
   "SourceType": "SignedAssertionFromManagedIdentity",
   "ManagedIdentityClientId": "Optional GUID of user assigned Managed identity"
  },
  {
   "SourceType": "KeyVault",
   "KeyVaultUrl": "https://webappsapistests.vault.azure.net",
   "KeyVaultCertificateName": "Self-Signed-5-5-22"
  },
  {
   "SourceType": "ClientSecret",
   "ClientSecret": "***"
  }
 ]

See also https://aka.ms/ms-id-web-certificates.

Applies to