Identity Azure Policy premium

Assignment managed identity

Assignment managed identity is the identity Azure Policy uses when a policy assignment must change resources during remediation. It matters most for effects such as modify and deployIfNotExists, where Policy is not just reporting non-compliance but attempting to fix or deploy something. The identity needs Azure RBAC permissions at the right scope. Without those roles, remediation fails even if the policy definition is correct. Think of it as the hands Azure Policy uses to do work, and those hands must be deliberately permissioned.

Aliases
Policy assignment identity, Azure Policy managed identity, policy remediation identity, assignment identity
Difficulty
intermediate
CLI mappings
2
Last verified
2026-05-11T02:06:15Z

Microsoft Learn

An assignment managed identity is the system-assigned or user-assigned managed identity associated with an Azure Policy assignment, commonly used to authorize remediation for modify or deployIfNotExists effects.

Microsoft Learn: Details of the policy assignment structure2026-05-11T02:06:15Z

Technical context

Technically, a policy assignment can have one system-assigned or user-assigned managed identity. The identity is referenced on the assignment and then granted the Azure RBAC roles required by the policy definition’s remediation operations. DeployIfNotExists and modify policies commonly require it, while simple audit policies usually do not. The assignment identity is separate from the user who created the policy and from the resources being remediated. Important evidence includes assignment scope, identity principal ID, role assignments, effect type, remediation task status, and deployment errors.

Why it matters

Assignment managed identity matters because many Azure Policy failures are really identity failures. A policy can evaluate correctly, mark resources non-compliant, and still fail remediation because its identity lacks permission to create diagnostic settings, add tags, configure identity, deploy agents, or modify resource properties. Over-permissioning the identity creates security risk; under-permissioning creates false confidence and operational noise. At scale, user-assigned identities can reduce Entra churn and centralize role review, but they also require careful lifecycle management. The term gives operators a clear checkpoint: identify which principal Policy uses, what it can change, and whether that access matches the intended remediation.

Where you see it

Signals, screens, and Azure surfaces where this term usually becomes operational.

Signal 01

You see assignment managed identity in Azure Policy assignment JSON, portal assignment settings, identity blades, and az policy assignment identity output. during troubleshooting, ownership review, remediation planning, and release readiness.

Signal 02

It appears when modify or deployIfNotExists policies need permission to remediate non-compliant resources at assignment scope. during troubleshooting, ownership review, remediation planning, and release readiness.

Signal 03

It also shows up in failed remediation tasks where policy logic is correct but the identity lacks required Azure RBAC roles. during troubleshooting, ownership review, remediation planning, and release readiness.

When this becomes relevant

Specific situations where this term helps solve real Azure design, operations, migration, security, reliability, cost, or governance problems.

  • Allow Azure Policy remediation tasks to deploy or modify resources safely.
  • Grant least-privilege RBAC to the identity attached to a policy assignment.
  • Separate governance automation permissions from human operator accounts.
  • Troubleshoot remediation failures caused by missing role assignments.

Real-world case studies

Different enterprise-style examples that show the term being used to hit measurable objectives.

Case study 01

Assignment managed identity in action

Scenario, objectives, solution, measured impact, and takeaway.

Scenario

SafeHarbor Finance assigned a policy to deploy diagnostic settings across subscriptions, but remediation failed for several regulated workloads.

Business/Technical Objectives
  • Enable diagnostic settings consistently across production resources.
  • Use least-privilege authorization for policy remediation.
  • Reduce failed remediation tasks before audit evidence collection.
  • Document which identity performed each governance action.
Solution Using Assignment managed identity

The cloud governance team inspected the policy assignment identity and found that it existed but had no role assignments at several target scopes. Instead of granting broad Contributor, architects mapped the policy’s deployment actions to the minimum required roles. They used a user-assigned managed identity for the management-group rollout and granted scoped permissions at subscription level. CLI evidence captured principal ID, assignment scope, role assignments, and remediation task status. A pilot remediation ran against one subscription before the assignment expanded to the full regulated estate. They also documented owners, review cadence, rollback steps, acceptance criteria, and success thresholds so the pattern could be reused by adjacent teams without redesign.

Results & Business Impact
  • Failed remediation tasks dropped from 38% to under 2%.
  • Audit evidence showed the exact principal used for every diagnostic deployment.
  • Broad Contributor grants were avoided across six production subscriptions.
  • Diagnostic coverage reached 97% before the audit deadline.
Key Takeaway for Glossary Readers

Policy remediation succeeds when the assignment identity has deliberate, scoped permissions that match the policy action.

Case study 02

Assignment managed identity in action

Scenario, objectives, solution, measured impact, and takeaway.

Scenario

Northwind Robotics used Azure Policy to add required tags, but factory subscriptions showed inconsistent compliance after each monthly rollout.

Business/Technical Objectives
  • Apply cost-center and environment tags automatically.
  • Avoid giving engineers manual tag-write access everywhere.
  • Find why modify remediation worked in some subscriptions only.
  • Standardize identity handling across factory landing zones.
Solution Using Assignment managed identity

Operators compared the policy assignment identity across subscriptions and discovered that system-assigned identities had been created independently with inconsistent role grants. The platform team switched to a user-assigned identity owned by the governance group, granted Tag Contributor at the required scopes, and updated the policy assignment process. CLI checks became part of the landing-zone validation pipeline, confirming identity principal ID and role assignment before remediation tasks ran. The team also added alerts for failed modify operations so drift appeared quickly. They also documented owners, review cadence, rollback steps, acceptance criteria, and success thresholds so the pattern could be reused by adjacent teams without redesign.

Results & Business Impact
  • Tag compliance improved from 71% to 98% in two rollout cycles.
  • Manual tag correction tickets fell by 64%.
  • Landing-zone validation caught missing identity roles before production assignment.
  • Finance reporting errors from untagged resources dropped materially by quarter end.
Key Takeaway for Glossary Readers

A reusable assignment identity can make policy operations consistent when its roles and ownership are tightly governed.

Case study 03

Assignment managed identity in action

Scenario, objectives, solution, measured impact, and takeaway.

Scenario

TerraMesa Energy needed Azure Policy to deploy monitoring agents to field subscriptions managed by separate regional teams.

Business/Technical Objectives
  • Remediate missing monitoring agents without regional administrator action.
  • Respect subscription boundaries and local operational ownership.
  • Prevent over-privileged central automation identities.
  • Track remediation success across remote field environments.
Solution Using Assignment managed identity

The central platform team created one user-assigned managed identity per region and attached it to the relevant policy assignments. Each identity received only the roles required to deploy the monitoring extension in that region’s subscriptions. CLI runbooks listed assignment identity, role scope, and remediation deployment status after each wave. Regional owners approved the scopes before rollout, and failed tasks were routed to the local operations queue with authorization details included. The design avoided a single tenant-wide identity while still letting policy perform consistent remediation. They also documented owners, review cadence, rollback steps, acceptance criteria, and success thresholds so the pattern could be reused by adjacent teams without redesign. They also documented owners, review cadence, rollback steps, acceptance criteria, and success thresholds so the pattern could be reused by adjacent teams without redesign.

Results & Business Impact
  • Monitoring-agent compliance rose from 62% to 95% across field subscriptions.
  • No central identity received tenant-wide Contributor access.
  • Regional teams resolved failed remediation tasks 41% faster with principal evidence.
  • Operations gained a repeatable pattern for future policy-driven deployments.
Key Takeaway for Glossary Readers

Assignment managed identity design should match organizational ownership as much as technical policy requirements.

Why use Azure CLI for this?

Azure CLI is useful for assignment managed identity because identity and role evidence must be exact. CLI can show the policy assignment identity, assign or remove it, and list role assignments for the principal at the relevant scope. Use read-only commands first to prove the current state, then apply changes through controlled deployment or change management. Saved JSON output helps auditors see why remediation could or could not run.

CLI use cases

  • Show the managed identity attached to a policy assignment before starting remediation tasks.
  • List role assignments for the identity principal to confirm least-privilege remediation access.
  • Assign a system-assigned or user-assigned identity as part of a controlled policy rollout.
  • Troubleshoot failed remediation by comparing required roles with the identity’s actual permissions.

Before you run CLI

  • Confirm policy assignment name, scope, effect type, and whether remediation truly requires an identity.
  • Identify the minimum Azure RBAC roles required by the policy definition and target resources.
  • Decide whether a system-assigned or user-assigned identity better fits lifecycle and review needs.
  • Check management group, subscription, and resource group scope before granting permissions to the principal.

What output tells you

  • Identity output shows the principal ID and type used by Azure Policy for remediation authorization.
  • Role assignment output proves whether the identity can perform the actions required by the policy effect.
  • Remediation errors often reveal missing permissions, wrong scope, deleted identity, or blocked deployments.
  • An empty identity result may be correct for audit-only policies but wrong for modify or deployIfNotExists assignments.

Mapped Azure CLI commands

Show policy assignment identity

az policy assignment identity show --name <assignment-name> --scope <scope>
az policy assignment identitydiscoverIdentity

List role assignments for identity

az role assignment list --assignee <principal-id> --scope <scope>
az role assignmentdiscoverIdentity

Architecture context

Security: Security for assignment managed identity is a least-privilege problem. The identity may be able to deploy resources, modify configuration, assign settings, or touch many subscriptions if the policy assignment is broad. Grant only the roles required for the remediation task, and prefer scoped assignments over tenant-wide convenience. Review whether a user-assigned identity is reused across policies, because one compromised or over-privileged identity can affect many controls. Monitor role assignments, remediation deployments, and policy changes. Do not assume the identity is safe because it is managed; it still represents an Azure principal with real authority. Access reviews, logging, and exception handling keep the control accountable beyond the initial configuration and rollout. Reliability: Reliability depends on the identity being present, permissioned, and stable for the life of the assignment. If a system-assigned identity is deleted with the assignment, remediation history and future tasks can break. If a user-assigned identity is moved, disabled, or stripped of roles, previously working remediation may begin failing. Reliable policy operations verify identity principal IDs, role assignments, assignment scope, and remediation task results after deployment. Runbooks should explain how to recreate or reassign identity safely. For critical governance controls, alerts should catch failed remediation tasks before compliance gaps accumulate across subscriptions. Runbooks should capture expected behavior, safe fallback choices, owner escalation paths, and validation after change. Operations: Operationally, assignment managed identity belongs in every Azure Policy rollout checklist. Before assigning a modify or deployIfNotExists policy, operators should confirm the effect, required roles, identity type, scope, and remediation plan. CLI checks should show the policy assignment identity and the matching role assignments. After deployment, run a small remediation test and inspect deployment or remediation task errors. Changes should be recorded because policy assignments often outlive the engineer who created them. During audits, evidence should show why the identity has each role and which policy objective requires it. Clear ownership, repeatable checks, dated notes, and escalation paths prevent the signal from becoming tribal knowledge. Cost: Cost impact is indirect but important. Failed remediation can leave resources without required diagnostics, backup, tags, or governance settings, which can increase incident labor, compliance work, and untracked spend. Overly broad identities may allow policy-driven deployments that create unexpected resources or enable expensive settings across many subscriptions. User-assigned identities can reduce identity churn, but centralized identities require review and management. The practical cost discipline is to test remediation on a narrow scope, estimate what the policy will deploy or modify, and monitor both failures and unexpected successful deployments after broad assignment. Cost owners should tie the setting to retention, scale, support effort, and realistic recovery expectations. Performance: Performance is not about application latency; it is about policy evaluation and remediation throughput. A policy assignment with a managed identity may trigger deployments or modifications across many resources, and those tasks can take time, queue, throttle, or fail. Large scopes should be rolled out in waves, with remediation tasks monitored for completion and errors. The identity’s permissions affect whether work proceeds efficiently or stalls. Avoid repeatedly launching broad remediation before earlier tasks finish. Operators should measure compliance trend, remediation duration, deployment failures, and throttling so governance automation improves the estate without creating control-plane noise. Teams should validate latency, throughput, saturation, cache behavior, and user impact before treating the setting as harmless.

Security

Security for assignment managed identity is a least-privilege problem. The identity may be able to deploy resources, modify configuration, assign settings, or touch many subscriptions if the policy assignment is broad. Grant only the roles required for the remediation task, and prefer scoped assignments over tenant-wide convenience. Review whether a user-assigned identity is reused across policies, because one compromised or over-privileged identity can affect many controls. Monitor role assignments, remediation deployments, and policy changes. Do not assume the identity is safe because it is managed; it still represents an Azure principal with real authority. Access reviews, logging, and exception handling keep the control accountable beyond the initial configuration and rollout.

Cost

Cost impact is indirect but important. Failed remediation can leave resources without required diagnostics, backup, tags, or governance settings, which can increase incident labor, compliance work, and untracked spend. Overly broad identities may allow policy-driven deployments that create unexpected resources or enable expensive settings across many subscriptions. User-assigned identities can reduce identity churn, but centralized identities require review and management. The practical cost discipline is to test remediation on a narrow scope, estimate what the policy will deploy or modify, and monitor both failures and unexpected successful deployments after broad assignment. Cost owners should tie the setting to retention, scale, support effort, and realistic recovery expectations.

Reliability

Reliability depends on the identity being present, permissioned, and stable for the life of the assignment. If a system-assigned identity is deleted with the assignment, remediation history and future tasks can break. If a user-assigned identity is moved, disabled, or stripped of roles, previously working remediation may begin failing. Reliable policy operations verify identity principal IDs, role assignments, assignment scope, and remediation task results after deployment. Runbooks should explain how to recreate or reassign identity safely. For critical governance controls, alerts should catch failed remediation tasks before compliance gaps accumulate across subscriptions. Runbooks should capture expected behavior, safe fallback choices, owner escalation paths, and validation after change.

Performance

Performance is not about application latency; it is about policy evaluation and remediation throughput. A policy assignment with a managed identity may trigger deployments or modifications across many resources, and those tasks can take time, queue, throttle, or fail. Large scopes should be rolled out in waves, with remediation tasks monitored for completion and errors. The identity’s permissions affect whether work proceeds efficiently or stalls. Avoid repeatedly launching broad remediation before earlier tasks finish. Operators should measure compliance trend, remediation duration, deployment failures, and throttling so governance automation improves the estate without creating control-plane noise. Teams should validate latency, throughput, saturation, cache behavior, and user impact before treating the setting as harmless.

Operations

Operationally, assignment managed identity belongs in every Azure Policy rollout checklist. Before assigning a modify or deployIfNotExists policy, operators should confirm the effect, required roles, identity type, scope, and remediation plan. CLI checks should show the policy assignment identity and the matching role assignments. After deployment, run a small remediation test and inspect deployment or remediation task errors. Changes should be recorded because policy assignments often outlive the engineer who created them. During audits, evidence should show why the identity has each role and which policy objective requires it. Clear ownership, repeatable checks, dated notes, and escalation paths prevent the signal from becoming tribal knowledge.

Common mistakes

  • Creating a remediation policy but forgetting to attach or permission the assignment managed identity.
  • Granting Contributor broadly when a narrower role and scope would satisfy the remediation action.
  • Deleting or replacing a user-assigned identity without checking all policy assignments that reuse it.
  • Blaming the policy rule when the remediation failure is caused by missing Azure RBAC roles.