# AzureUserAssignedIdentityResource

- Kind: `class`
- Package: [Aspire.Hosting.Azure](/reference/api/csharp/aspire.hosting.azure.md)
- Version: `13.4.0`
- Namespace: `Aspire.Hosting.Azure`
- Target framework: `net8.0`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/cbc352350f1a9bafbaff10d14a2c8de4ac186a48/src/Aspire.Hosting.Azure/AzureUserAssignedIdentityResource.cs)
- Inherits: [AzureProvisioningResource](/reference/api/csharp/aspire.hosting.azure/azureprovisioningresource.md)
- Implements: [IAppIdentityResource](/reference/api/csharp/aspire.hosting.azure/iappidentityresource.md)

An Azure Provisioning resource that represents an Azure user assigned managed identity.

## Definition

```csharp
namespace Aspire.Hosting.Azure;

public sealed class AzureUserAssignedIdentityResource
    : Aspire.Hosting.Azure.AzureProvisioningResource,
      Aspire.Hosting.Azure.IAppIdentityResource
{
    // ...
}
```

## Constructors

- [AzureUserAssignedIdentityResource(string)](/reference/api/csharp/aspire.hosting.azure/azureuserassignedidentityresource/constructors.md#constructor-string) -- An Azure Provisioning resource that represents an Azure user assigned managed identity.

## Properties

- [ClientId](/reference/api/csharp/aspire.hosting.azure/azureuserassignedidentityresource/properties.md#clientid) : [BicepOutputReference](/reference/api/csharp/aspire.hosting.azure/bicepoutputreference.md) `get` -- The client ID of the user assigned identity.
- [Id](/reference/api/csharp/aspire.hosting.azure/azureuserassignedidentityresource/properties.md#id) : [BicepOutputReference](/reference/api/csharp/aspire.hosting.azure/bicepoutputreference.md) `get` -- The identifier associated with the user assigned identity.
- [NameOutputReference](/reference/api/csharp/aspire.hosting.azure/azureuserassignedidentityresource/properties.md#nameoutputreference) : [BicepOutputReference](/reference/api/csharp/aspire.hosting.azure/bicepoutputreference.md) `get` -- The name of the user assigned identity.
- [PrincipalId](/reference/api/csharp/aspire.hosting.azure/azureuserassignedidentityresource/properties.md#principalid) : [BicepOutputReference](/reference/api/csharp/aspire.hosting.azure/bicepoutputreference.md) `get` -- The principal ID of the user assigned identity.
- [PrincipalName](/reference/api/csharp/aspire.hosting.azure/azureuserassignedidentityresource/properties.md#principalname) : [BicepOutputReference](/reference/api/csharp/aspire.hosting.azure/bicepoutputreference.md) `get` -- The principal name of the user assigned identity.

## Methods

- [AddAsExistingResource(AzureResourceInfrastructure)](/reference/api/csharp/aspire.hosting.azure/azureuserassignedidentityresource/methods.md#addasexistingresource-azureresourceinfrastructure) : `ProvisionableResource` -- Adds a new `Primitives.ProvisionableResource` into `infra`. The new resource represents a reference to the current [AzureProvisioningResource](/reference/api/csharp/aspire.hosting.azure/azureprovisioningresource.md) via https://learn.microsoft.com/azure/azure-resource-manager/bicep/existing-resource.
