# EntraIdScope Properties

- Package: [Aspire.Hosting.Azure.EntraId](/reference/api/csharp/aspire.hosting.azure.entraid.md)
- Type: [EntraIdScope](/reference/api/csharp/aspire.hosting.azure.entraid/entraidscope.md)
- Kind: `Properties`
- Members: `8`

Describes a delegated permission scope that an API registration created by Aspire exposes.

<a id="description"></a>

## Description

- Name: `Description`
- Modifiers: `get; set`
- Returns: `string`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/2d325b13709752ba6d9a943635c5e2940a2530c0/src/Aspire.Hosting.Azure.EntraId/EntraIdApi.cs)

Gets or sets what the scope allows, shown on the admin consent page.

```csharp
public string Description { get; set; }
```

<a id="displayname"></a>

## DisplayName

- Name: `DisplayName`
- Modifiers: `get; set`
- Returns: `string`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/2d325b13709752ba6d9a943635c5e2940a2530c0/src/Aspire.Hosting.Azure.EntraId/EntraIdApi.cs)

Gets or sets the scope's title, shown on the admin consent page. Defaults to [EntraIdScope.Name](/reference/api/csharp/aspire.hosting.azure.entraid/entraidscope/properties.md#name).

```csharp
public string DisplayName { get; set; }
```

<a id="id"></a>

## Id

- Name: `Id`
- Modifiers: `nullable` `get; set`
- Returns: `Guid?`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/2d325b13709752ba6d9a943635c5e2940a2530c0/src/Aspire.Hosting.Azure.EntraId/EntraIdApi.cs)

Gets or sets the scope's ID, which must stay the same across deployments.

```csharp
public Guid? Id { get; set; }
```

## Remarks

Aspire derives a stable ID for scopes of registrations it creates. Set the ID explicitly to adopt a scope that already exists, or for a scope of an existing registration, whose ID cannot be derived.

<a id="isenabled"></a>

## IsEnabled

- Name: `IsEnabled`
- Modifiers: `get; set`
- Returns: `bool`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/2d325b13709752ba6d9a943635c5e2940a2530c0/src/Aspire.Hosting.Azure.EntraId/EntraIdApi.cs)

Gets or sets whether clients can request the scope. Defaults to `true`.

```csharp
public bool IsEnabled { get; set; }
```

<a id="name"></a>

## Name

- Name: `Name`
- Modifiers: `get`
- Returns: `string`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/2d325b13709752ba6d9a943635c5e2940a2530c0/src/Aspire.Hosting.Azure.EntraId/EntraIdApi.cs#L368)

Gets the scope's name, the value that appears in the token's `scp` claim, such as `access_as_user`.

```csharp
public string Name { get; }
```

<a id="requiresadminconsent"></a>

## RequiresAdminConsent

- Name: `RequiresAdminConsent`
- Modifiers: `get; set`
- Returns: `bool`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/2d325b13709752ba6d9a943635c5e2940a2530c0/src/Aspire.Hosting.Azure.EntraId/EntraIdApi.cs)

Gets or sets whether only an administrator can consent to the scope. Defaults to `false`, which lets users consent.

```csharp
public bool RequiresAdminConsent { get; set; }
```

<a id="userconsentdescription"></a>

## UserConsentDescription

- Name: `UserConsentDescription`
- Modifiers: `nullable` `get; set`
- Returns: `string?`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/2d325b13709752ba6d9a943635c5e2940a2530c0/src/Aspire.Hosting.Azure.EntraId/EntraIdApi.cs)

Gets or sets what the scope allows, shown on the consent page for users. When `null`, [EntraIdScope.Description](/reference/api/csharp/aspire.hosting.azure.entraid/entraidscope/properties.md#description) is used.

```csharp
public string? UserConsentDescription { get; set; }
```

<a id="userconsentdisplayname"></a>

## UserConsentDisplayName

- Name: `UserConsentDisplayName`
- Modifiers: `nullable` `get; set`
- Returns: `string?`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/2d325b13709752ba6d9a943635c5e2940a2530c0/src/Aspire.Hosting.Azure.EntraId/EntraIdApi.cs)

Gets or sets the scope's title shown on the consent page for users. When `null`, [EntraIdScope.DisplayName](/reference/api/csharp/aspire.hosting.azure.entraid/entraidscope/properties.md#displayname) is used.

```csharp
public string? UserConsentDisplayName { get; set; }
```
