# MicrosoftGraphKeyCredential

- 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.EntraId.Provisioning`
- Target framework: `net10.0`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/2d325b13709752ba6d9a943635c5e2940a2530c0/src/Aspire.Hosting.Azure.EntraId/Provisioning/MicrosoftGraphKeyCredential.cs)
- Inherits: `ProvisionableConstruct`

Models a public certificate credential declared on a Microsoft Graph application.

## Definition

```csharp
namespace Aspire.Hosting.Azure.EntraId.Provisioning;

public sealed class MicrosoftGraphKeyCredential
    : Azure.Provisioning.Primitives.ProvisionableConstruct
{
    // ...
}
```

## Constructors

- [MicrosoftGraphKeyCredential](/reference/api/csharp/aspire.hosting.azure.entraid/microsoftgraphkeycredential/constructors.md#constructor)

## Properties

- [CustomKeyIdentifier](/reference/api/csharp/aspire.hosting.azure.entraid/microsoftgraphkeycredential/properties.md#customkeyidentifier) : `BicepValue<string>` `get; set` -- Gets or sets the custom identifier for the key, encoded as base64.
- [DisplayName](/reference/api/csharp/aspire.hosting.azure.entraid/microsoftgraphkeycredential/properties.md#displayname) : `BicepValue<string>` `get; set` -- Gets or sets the credential's display name.
- [EndDateTime](/reference/api/csharp/aspire.hosting.azure.entraid/microsoftgraphkeycredential/properties.md#enddatetime) : `BicepValue<string>` `get; set` -- Gets or sets the credential's expiration date and time in ISO 8601 format.
- [Key](/reference/api/csharp/aspire.hosting.azure.entraid/microsoftgraphkeycredential/properties.md#key) : `BicepValue<string>` `get; set` -- Gets or sets the base64-encoded public certificate. Do not supply a private key.
- [KeyId](/reference/api/csharp/aspire.hosting.azure.entraid/microsoftgraphkeycredential/properties.md#keyid) : `BicepValue<string>` `get; set` -- Gets or sets the credential's key ID.
- [StartDateTime](/reference/api/csharp/aspire.hosting.azure.entraid/microsoftgraphkeycredential/properties.md#startdatetime) : `BicepValue<string>` `get; set` -- Gets or sets when the credential becomes valid, in ISO 8601 format.
- [Type](/reference/api/csharp/aspire.hosting.azure.entraid/microsoftgraphkeycredential/properties.md#type) : `BicepValue<string>` `get; set` -- Gets or sets the key type, such as `AsymmetricX509Cert`.
- [Usage](/reference/api/csharp/aspire.hosting.azure.entraid/microsoftgraphkeycredential/properties.md#usage) : `BicepValue<string>` `get; set` -- Gets or sets the key usage, such as `Verify`.
