# MicrosoftGraphAppRoleAssignedTo Properties

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

Models an app role assignment ( `appRoleAssignedTo`) that grants an application permission of an API to a client service principal.

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

## AppRoleId

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

Gets or sets the ID of the app role, defined by the API's service principal, to assign.

```csharp
public BicepValue<string> AppRoleId { 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/MicrosoftGraphPermissionGrants.cs#L77)

Gets the role assignment's directory object ID.

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

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

## PrincipalId

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

Gets or sets the object ID of the client's service principal, which receives the role.

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

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

## ResourceId

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

Gets or sets the object ID of the API's service principal, which defines the role.

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