Question 311 of 1,170
Monitor and Maintain Azure ResourcesmediumMultiple ChoiceObjective-mapped

Quick Answer

The correct answer is to configure a diagnostic setting at the subscription scope to send the Azure Activity log to Log Analytics and retain it for 90 days. This works because the Azure Activity log captures all control-plane events, including resource deletions, at the subscription level, and streaming it to a Log Analytics workspace makes the history searchable via KQL queries while allowing retention up to 90 days. On the AZ-104 exam, this scenario tests your understanding that the Activity log is the single source of truth for who deleted what and when, and a common trap is to mistakenly configure diagnostic settings at the resource or VM level—those only capture guest OS logs, not control-plane deletions. Remember, for auditing resource deletions, always think subscription-level Activity log, not VM-level. A useful memory tip: “Activity log for actions, guest log for reactions”—the Activity log records the deletion action itself, while guest logs only show the aftermath inside the VM.

AZ-104 Monitor and Maintain Azure Resources Practice Question

This AZ-104 practice question tests your understanding of monitor and maintain azure resources. 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.

Exhibit

Current workspace settings:
Workspace: law-prod
Retention: 14 days
Connected sources: VM guest logs, App Service logs
Subscription Activity log export: Not configured
Incident note: A user deleted a storage account yesterday, but the team could not search for the deletion event after two weeks.

Based on the exhibit, the support team needs a searchable 90-day history of who deleted Azure resources and when. The current workspace only contains VM guest logs. Which configuration should you add?

Question 1mediummultiple choice
Full question →

Exhibit

Current workspace settings:
Workspace: law-prod
Retention: 14 days
Connected sources: VM guest logs, App Service logs
Subscription Activity log export: Not configured
Incident note: A user deleted a storage account yesterday, but the team could not search for the deletion event after two weeks.

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

Configure a diagnostic setting at the subscription scope to send the Azure Activity log to Log Analytics and retain it for 90 days.

The Azure Activity log records all control-plane events, including resource deletions, at the subscription level. By configuring a diagnostic setting to stream the Activity log to a Log Analytics workspace, you can retain the data for up to 90 days (or longer with data export rules) and make it searchable via KQL queries. The current workspace only contains VM guest logs, so adding this setting directly meets the requirement without relying on guest-level or network-level logs.

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.

  • Enable guest-level diagnostics on each VM so deletion events are captured.

    Why it's wrong here

    Guest diagnostics only collect events from inside the operating system. They do not capture subscription-level control-plane actions such as deleting Azure resources.

  • Configure a diagnostic setting at the subscription scope to send the Azure Activity log to Log Analytics and retain it for 90 days.

    Why this is correct

    The Azure Activity log records control-plane actions like deletes, updates, and role assignments. Exporting it from the subscription to Log Analytics makes those events searchable, and increasing retention gives the team the required 90-day history.

    Related concept

    Read the scenario before looking for a memorised answer.

  • Turn on NSG flow logs for all subnets to capture resource deletions.

    Why it's wrong here

    NSG flow logs show network traffic patterns. They do not record who deleted a resource or what management action was taken.

  • Store VM backups in the vault and use restore points as an audit trail.

    Why it's wrong here

    Backups help recover workloads, but they are not an audit source for who performed management operations. Restore points cannot replace the Activity log for investigating deletes.

Common exam traps

Common exam trap: answer the scenario, not the keyword

The trap here is that candidates confuse guest-level diagnostics (OS logs) with the Azure Activity log (control-plane logs), or assume NSG flow logs or backups can serve as an audit trail for resource deletions, when in fact only the Activity log captures who deleted what and when at the Azure Resource Manager layer.

Trap categories for this question

  • Command / output trap

    NSG flow logs show network traffic patterns. They do not record who deleted a resource or what management action was taken.

Detailed technical explanation

How to think about this question

The Azure Activity log is a subscription-level log that includes operations like 'Microsoft.Compute/virtualMachines/delete' and 'Microsoft.Storage/storageAccounts/delete', each with caller identity (UPN or SPN), timestamp, and operation details. When streamed to Log Analytics, you can query the 'AzureActivity' table with KQL filters such as 'OperationNameValue contains "delete"' and 'ActivityStatusValue == "Accepted"' to build a precise audit trail. Retention is configurable up to 90 days in the diagnostic setting, but you can also use Azure Policy to enforce this across all subscriptions.

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

An e-commerce site experiences heavy traffic on Black Friday and near-zero traffic during off-peak weeks. Rather than provisioning permanent large VMs, the team uses auto-scaling groups that add capacity automatically under load and reduce it overnight. Questions like this test whether you understand elasticity, availability zones, and cloud compute scaling patterns.

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

Monitor and Maintain Azure Resources — This question tests Monitor and Maintain Azure Resources — Read the scenario before looking for a memorised answer..

What is the correct answer to this question?

The correct answer is: Configure a diagnostic setting at the subscription scope to send the Azure Activity log to Log Analytics and retain it for 90 days. — The Azure Activity log records all control-plane events, including resource deletions, at the subscription level. By configuring a diagnostic setting to stream the Activity log to a Log Analytics workspace, you can retain the data for up to 90 days (or longer with data export rules) and make it searchable via KQL queries. The current workspace only contains VM guest logs, so adding this setting directly meets the requirement without relying on guest-level or network-level logs.

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