# EntraIdClientCredential

- Kind: `class`
- Package: [Aspire.Hosting.Azure.EntraId](/reference/api/csharp/aspire.hosting.azure.entraid.md)
- Version: `17.0.0-preview.1.26567.5`
- Namespace: `Aspire.Hosting.Azure`
- Target framework: `net10.0`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/2d325b13709752ba6d9a943635c5e2940a2530c0/src/Aspire.Hosting.Azure.EntraId/EntraIdApplicationResource.cs)

Base class for client credential entries in an Entra ID application registration.

## Definition

```csharp
namespace Aspire.Hosting.Azure;

public abstract class EntraIdClientCredential
{
    // ...
}
```

## Remarks

Each subclass corresponds to a specific `SourceType` in the Microsoft.Identity.Web `ClientCredentials` configuration array. Use one of the concrete types:

- [EntraIdClientSecretCredential](/reference/api/csharp/aspire.hosting.azure.entraid/entraidclientsecretcredential.md) -- application secret.
- [EntraIdFederatedIdentityCredential](/reference/api/csharp/aspire.hosting.azure.entraid/entraidfederatedidentitycredential.md) -- FIC with managed identity.
- [EntraIdKeyVaultCertificateCredential](/reference/api/csharp/aspire.hosting.azure.entraid/entraidkeyvaultcertificatecredential.md) -- certificate from Azure Key Vault.
- [EntraIdStoreCertificateCredential](/reference/api/csharp/aspire.hosting.azure.entraid/entraidstorecertificatecredential.md) -- certificate from the certificate store.
- [EntraIdFileCertificateCredential](/reference/api/csharp/aspire.hosting.azure.entraid/entraidfilecertificatecredential.md) -- certificate from a file on disk.
- [EntraIdSignedAssertionFileCredential](/reference/api/csharp/aspire.hosting.azure.entraid/entraidsignedassertionfilecredential.md) -- signed assertion file (AKS workload identity).

## Properties

- [SourceType](/reference/api/csharp/aspire.hosting.azure.entraid/entraidclientcredential/properties.md#sourcetype) : `string` `abstract` `get` -- Gets the `SourceType` string used in the Microsoft.Identity.Web configuration.
