Question 228 of 1,000
Secure compute, storage, and databaseseasyMultiple ChoiceObjective-mapped

Quick Answer

The answer is Detection mode. This is the correct choice because when you enable the Web Application Firewall in detection mode, Azure Application Gateway WAF logs alerts and records the full request details for malicious traffic—such as SQL injection or cross-site scripting attempts—without blocking any requests. This allows the security team to analyze false positives, tune rule exclusions, and validate that legitimate traffic is not being incorrectly flagged before switching to prevention mode. On the Microsoft Azure Security Engineer Associate AZ-500 exam, this scenario tests your understanding of the WAF lifecycle and the critical distinction between logging-only detection and active blocking prevention. A common trap is assuming prevention mode is needed for testing, but the exam emphasizes that detection mode is the safe, non-disruptive starting point for rule tuning. Memory tip: think “Detect first, prevent later”—like a fire drill before turning on the sprinklers.

AZ-500 Secure compute, storage, and databases Practice Question

This AZ-500 practice question tests your understanding of secure compute, storage, and databases. This is a configuration task: choose the command set that satisfies every stated requirement. Small differences — like 'secret' vs 'password' or 'transport input ssh' vs 'all' — change whether the answer is correct. 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.

A company deploys a public-facing web application behind Azure Application Gateway. They want to enable the Web Application Firewall (WAF) to protect against SQL injection and cross-site scripting attacks. During the initial testing phase, they want to identify malicious requests without blocking them, to tune the WAF rules before enabling full protection. Which WAF mode should they configure?

Question 1easymultiple choice
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

Detection mode

Detection mode logs WAF alerts and records the full request details without blocking any traffic. This allows the security team to analyze malicious requests, tune rule exclusions, and validate that legitimate traffic is not falsely flagged before switching to Prevention mode. It is the correct choice for the initial testing phase described.

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.

  • Prevention mode

    Why it's wrong here

    Prevention mode blocks malicious requests, which would interrupt legitimate traffic during testing. The requirement is to first identify without blocking.

  • Detection mode

    Why this is correct

    Detection mode logs alerts for matching requests but does not block them, allowing the team to tune rules without affecting live traffic.

    Related concept

    Read the scenario before looking for a memorised answer.

  • Logging mode

    Why it's wrong here

    There is no 'Logging mode' for WAF. Logging is always active when WAF is enabled in either Detection or Prevention mode.

  • Off

    Why it's wrong here

    Disabling WAF would provide no protection or logging, so it does not meet the requirement to identify attacks.

Common exam traps

Common exam trap: answer the scenario, not the keyword

The trap here is that candidates may confuse Detection mode with a hypothetical 'Logging mode' or assume Prevention mode is needed for any protection, overlooking the explicit requirement to identify without blocking during tuning.

Detailed technical explanation

How to think about this question

In Detection mode, the Azure Application Gateway WAF uses the OWASP Core Rule Set (CRS) to inspect incoming HTTP/HTTPS requests against SQL injection and XSS patterns, writing matched events to the WAF logs (stored in Azure Monitor or a storage account). The request is then passed to the backend without modification, allowing administrators to review false positives and adjust rule actions (e.g., set to 'Anomaly Score' thresholds) before enabling Prevention mode, where matched requests receive a 403 Forbidden response.

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 healthcare organisation deploys an application with a public-facing web tier and a private database tier. The database subnet has no public IP and only accepts connections from the web tier's security group. Questions like this test whether you can design cloud network isolation using VNets/VPCs, subnets, and security group rules.

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-500 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-500 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-500 question test?

Secure compute, storage, and databases — This question tests Secure compute, storage, and databases — Read the scenario before looking for a memorised answer..

What is the correct answer to this question?

The correct answer is: Detection mode — Detection mode logs WAF alerts and records the full request details without blocking any traffic. This allows the security team to analyze malicious requests, tune rule exclusions, and validate that legitimate traffic is not falsely flagged before switching to Prevention mode. It is the correct choice for the initial testing phase described.

What should I do if I get this AZ-500 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

Keep practising

More AZ-500 practice questions

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-500 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-500 exam.