# MicrosoftGraphServicePrincipal Properties

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

Models the service principal created for an Entra application registration.

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

## AccountEnabled

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

Gets or sets whether the service principal is enabled. When `false`, no user can sign in to the application.

```csharp
public BicepValue<bool> AccountEnabled { get; set; }
```

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

## AppId

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

Gets or sets the associated application's client ID.

```csharp
public BicepValue<string> AppId { get; set; }
```

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

## AppRoleAssignmentRequired

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

Gets or sets whether users or other service principals need an app role assignment before they can sign in or get tokens.

```csharp
public BicepValue<bool> AppRoleAssignmentRequired { get; set; }
```

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

## Description

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

Gets or sets a description of the service principal, shown to end users in portals such as My Apps.

```csharp
public BicepValue<string> Description { get; set; }
```

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

## Id

- Name: `Id`
- Modifiers: `get`
- Returns: `BicepValue<string>`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/2d325b13709752ba6d9a943635c5e2940a2530c0/src/Aspire.Hosting.Azure.EntraId/Provisioning/MicrosoftGraphServicePrincipal.cs#L20)

Gets the service principal's directory object ID.

```csharp
public BicepValue<string> Id { get; }
```

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

## Notes

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

Gets or sets notes for managing the service principal.

```csharp
public BicepValue<string> Notes { get; set; }
```

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

## NotificationEmailAddresses

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

Gets or sets the email addresses that receive notifications, such as certificate expiry.

```csharp
public BicepList<string> NotificationEmailAddresses { get; set; }
```

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

## Owners

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

Gets or sets the directory object IDs of the service principal's owners.

```csharp
public BicepList<string> Owners { get; set; }
```

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

## Tags

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

Gets or sets the custom strings used to categorize the service principal.

```csharp
public BicepList<string> Tags { get; set; }
```

## Remarks

Add to this collection to preserve Aspire's `WindowsAzureActiveDirectoryIntegratedApp` tag, which makes the service principal visible in the Enterprise applications list.
