CredentialDescription.CertificateDistinguishedName Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
When SourceType is StoreWithDistinguishedName, specifies the distinguished name of the certificate in the store specified by CertificateStorePath.
public string? CertificateDistinguishedName { get; set; }
member this.CertificateDistinguishedName : string with get, set
Public Property CertificateDistinguishedName As String
Property Value
Examples
The JSON fragment below describes a user certificate stored in the personal certificates folder (CurrentUser/My) and specified by its distinguised name, used as a client credential in a confidential client application:
{
"ClientCredentials": [
{
"SourceType": "StoreWithDistinguishedName",
"CertificateStorePath": "CurrentUser/My",
"CertificateDistinguishedName": "CN=WebAppCallingWebApiCert"
}]
}
The code below describes programmatically in C#, a computer certificate in the personal certificates folder (LocalMachine/My).
CredentialDescription credentialDescription = new CredentialDescription
{
SourceType = CredentialSource.StoreWithDistinguishedName,
CertificateStorePath = "LocalMachine/My",
CertificateDistinguishedName = "CN=WebAppCallingWebApiCert"
};