100% Latest & Updated Microsoft AZ-104 Practice Test Questions, Exam Dumps & Verified Answers!
30 Days Free Updates, Instant Download!
Question 150
A central governance team updates a policy initiative to include another definition checking resource encryption. Existing assignments point to that initiative. What should the team do to validate the new coverage?
- Grant subscription Owner to all resources represented in the initiative
- Review the initiative assignment parameters and trigger or await compliance re-evaluation under the updated definition
- Assume the new encryption check is automatically remediated without a deploy or modify effect
- Delete the policy assignments permanently to prevent failures
Explanation
Correct Answer
B:Adding a definition changes the checks applied by the initiative. The team must confirm parameters and refresh compliance evidence; merely updating the definition is not proof every affected resource now passes.
Incorrect Answers
A:Azure resources do not need subscription Owner to be evaluated against initiative definitions. Such grants are unrelated and excessive.
C:A policy assessment can identify gaps without writing resources. Remediation requires an applicable effect and authorized task.
D:Deleting assignments eliminates enforcement and would undermine the intention of extending governance coverage.
Question 151
A company assigns an Azure Policy initiative containing separate controls for allowed regions, tagging, and encryption. Compliance officers want the initiative's encryption control to display a specific remediation instruction whenever it reports noncompliance, while the other two controls retain their normal messages. Which policy assignment configuration supports that targeted feedback?
- Add a nonComplianceMessages entry to the initiative assignment and identify the encryption member through its policyDefinitionReferenceId
- Change the initiative displayName to the encryption instruction, assuming the same message is selected only for failed encryption resources
- Set notScopes to the encryption definition's ID so it alone gets a custom message while the other rules continue to enforce
- Create an Azure Policy exemption for each failed resource and put the remediation instruction into its justification
Explanation
Correct Answer
A:A policy assignment can include nonComplianceMessages entries, and for an initiative each message can target a member definition through policyDefinitionReferenceId. Using the encryption policy's reference ID provides the customized guidance only for that member's failure while the other initiative controls retain their own results and messages. It changes feedback without waiving enforcement.
Incorrect Answers
B:The initiative display name is general metadata for the policy set and isn't the per-definition violation message selector. Changing it labels the whole collection and wouldn't associate remediation instructions with the one encryption rule. The assignment needs a nonComplianceMessages entry that references the intended member definition.
C:notScopes excludes resource scopes from a policy assignment; it doesn't address individual initiative definitions by member ID and doesn't carry a custom message. Using it would remove resources from evaluation rather than improve the encryption finding text. The intended scope and underlying controls must stay intact.
D:An exemption records an allowed deviation from a policy assignment for particular resources or subscopes. It is inappropriate when compliance officers only want an explanatory message for violations that still need correction. Exempting every failing resource would mask noncompliance instead of communicating the targeted remediation instruction.
Question 152
An Azure Policy exemption is attached to a resource group containing resources in West Europe and East US. The exemption is approved only for West Europe resources; East US resources must still be evaluated against the same assignment. Which exemption property narrows its applicability by location without exempting the entire group?
- Set exemptionCategory to Waiver and assume that category automatically filters by location
- Set policyDefinitionReferenceIds to a region name even though that field identifies initiative member definitions
- Add exemption resourceSelectors using a resourceLocation selector that includes West Europe
- Use notScopes on the parent assignment for the entire resource group so East US resources remain evaluated
Explanation
Correct Answer
C:Resource selectors on a policy exemption can constrain the exception to a subset based on the resourceLocation selector. Including West Europe retains the exemption for that location while the East US resources in the same group remain subject to the assignment’s normal evaluation.
Incorrect Answers
A:Waiver records why an exception is temporarily accepted; it does not filter resources by their Azure region. Without a location-specific selector, the exemption might cover every otherwise applicable resource within the resource-group scope.
B:PolicyDefinitionReferenceIds identifies the particular policy definitions inside an initiative to exempt. A geographical Azure region is not an initiative definition reference. This property cannot by itself distinguish two resource locations under the same exemption scope.
D:Assignment notScopes excludes a complete child scope from evaluation. Excluding the whole resource group would also suppress evaluation of the East US resources, violating the requirement to continue applying policy there. The condition belongs to the exemption, not a broad assignment exclusion.
Question 153
An Azure Policy DeployIfNotExists assignment for Key Vault diagnostic settings has a managed identity with the necessary write permission to deploy compliant settings. A deployment pipeline creates a vault but fails the related diagnosticSettings existence evaluation because the pipeline's Azure principal cannot read diagnostic settings. The assignment identity already has its required write permission. Which additional authorization fixes the described evaluation boundary?
- Give the policy assignment managed identity another write role for diagnostic settings without changing the pipeline caller's access
- Grant the resource-creation pipeline principal the required Microsoft.Insights/diagnosticSettings/read permission for the evaluated vault
- Remove the assignment's managed identity because DeployIfNotExists deploys using only the user that created the vault
- Give the deployment pipeline principal diagnosticSettings/write without diagnosticSettings/read, assuming writes also permit the existence lookup
Explanation
Correct Answer
B:Microsoft documents that during target creation or update the caller's identity is used to read the related resource for DeployIfNotExists evaluation, while the assignment managed identity deploys the missing resource. Giving the pipeline principal Microsoft.Insights/diagnosticSettings/read at the needed scope allows the existence test, without broadening the assignment identity's write privileges.
Incorrect Answers
A:The assignment identity handles the deployment action for DeployIfNotExists. Since that managed identity already has diagnostic-settings write permission, giving it the same ability again doesn't solve an existence-check read failure. Azure Policy evaluates related resources during a create/update request using the requestor's identity, which is a different authorization boundary.
C:DeployIfNotExists uses a managed identity attached to the policy assignment for its ARM template deployment and remediation. Removing it would break deployment authority, and it wouldn't grant the requesting principal read access for the existence evaluation. The two principals are intentionally used for different operations.
D:DeployIfNotExists uses an existence check to inspect a related diagnostic setting. The principal performing this evaluation still needs its required read capability; supplying only a write Action does not satisfy that read requirement. The assignment's separate remediation identity already has write access.
Question 154
An Azure Policy assignment was created with a system-assigned managed identity. The team wants to replace the assignment while keeping the remediation principal's identity and grants stable across recreation. Which design choice should they consider?
- Export and recreate the policy assignment with identity type SystemAssigned, assuming the new assignment reuses its former principal ID
- Keep the role assignments on the previous system-assigned identity's object ID and create a replacement policy assignment using a new system-assigned identity
- Use a supported user-assigned managed identity and manage its role assignments independently
- Use a new system-assigned identity for every replacement and assume its principal ID is unchanged
Explanation
Correct Answer
C:A user-assigned identity has its own lifecycle separate from the policy assignment. Replacing the assignment need not create a new service principal that lacks the original remediation permissions.
Incorrect Answers
A:A system-assigned managed identity belongs to the lifecycle of its parent assignment. Deleting and recreating that assignment can create a different principal ID, so the former role assignments cannot be relied upon.
B:The replacement system-assigned identity has its own principal; role grants to the deleted or old identity do not automatically transfer. A reusable user-assigned managed identity is appropriate when the principal must persist independently.
D:A system-assigned principal is tied to its resource lifecycle and may be replaced on recreation. Old RBAC assignments cannot be assumed to target the new identity.
Question 155
A compliance report lists one resource as `Exempt`, but an executive dashboard counts it as not currently enforcing the referenced policy. The team wants to distinguish accepted noncompliance from a genuinely compliant resource. How should the status be interpreted?
- Relabel every Exempt resource Compliant because both avoid active enforcement
- Delete the exemption and assume the resource becomes compliant immediately
- Assign the resource Owner role to the policy assignment name
- Keep the Exempt classification distinct from Compliant and inspect the exemption justification
Explanation
Correct Answer
D:An exemption communicates that a policy's requirement was intentionally waived or mitigated for the chosen scope. It does not assert that the resource's current configuration satisfies the unmodified underlying condition.
Incorrect Answers
A:That hides the difference between meeting the rule and being excused from it. Compliance reporting would overstate the number of resources actually configured according to policy.
B:Removing an exemption restores normal evaluation but does not change the resource's properties. The resource may correctly appear noncompliant after reassessment.
C:Owner permissions concern management operations, not the semantic distinction between exemption and rule satisfaction. The dashboard's compliance state is a governance classification.
Question 156
A governance team has a broad Azure Policy assignment at management-group scope. During a safe rollout, the policy should evaluate only resources located in East US this week, then add West US after monitoring the first group's results. The assignment must stay at the same management-group scope and no explicit exemption records should be created. Which assignment property implements this gradual regional selection?
- Use assignment resourceSelectors with a resourceLocation selector and expand its in list from East US to include West US
- Put the West US subscription into the assignment's notScopes and later rename the assignment to restore resource-level location filtering
- Create a resource-group exemption with expiresOn and assume it selectively governs every East US resource throughout all subscriptions
- Change the initiative's enforcementMode to DoNotEnforce and assume the policy will be evaluated only for East US resources
Explanation
Correct Answer
A:The assignment's resourceSelectors support safe deployment practice by filtering applicable resources using kinds such as resourceLocation. Set an initial in list containing East US and later expand it to include West US after validating results. This retains the management-group assignment itself, avoids separate exemption objects, and selects by resource location rather than by subscription hierarchy.
Incorrect Answers
B:notScopes excludes whole resource scopes from assignment applicability, not selected Azure regions across every subscription. Renaming a policy assignment doesn't turn scope exclusion into resourceLocation selection, and subscriptions can contain resources in many regions. This could wrongly exclude East US resources that reside in the same excluded subscription.
C:An exemption describes an accepted exception for targeted resource scopes and can itself have resource selectors, but the request explicitly wants staged assignment applicability without exemptions. A single resource-group exemption also wouldn't select all resources in a region across the entire management-group hierarchy. Assignment resourceSelectors are the appropriate rollout mechanism.
D:DoNotEnforce changes whether the policy effect is enforced during requests; it does not inherently restrict which locations are evaluated. The requirement is a phased set of evaluated resources while keeping the assignment scope fixed. Resource selectors supply that regional filter, and enforcement mode is a separate dimension.
Question 157
A production resource group contains critical storage accounts. Administrators must continue updating firewall rules and tags, but accidental deletion of the resource group and contained accounts must be prevented even for users who otherwise have delete permission. Which setting best fits?
- Add a ReadOnly management lock
- Assign Reader to every administrator
- Add a CanNotDelete management lock on the resource group
- Configure an Azure Policy audit effect for storage account deletion
Explanation
Correct Answer
C:A CanNotDelete lock blocks deletion and is inherited by resources in the group, while permitting authorized updates. It is specifically suited to preventing accidental removal without freezing configuration.
Incorrect Answers
A:A ReadOnly lock would also block management-plane updates such as firewall changes. That violates the requirement to keep authorized configuration maintenance available.
B:Changing administrators to Reader would block their authorized updates, and other privileged users might still retain deletion rights. RBAC reassignments do not implement the required shared safety lock.
D:The audit effect reports policy noncompliance rather than preventing a deletion. A reported event after a destructive request is insufficient to satisfy the prevention requirement.
Question 158
A legal hold requires a configured Azure resource to remain unchanged through the end of a review. Existing administrators should be able to read it but must not update or delete it from Azure Resource Manager. Which management lock is appropriate?
- CanNotDelete
- ReadOnly
- Azure Policy audit
- Resource-level Reader assignment to one user
Explanation
Correct Answer
B:ReadOnly management locks block both updates and deletion through Azure Resource Manager for authorized administrators. That meets the temporary preservation constraint while still allowing reads.
Incorrect Answers
A:CanNotDelete stops removal but does not stop updates by principals with write rights. It does not freeze management-plane configuration during the legal hold.
C:An audit effect observes noncompliant configurations but does not bar management-plane changes. It cannot guarantee the resource remains unchanged during the hold.
D:A Reader assignment limits a particular principal, not every administrator. Other existing write-role holders could still change the resource unless a lock or comparable enforcement exists.
Question 159
A subscription administrator sets a CanNotDelete management lock on a resource group containing dozens of resources. A colleague tries to delete one child virtual machine directly and receives a lock error. Why?
- The resource-group delete lock is inherited by child resources in its scope
- The colleague needs subscription Owner to override a CanNotDelete lock without changing the lock
- Remove any lock directly attached to the VM but leave the resource group's CanNotDelete lock in place
- The VM must be moved to another availability zone before deletion
Explanation
Correct Answer
A:Azure Resource Manager locks propagate from parent scopes to descendant resources. A CanNotDelete lock on the group blocks deletion of included resources until the lock is removed by an authorized actor.
Incorrect Answers
B:An Owner assignment does not make Azure Resource Manager disregard an inherited CanNotDelete lock. A properly authorized administrator would need to manage the lock explicitly before deletion, while a direct child deletion remains blocked as long as the resource-group lock applies. The guest OS or extra role grant is not the mechanism that explains the error.
C:Even if no lock is attached directly to the child VM, the CanNotDelete lock at its resource-group ancestor is inherited in the VM's ARM scope. Removing only VM-level locks would not eliminate the higher-scope blocker. The administrator must address the inherited group lock before the delete request can proceed.
D:Availability-zone placement relates to placement and resiliency, not the inherited resource-lock evaluation that prevents the delete request.
Question 160
A storage-account operator applies a ReadOnly management lock expecting to block configuration changes only. A data-management tool then fails on an Azure Resource Manager listKeys request even though it normally reads an output. What explains the behavior?
- Retry listKeys with another Azure CLI or PowerShell command, assuming the ReadOnly lock applies only to portal operations
- ReadOnly locks can reject management-plane POST operations such as listKeys even when the intention is to retrieve information
- The lock silently rotates storage account keys and disables every data-plane read
- An Azure Reader role assignment automatically revokes the operator’s Storage access rights
Explanation
Correct Answer
B:ReadOnly locks restrict control-plane write-style requests, and some apparently read-oriented operations use POST. Their HTTP method and management API behavior make the lock more restrictive than its label suggests.
Incorrect Answers
A:Management locks are enforced by Azure Resource Manager, not only by the portal interface. The listKeys management action is a POST-style call and is still blocked by an applicable ReadOnly lock regardless of whether the client uses CLI, PowerShell or the portal. Choose a supported operation or remove the lock through approved governance.
C:Resource locks do not inherently rotate keys or stop all data-plane reads. The observed failure arises from the management API operation under the lock.
D:Reader grants some control-plane inspection but does not revoke independent permissions. An inherited lock is the relevant barrier described.
Microsoft Azure Administrator (AZ-104) Practice Tests