Question 261 of 913
Develop a security and compliance planmediumMultiple SelectObjective-mapped

AZ-400 Develop a security and compliance plan Practice Question

This AZ-400 practice question tests your understanding of develop a security and compliance plan. Match the stated requirement to the specific cloud service, access model, or configuration option — many options are valid in isolation but not for this scenario. After answering, compare your reasoning against the explanation and wrong-answer breakdown below. Once you have made your selection, read the full explanation to reinforce the concept and understand why each distractor is designed to mislead on exam day.

Your organization uses Azure DevOps and Azure Policy to enforce compliance. You need to ensure that all Azure resources deployed by Azure DevOps pipelines have specific tags (e.g., CostCenter and Environment) applied. Which TWO approaches can achieve this? (Choose TWO.)

Question 1mediummulti select
Full question →

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

Create an Azure Policy with the 'deny' effect that requires the tags to be present at resource creation.

Option C is correct because an Azure Policy with the 'deny' effect prevents the creation of any resource that does not include the required tags (e.g., CostCenter and Environment). This enforces compliance at the moment of deployment, blocking non-compliant resources from being provisioned by Azure DevOps pipelines. Option D is correct because adding a pipeline task (using Azure CLI or PowerShell) after resource creation programmatically applies the required tags, ensuring resources are tagged even if the initial deployment omitted them.

Key principle: Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • Configure the service connection to only allow deployments with tags.

    Why it's wrong here

    Service connections don't enforce tagging.

  • Create an Azure Policy with the 'audit' effect to report non-compliant resources.

    Why it's wrong here

    Audit only reports, does not enforce.

  • Create an Azure Policy with the 'deny' effect that requires the tags to be present at resource creation.

    Why this is correct

    Deny policy blocks deployment of non-compliant resources.

    Related concept

    Read the scenario before looking for a memorised answer.

  • Add a pipeline task after resource creation that applies the required tags using Azure CLI or PowerShell.

    Why this is correct

    This remediates missing tags post-deployment.

    Related concept

    Read the scenario before looking for a memorised answer.

  • Configure a branch policy on the main branch to require tag verification in pull requests.

    Why it's wrong here

    Branch policies do not affect Azure resource deployment.

Common exam traps

Common exam trap: answer the scenario, not the keyword

The trap here is that candidates often confuse Azure Policy effects (audit vs. deny) and overlook that a post-deployment task can also enforce tagging, leading them to select only the deny policy or incorrectly choose audit as a compliance enforcement mechanism.

Detailed technical explanation

How to think about this question

Azure Policy with the 'deny' effect uses a REST API call interception during resource creation (via Azure Resource Manager) to reject requests that violate the policy rule, returning a 403 Forbidden status. The pipeline task approach (Option D) typically uses the 'az resource tag' command or the Azure PowerShell 'Set-AzTag' cmdlet, which can be run in a script task to apply tags after deployment; however, this is a reactive measure and may leave a brief window where resources are untagged. In real-world scenarios, combining both approaches is common: a deny policy blocks untagged resources at creation, while a post-deployment task ensures tags are applied to resources created outside the pipeline or for legacy resources.

KKey Concepts to Remember

  • Read the scenario before looking for a memorised answer.
  • Find the constraint that changes the correct option.
  • Eliminate answers that are true in general but not in this case.

TExam Day Tips

  • Watch for words such as best, first, most likely and least administrative effort.
  • Review why wrong options are wrong, not only why the correct option is correct.

Key takeaway

Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.

Real-world example

How this comes up in practice

A startup's cloud architect reviews their monthly bill and notices costs are higher than expected for a long-running batch job. Switching from on-demand instances to Reserved Instances — or using Spot/Preemptible VMs — can reduce compute costs by up to 72 %. Questions like this test whether you understand the tradeoffs between commitment, flexibility, and cost across cloud pricing models.

What to study next

Got this wrong? Here's your next step.

Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.

Related practice questions

Related AZ-400 practice-question pages

Use these pages to review the topic behind this question. This is how one missed question becomes focused revision.

Practice this exam

Start a free AZ-400 practice session

Short sessions build daily habit. Longer sessions build exam-day stamina. Try a timed session to simulate real conditions.

FAQ

Questions learners often ask

What does this AZ-400 question test?

Develop a security and compliance plan — This question tests Develop a security and compliance plan — Read the scenario before looking for a memorised answer..

What is the correct answer to this question?

The correct answer is: Create an Azure Policy with the 'deny' effect that requires the tags to be present at resource creation. — Option C is correct because an Azure Policy with the 'deny' effect prevents the creation of any resource that does not include the required tags (e.g., CostCenter and Environment). This enforces compliance at the moment of deployment, blocking non-compliant resources from being provisioned by Azure DevOps pipelines. Option D is correct because adding a pipeline task (using Azure CLI or PowerShell) after resource creation programmatically applies the required tags, ensuring resources are tagged even if the initial deployment omitted them.

What should I do if I get this AZ-400 question wrong?

Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.

What is the key concept behind this question?

Read the scenario before looking for a memorised answer.

About these practice questions

Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

Last reviewed: Jun 11, 2026

Question Discussion

Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.

Loading comments…

Sign in to join the discussion.

This AZ-400 practice question is part of Courseiva's free Microsoft certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the AZ-400 exam.