# EntraIdApplicationResource.withCertificateDistinguishedName

- Module: [Aspire.Hosting.Azure.EntraId](/reference/api/typescript/aspire.hosting.azure.entraid.md)
- Defined on: [EntraIdApplicationResource](/reference/api/typescript/aspire.hosting.azure.entraid/entraidapplicationresource.md)
- Version: `17.0.0-preview.1.26567.5`
- Kind: `method`

Adds a certificate credential from the certificate store by distinguished name.

## Definition

```typescript
interface EntraIdApplicationResource {
  // ... omitted for brevity
  withCertificateDistinguishedName(
      storePath: string,
      distinguishedName: string): EntraIdApplicationResource;
}
```

## Signature

```typescript
withCertificateDistinguishedName(
    storePath: string,
    distinguishedName: string): EntraIdApplicationResource
```

## Parameters

- `storePath` (`string`)
- `distinguishedName` (`string`)

## Returns

[EntraIdApplicationResource](/reference/api/typescript/aspire.hosting.azure.entraid/entraidapplicationresource.md) `builder`

## Defined on

- [EntraIdApplicationResource](/reference/api/typescript/aspire.hosting.azure.entraid/entraidapplicationresource.md) -- `handle`
