Home › Studies › AZ-104 › Identities & Governance › Azure Policy

Azure Policy

definitions · initiatives · assignments · effects · remediation · exemptions

By the tools4free.dev team · Last reviewed November 13, 2026

Practice questions for this topic →

Building blocks

ObjectWhat it is
Policy definitionJSON business rules. Each definition has a single effect.
Initiative (policySet)A group of definitions. The CLI and PowerShell call it PolicySet.
AssignmentApplies a definition or initiative at a scope: management group, subscription, resource group or resource.

Effects

EffectWhat it doesRemediation task?
denyBlocks the create or updateNo
auditAllows the change and logs it. Assesses the resource's own propertiesNo
auditIfNotExistsAssesses a related, child or extension resourceNo
appendAlters the requestNo
modifyAlters the request. Can fix existing resourcesYes
deployIfNotExistsDeploys a related resource after the create or updateYes

When evaluation happens

Remediation

SettingRangeDefault
FailureThreshold0-100100%
ResourceCountUp to 50,000500
ParallelDeploymentCount1-3010

Exemptions and exclusions

Exclusion (notScopes)Exemption
What it doesRemoves a subscope from the assignmentExempts a resource hierarchy or resource; resources stay tracked and show state Exempt
Time limitNot described as time-boundOptional expiresOn. The exemption isn't deleted at expiry, it is just no longer honored
CategoriesNot applicable: categories are an exemption propertyWaiver (temporary acceptance) or Mitigated (intent met another way)

Roles

RolePolicy access
OwnerFull
Resource Policy ContributorMost Policy operations
ContributorRead. Can trigger remediation. Can't create or update definitions and assignments
ReaderRead
User Access AdministratorNeeded to grant a deployIfNotExists or modify assignment's managed identity its roles

Policy definitions, initiatives and assignments are readable by all roles over the scope.

Limits

ItemValue
Policy definitions per scope500
Initiative definitions per scope / tenant200 / 2,500
Assignments per scope200
Exemptions per scope1,000
Exclusions (notScopes) per assignment400
Policies per initiative1,000
Parameters per policy definition20
Compliance evaluation cycleEvery 24 hours

CLI and PowerShell

TaskAzure CLIPowerShell
Assign with a managed identityaz policy assignment create ... --mi-system-assigned --location <loc>New-AzPolicyAssignment ... -IdentityType SystemAssigned -Location <loc>
Create a remediation taskaz policy remediation create --name myRemediation --policy-assignment <id>Start-AzPolicyRemediation -Name myRemediation -PolicyAssignmentId <id>
Get a definitionaz policy definition showGet-AzPolicyDefinition

Manual role grant: copy the assignment's managed identity name from the Assignment ID, then add the role in IAM.

Exam Tips

Tick each tip once you can answer it without looking.

“Only allow deployments in West Europe and North Europe” → Assign the built-in Allowed locations (Deny) at the subscription or management group. Trap: an RBAC role can't restrict regions; Policy checks the resource's state.

“Existing resources need a required tag” → Modify policy plus a remediation task. Trap: Deny is an enforcement effect; remediation applies only to deployIfNotExists and modify.

“Roll out a new policy safely” → Start with audit or auditIfNotExists, enforce later. Trap: deny is an enforcement effect, and Microsoft recommends audit or auditIfNotExists first to track the impact.

“Remediation task fails with an authorization error” → Grant the assignment's managed identity the roleDefinitionIds roles. Trap: giving the user more rights doesn't help; the task runs as the managed identity.

“Assignment created with the CLI or PowerShell: who gets the identity roles?” → You grant them manually; the portal grants them automatically. Trap: assuming the CLI does it for you.

“Which effects can be remediated?” → deployIfNotExists and modify. Trap: remediation applies only to deployIfNotExists and modify, so deny and audit aren't remediated.

“User needs to create policy assignments, but Contributor can't” → Resource Policy Contributor (or Owner). Trap: Contributor can trigger remediation but can't create or update definitions and assignments.

“Grant the identity of a deployIfNotExists assignment its roles” → User Access Administrator or similar role-assignment rights. Trap: Microsoft names User Access Administrator for granting the identity its roles.

“Exclude one resource group from a subscription-wide assignment” → Exclusion (notScopes) on the assignment. Trap: an exemption is for cases where the resource should still be tracked, and can be time-bound.

“Time-limited relief for one VM, still shown as Exempt” → Exemption with category Waiver and expiresOn. Trap: an exclusion removes a subscope from the assignment; Microsoft recommends exemptions for time-bound scenarios where the resource should still be tracked.

“Exempt a resource from only two policies inside an initiative” → Use the policyDefinitionReferenceId array on the exemption.

“A child assignment is more permissive than the management group deny” → It doesn't override: exclude the child at the parent and assign the permissive policy there. Trap: the lowest scope doesn't win; Policy is an explicit-deny system.

“One assignment says Deny, another says Audit, same condition” → Deny wins: layering is cumulative and most restrictive. Trap: the nearest scope doesn't decide the result.

“Policy assigned at a management group: what is evaluated?” → Resources at subscription or resource group level under it.

“Compliance data looks out of date” → The full cycle runs every 24 hours, and also runs on create, update and new assignments. Trap: results aren't instant.

“Remediate 20,000 resources in one task” → Raise ResourceCount (default 500, up to 50,000).

“You edit a policy definition: what happens to existing assignments?” → They use the updated definition automatically. Trap: they don't need to be reassigned.

“audit vs auditIfNotExists” → audit assesses the resource's own properties; auditIfNotExists assesses a related, child or extension resource.

Sources

Checked against Microsoft Learn on November 13, 2026.

← Azure RBACLocks & Tags →