# MicrosoftGraphAppRoleAssignedTo

- 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/MicrosoftGraphPermissionGrants.cs)
- Inherits: `ProvisionableResource`

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

## Definition

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

public sealed class MicrosoftGraphAppRoleAssignedTo
    : Azure.Provisioning.Primitives.ProvisionableResource
{
    // ...
}
```

## Constructors

- [MicrosoftGraphAppRoleAssignedTo(string)](/reference/api/csharp/aspire.hosting.azure.entraid/microsoftgraphapproleassignedto/constructors.md#constructor-string) -- Models an app role assignment ( `appRoleAssignedTo`) that grants an application permission of an API to a client service principal.

## Properties

- [AppRoleId](/reference/api/csharp/aspire.hosting.azure.entraid/microsoftgraphapproleassignedto/properties.md#approleid) : `BicepValue<string>` `get; set` -- Gets or sets the ID of the app role, defined by the API's service principal, to assign.
- [Id](/reference/api/csharp/aspire.hosting.azure.entraid/microsoftgraphapproleassignedto/properties.md#id) : `BicepValue<string>` `get` -- Gets the role assignment's directory object ID.
- [PrincipalId](/reference/api/csharp/aspire.hosting.azure.entraid/microsoftgraphapproleassignedto/properties.md#principalid) : `BicepValue<string>` `get; set` -- Gets or sets the object ID of the client's service principal, which receives the role.
- [ResourceId](/reference/api/csharp/aspire.hosting.azure.entraid/microsoftgraphapproleassignedto/properties.md#resourceid) : `BicepValue<string>` `get; set` -- Gets or sets the object ID of the API's service principal, which defines the role.
