Management and Governance Azure Policy field-manual-complete field-manual field-manual-complete

Subscription policy assignment

A subscription policy assignment is a rule or initiative applied to an entire Azure subscription. Instead of assigning the policy one resource group at a time, the assignment covers all resource groups and resources under that subscription unless exclusions or exemptions narrow it. It can audit, deny, append, modify, or deploy supporting settings depending on the policy effect. Think of it as a subscription-wide guardrail with parameters, scope, enforcement mode, and compliance reporting. It is powerful because it is broad, so it deserves careful review before production use.

Aliases
subscription scoped policy assignment, Azure Policy assignment at subscription scope, subscription governance assignment
Difficulty
intermediate
CLI mappings
5
Last verified
2026-05-27T00:14:14Z

Microsoft Learn

A subscription policy assignment applies an Azure Policy definition or initiative at subscription scope. The assignment determines which resources in that subscription are evaluated, which parameter values are used, whether enforcement is active, and which child resource groups or resources are excluded.

Microsoft Learn: Details of the policy assignment structure2026-05-27T00:14:14Z

Technical context

In Azure architecture, a subscription policy assignment lives in the Azure Resource Manager control plane and uses Azure Policy evaluation. The assignment references a policy definition or initiative, supplies parameter values, and targets the subscription resource ID as scope. Child resource groups and resources are included unless notScopes or exemptions apply. Assignments with modify or deployIfNotExists effects may need a managed identity and permissions for remediation. Operators inspect assignment JSON, policy states, compliance results, remediation tasks, exemptions, noncompliance messages, and enforcement mode through portal, CLI, REST, and Resource Graph.

Why it matters

Subscription policy assignment matters because it changes governance from advice into evaluated behavior. A well-designed assignment can require diagnostic settings, block public IP addresses, enforce tags, restrict regions, or audit encryption across a whole subscription. A poorly designed assignment can break deployments, generate false compliance noise, or remediate resources with permissions the team did not understand. The subscription boundary is large enough to help platform teams standardize controls, but narrow enough to let different workload subscriptions use different parameters. This is where policy-as-code becomes real operations. Teams need to know which assignments are enforcing, which are auditing, and which exceptions are intentional.

Where you see it

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

Signal 01

In the Azure Policy Assignments blade, the assignment shows subscription scope, definition or initiative, parameters, enforcement mode, exclusions, identity, and compliance status for production review.

Signal 02

In CLI output from az policy assignment show, fields such as scope, policyDefinitionId, parameters, notScopes, and identity explain exactly what the subscription inherits today safely.

Signal 03

In deployment failures and policy state records, denied or noncompliant resources reference the assignment name, effect, policy definition, and resource scope that triggered evaluation during deployment.

When this becomes relevant

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

  • Enforce required diagnostic settings across every resource group in a production subscription without editing each workload template.
  • Audit or deny public network exposure in a sensitive subscription while allowing different rules for development subscriptions.
  • Parameterize allowed regions at subscription scope when one business unit has stricter data residency requirements.
  • Deploy missing security agents or settings through deployIfNotExists after assigning the correct managed identity permissions.
  • Stage a policy from audit to enforcement after teams remediate noncompliant resources and exceptions are documented.

Real-world case studies

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

Case study 01

University enforces research diagnostics without blocking grants

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

Scenario

A university cloud team needed diagnostic settings across grant-funded research subscriptions. Previous reminders were ignored, and investigators discovered missing logs only after experiments failed compliance review.

Business/Technical Objectives
  • Apply a subscription-wide diagnostic policy without rewriting every lab template.
  • Start in audit mode so active experiments were not interrupted.
  • Remediate missing diagnostic settings through a controlled identity.
  • Give grant administrators measurable compliance evidence.
Solution Using Subscription policy assignment

The platform team assigned an initiative at each research subscription scope with parameters for the approved Log Analytics workspace and required resource types. The assignment began with enforcement disabled, allowing teams to view noncompliance without blocking deployments. After two weeks of remediation planning, the team enabled deployIfNotExists for supported resources and granted the assignment identity only the roles needed to create diagnostic settings. CLI commands listed assignments, exported parameters, and queried policy states by principal investigator subscription. Noncompliance messages explained which diagnostic setting was missing and where researchers could request an exception.

Results & Business Impact
  • Diagnostic coverage rose from 61% to 96% across active research subscriptions in one month.
  • No running experiments were stopped during the audit-mode stage.
  • Grant compliance evidence collection dropped from two days to three hours per review cycle.
  • Remediation failures were reduced to 14 known unsupported resource cases with documented exceptions.
Key Takeaway for Glossary Readers

Subscription policy assignments work best when broad controls are staged, parameterized, and paired with remediation ownership.

Case study 02

Mining operator blocks unapproved public exposure

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

Scenario

A mining operator managed Azure subscriptions for remote site analytics. Several field teams accidentally deployed public IP addresses in subscriptions that were supposed to communicate only through private connectivity.

Business/Technical Objectives
  • Deny new public IP resources in site operations subscriptions.
  • Allow documented exceptions for vendor transition projects with expiration dates.
  • Keep development subscriptions under audit instead of immediate denial.
  • Show security leadership whether the policy reduced exposure.
Solution Using Subscription policy assignment

Security architects created a policy definition for public network exposure and assigned it at subscription scope for each site operations subscription. Production assignments used deny enforcement, while development subscriptions used audit parameters. Existing vendor projects received scoped exemptions with owners and expiration dates. Operators used CLI to list assignment scope, confirm enforcement mode, and query policy states after rollout. Deployment failure messages were rewritten to name the approved private connectivity pattern. Security dashboards separated denied production attempts from audited development findings so leadership could see whether teams were changing behavior rather than only seeing pass or fail counts.

Results & Business Impact
  • New public IP deployments in production site subscriptions fell from 22 per month to zero.
  • Four vendor exceptions were approved, tracked, and retired before their expiration dates.
  • Development findings dropped 58% after teams updated templates to use private endpoints.
  • Security review time for new site analytics projects fell from five days to two days.
Key Takeaway for Glossary Readers

A subscription policy assignment can turn a security architecture decision into enforceable deployment behavior with measurable outcomes.

Case study 03

Museum consortium standardizes tags for shared funding

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

Scenario

A consortium of museums shared Azure subscriptions for digitization projects funded by different grants. Missing tags made it impossible to separate preservation, education, and public-access spending accurately.

Business/Technical Objectives
  • Require grant, collection, and owner tags across shared project subscriptions.
  • Avoid blocking urgent archival work while teams cleaned up existing resources.
  • Create compliance reports that finance staff could understand without Azure expertise.
  • Reduce manual cost allocation corrections before quarterly reporting.
Solution Using Subscription policy assignment

The cloud administrator assigned tag governance policies at subscription scope with parameters for required tag names and approved values. The first assignment used audit and append effects for supported resources, with clear noncompliance messages explaining the missing tag. After collection managers validated the tag taxonomy, enforcement was tightened for new resource groups and common resource types. CLI exports captured assignment IDs, parameter files, and compliance counts for each subscription. Finance received a workbook showing noncompliant resources by grant and owner. Temporary exemptions were allowed only for migration resource groups and expired after the archive ingestion window closed.

Results & Business Impact
  • Required tag coverage increased from 54% to 98% across digitization subscriptions.
  • Quarterly cost allocation corrections dropped from 73 line items to 11.
  • No emergency archival deployments were blocked during the audit and append stage.
  • Finance staff could trace 91% of cloud spend to a grant or collection owner.
Key Takeaway for Glossary Readers

Subscription policy assignments can make governance useful to nontechnical stakeholders when parameters and messages reflect the real business taxonomy.

Why use Azure CLI for this?

With ten years of Azure engineering behind me, I prefer CLI for subscription policy assignments because policy work needs repeatable evidence. The portal is useful for browsing, but it hides too much when you need to compare assignment JSON, parameter values, identity, notScopes, enforcement mode, and compliance states across many subscriptions. CLI lets me create assignments from source-controlled files, list assignments at a scope, inspect policy states, and start remediation without hand-copying values from blades. It also fits pull-request reviews and release gates. The safest workflow is not faster clicking; it is scripted inspection, what changed, who approved it, and what compliance looked like afterward.

CLI use cases

  • List all policy assignments at subscription scope before a deployment freeze or compliance review.
  • Create a subscription assignment from source-controlled parameters during a platform baseline rollout.
  • Show assignment JSON to verify definition ID, parameters, enforcement mode, notScopes, and managed identity.
  • Query policy states to find which resources are noncompliant under a specific assignment.
  • Start or monitor remediation for deployIfNotExists and modify assignments after permissions are confirmed.

Before you run CLI

  • Confirm tenant, subscription ID, exact scope string, policy definition or initiative ID, parameters file, and desired enforcement mode.
  • Verify permissions to create assignments, create role assignments for remediation identities, and read compliance state at subscription scope.
  • Check whether notScopes, exemptions, or managed identity location are required, especially for deployIfNotExists or modify effects.
  • Use JSON output and source-controlled parameter files so reviewers can compare changes without relying on portal screenshots.

What output tells you

  • The scope field confirms whether the assignment is truly subscription-wide or accidentally targeted at a resource group or management group.
  • policyDefinitionId identifies the assigned rule or initiative; parameters show the business-specific values used for this subscription.
  • notScopes, exemptions, and enforcementMode explain why some resources are not denied or why a policy is only auditing.
  • Identity and location fields matter for remediation because modify and deployIfNotExists assignments need a managed identity with appropriate roles.

Mapped Azure CLI commands

Subscription policy assignment commands

direct
az policy assignment list --scope /subscriptions/<subscription-id> --output table
az policy assignmentdiscoverManagement and Governance
az policy assignment show --name <assignment-name> --scope /subscriptions/<subscription-id>
az policy assignmentdiscoverManagement and Governance
az policy assignment create --name <assignment-name> --policy <definition-id-or-name> --scope /subscriptions/<subscription-id> --params @params.json
az policy assignmentsecureManagement and Governance
az policy state list --subscription <subscription-id> --query "[?policyAssignmentName=='<assignment-name>']" --output table
az policy statediscoverManagement and Governance
az policy remediation create --name <remediation-name> --policy-assignment <assignment-id> --resource-discovery-mode ReEvaluateCompliance
az policy remediationsecureManagement and Governance

Architecture context

As an Azure architect, I use subscription policy assignments when a control should apply to every workload resource in one subscription but should not automatically cross into other subscriptions. That boundary is useful for environment-specific rules, workload classification, or business-unit ownership. The assignment should come from policy-as-code, with definitions placed at a reusable management group when multiple subscriptions share them. Parameters should capture approved locations, required tag names, diagnostic destinations, allowed SKUs, or security baselines. Exclusions should be rare and documented. For deployIfNotExists or modify policies, the managed identity, role assignments, and remediation plan are part of the architecture, not an afterthought.

Security

Security impact is direct because subscription policy assignments can block risky deployments, enforce required configuration, or quietly fail if misconfigured. A deny assignment can prevent public endpoints, unapproved regions, or weak encryption settings. A modify or deployIfNotExists assignment can change resources and needs an identity with carefully scoped permissions. Operators should review assignment scope, notScopes, exemptions, parameters, identity, and enforcement mode before enabling production enforcement. Security teams should avoid broad exemptions that hide real risk. Policy output is also evidence for compliance, so noncompliance messages and assignment names should be understandable. A policy assignment is not access control, but it heavily shapes secure defaults.

Cost

A subscription policy assignment is not a billable resource by itself, but it can strongly influence cost. It might require diagnostic logs, restrict expensive SKUs, enforce tags for chargeback, deploy monitoring settings, or block regions where data transfer is higher. A bad assignment can create noisy remediation tasks, duplicate diagnostic settings, or force every workload into unnecessarily premium options. FinOps teams should review policy parameters that affect logging retention, allowed SKUs, resource locations, and required tags. Cost-saving policies should be staged carefully so they do not block legitimate capacity increases. The indirect cost path runs through the resources that policy allows, changes, audits, or denies.

Reliability

Reliability impact is indirect but often visible during deployments. Subscription policy assignments can prevent bad configurations that reduce resilience, such as missing diagnostics, unsupported regions, or unapproved redundancy choices. They can also cause outages if a deny rule blocks an emergency deployment or a modify policy changes resources unexpectedly. Reliable policy operations use audit mode first, test subscriptions, clear noncompliance messages, staged enforcement, and known rollback steps. Remediation tasks should be monitored because failed remediation can leave resources inconsistent. Operators should verify policy states after major releases and after assignment changes. The goal is guardrails that protect recovery options without surprising teams during incidents.

Performance

Runtime performance impact is usually indirect because policy assignments are evaluated through Azure control-plane operations, not application request paths. The practical performance impact appears during deployment and remediation. Overly broad or poorly tuned assignments can slow release troubleshooting, generate large compliance datasets, or block deployments that need urgent capacity. Good assignments improve operational performance by making invalid configurations fail early with clear messages instead of becoming production cleanup work. Operators should watch compliance evaluation freshness, remediation duration, and deployment failure patterns. Policy should make the platform faster to operate, not slower to understand. Clear scope and parameters reduce the time spent chasing false violations.

Operations

Operators manage subscription policy assignments through policy-as-code, portal review, CLI inventory, compliance dashboards, remediation tasks, and exception workflows. They list assignments at subscription scope, inspect definition IDs, compare parameters, confirm enforcement mode, and review policy states by resource. When a deployment fails, they look for policy denial details before blaming ARM templates or service providers. Good operations include naming standards, owners, change records, exemption expiration dates, and remediation runbooks. Operators also need to understand which assignments came from management groups versus the subscription itself. That distinction matters when a local team cannot edit an inherited control but still owns remediation evidence.

Common mistakes

  • Assigning a deny policy at subscription scope before testing the same parameters in audit mode.
  • Forgetting managed identity permissions, which makes remediation fail even though the assignment exists.
  • Using broad notScopes that permanently hide resource groups instead of time-bound, reviewed exemptions.
  • Creating nearly identical assignments by hand, causing parameter drift across subscriptions.
  • Troubleshooting a deployment failure without checking policy denial details and assignment scope first.