# AzureSandboxGroupResource.WithAcrPullIdentity

- Module: [Aspire.Hosting.Azure.Sandboxes](/reference/api/go/aspire.hosting.azure.sandboxes.md)
- Defined on: [AzureSandboxGroupResource](/reference/api/go/aspire.hosting.azure.sandboxes/azuresandboxgroupresource.md)
- Version: `17.0.0-preview.1.26565.2`
- Kind: `method`

Configures the user-assigned managed identity that Azure Dev Compute uses to pull sandbox images from the configured Azure Container Registry.

## Remarks

The supplied identity must be attached to an existing sandbox group and have the `AcrPull`
role on its registry. For sandbox groups created by Aspire, the identity is attached automatically,
but the caller remains responsible for granting `AcrPull`.

## Definition

```go
type AzureSandboxGroupResource interface {
    // ... omitted for brevity
    WithAcrPullIdentity(identity AzureUserAssignedIdentityResource) AzureSandboxGroupResource
}
```

## Signature

```go
WithAcrPullIdentity(identity AzureUserAssignedIdentityResource) AzureSandboxGroupResource
```

## Parameters

- `identity` ([`AzureUserAssignedIdentityResource`](/reference/api/go/aspire.hosting.azure.sandboxes/azureuserassignedidentityresource.md)) -- The user-assigned managed identity resource.

## Returns

[`AzureSandboxGroupResource`](/reference/api/go/aspire.hosting.azure.sandboxes/azuresandboxgroupresource.md) -- The resource builder.

Returns a handle; failures surface later via `Err()`.

## Defined on

- [AzureSandboxGroupResource](/reference/api/go/aspire.hosting.azure.sandboxes/azuresandboxgroupresource.md) -- `handle`
