# EntraIdAppRole

- 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/EntraIdAppRole.cs)

Describes an application role declared on a Microsoft Entra ID application registration created by Aspire.

## Definition

```csharp
namespace Aspire.Hosting.Azure;

public sealed class EntraIdAppRole
{
    // ...
}
```

## Remarks

Application roles are separate from delegated scopes and from Azure RBAC roles. Declaring a role does not assign it to any principal.

## Constructors

- [EntraIdAppRole(string, string, string, IEnumerable<string>, Guid?, bool)](/reference/api/csharp/aspire.hosting.azure.entraid/entraidapprole/constructors.md#constructor-string-string-string-ienumerable-string-guid-bool) -- Initializes a new instance of the [EntraIdAppRole](/reference/api/csharp/aspire.hosting.azure.entraid/entraidapprole.md) class.

## Properties

- [AllowedMemberTypes](/reference/api/csharp/aspire.hosting.azure.entraid/entraidapprole/properties.md#allowedmembertypes) : `IReadOnlyList<string>` `get` -- Gets the member types the role can be assigned to, passed through to Microsoft Graph (for example `User` or `Application`).
- [Description](/reference/api/csharp/aspire.hosting.azure.entraid/entraidapprole/properties.md#description) : `string` `get` -- Gets the description shown in assignment and consent experiences.
- [DisplayName](/reference/api/csharp/aspire.hosting.azure.entraid/entraidapprole/properties.md#displayname) : `string` `get` -- Gets the display name shown in the Microsoft Entra admin center.
- [Id](/reference/api/csharp/aspire.hosting.azure.entraid/entraidapprole/properties.md#id) : `Guid?` `get` -- Gets the explicitly configured role ID, or `null` when the ID is derived from the application name and role value.
- [IsEnabled](/reference/api/csharp/aspire.hosting.azure.entraid/entraidapprole/properties.md#isenabled) : `bool` `get` -- Gets whether the role can be assigned to new principals. A disabled role is still issued in tokens for existing assignments, so this is not access revocation. Microsoft Graph requires a role to be disabled before it is removed.
- [Value](/reference/api/csharp/aspire.hosting.azure.entraid/entraidapprole/properties.md#value) : `string` `get` -- Gets the value emitted in the `roles` claim of tokens issued with this role.
