Microsoft Entra Workload ID

Assignment restriction for managed identities (preview)

In brief

Learn how assignment restrictions scope a user-assigned managed identity to one or more resource providers to improve security and resilience.

Documentation change

Note about supported Resource Providers and Resource Types in the Azure portal

The Select Resource Types pane in the Azure portal does not display all resource providers and resource types that support managed identities. If the resource you want to configure is not listed, use the Azure CLI to create or update the identity assignment. Refer to the Azure CLI examples below for resources that are not currently available in the Select Resource Types list.

Create an identity with resource assignment restrictions

az identity create \
  --name MyIdentity \
  --resource-group MyResourceGroup \
  --resource-restriction '{"providers": ["Microsoft.Compute", "Microsoft.Storage/Accounts"]}'

Update an identity to restrict assignment to specific resources

az identity update \
  --name MyIdentity \
  --resource-group MyResourceGroup \
  --resource-restriction '{"providers": ["Microsoft.Compute", "Microsoft.Storage/Accounts"]}'

List the associated resources for an identity

az identity list-resources \
  --name MyIdentity \
  --resource-group MyResourceGroup

Create an unrestricted identity

Assignment restriction for user-assigned managed identities (preview)

az identity create \
--name MyIdentity \
--resource-group MyResourceGroup \
--resource-restriction '{"providers": []}'

Remove all resource provider restrictions from an identity

az identity update \
--name MyIdentity \
--resource-group MyResourceGroup \
--resource-restriction '{"providers": []}'

Assignment restriction for user-assigned managed identities (Preview)

Assignment restrictions, also known as resource restrictions, are a security feature for user-assigned managed identities that limit the resource providers an identity can be assigned to. It is currently a public preview feature. Assignment restrictions let you isolate a managed identity to one or more resource providers so that it can't be reused across unrelated services.

Assignment restrictions, also known as resource restrictions, are a security feature for user-assigned managed identities that limit the resource providers an identity can be assigned to. Assignment restrictions are currently in preview. They let you isolate a managed identity to one or more resource providers so that it can't be reused across unrelated services.

When you configure assignment restriction, managed identity usage stays tightly scoped. This scoping reduces the blast radius of a compromised or misconfigured identity and helps improve both security and resilience.

  • Match managed identity scope to the intended source resources only.
  • Avoid reusing managed identities across unrelated workloads for convenience.

Supported resource providers and resource types in the Azure portal

If the resource provider or resource type you want to configure isn't listed in the Select Resource Types pane, use the Azure CLI. For configuration steps and command examples, see Configure assignment restriction for user-assigned managed identities.