The correct answer is the KQL query that uses `AzureActivity | where TimeGenerated > ago(1h) | where OperationNameValue has 'Microsoft.Storage/storageAccounts/delete' | where ActivityStatusValue == 'Failed' | summarize Failures=count() by Caller`. This query is correct because it precisely chains the necessary filters to isolate failed storage account delete operations within the last hour, then aggregates the results by caller using the `summarize` operator. On the AZ-104 exam, this tests your ability to navigate Azure Activity Logs and apply KQL filtering logic, a common task for monitoring and troubleshooting resource changes. A frequent trap is forgetting to include the `ActivityStatusValue == 'Failed'` filter or using `ago(7d)` instead of `ago(1h)`, which would return too broad a result set. Remember the memory tip: "Time, Action, Status, Summarize" — always check the time window first, then the operation name, then the status, and finally group your counts.
AZ-104 Monitor and Maintain Azure Resources Practice Question
This AZ-104 practice question tests your understanding of monitor and maintain azure resources. 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.
AzureActivity | where TimeGenerated > ago(1h) | where OperationNameValue has 'Microsoft.Storage/storageAccounts/delete' | where ActivityStatusValue == 'Failed' | summarize Failures=count() by Caller
This query filters to the last hour, matches the delete operation, keeps only failed records, and groups the results by caller. It returns exactly the data needed to see who attempted the failed deletes.
B
AzureActivity | where TimeGenerated > ago(1h) | where OperationNameValue has 'Microsoft.Storage/storageAccounts/delete' | where ActivityStatusValue == 'Succeeded' | summarize Failures=count() by Caller
Why wrong: This query looks for successful deletes instead of failed ones. It would miss the failures that the incident response team wants to investigate.
C
SecurityEvent | where EventID == 4670 | summarize count() by Account
Why wrong: SecurityEvent is an operating system security log table, not the Azure Activity log. It would not correctly query Azure resource management operations.
D
AzureActivity | where TimeGenerated > ago(1h) | where OperationNameValue has 'Microsoft.Storage/storageAccounts/delete' | summarize Failures=count() by Caller
Why wrong: This query counts all delete attempts but does not filter to failures. Successful deletions would be included, which makes the result inaccurate for the incident.
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
AzureActivity | where TimeGenerated > ago(1h) | where OperationNameValue has 'Microsoft.Storage/storageAccounts/delete' | where ActivityStatusValue == 'Failed' | summarize Failures=count() by Caller
Option A is correct because it filters AzureActivity logs to the last hour using `TimeGenerated > ago(1h)`, targets only storage account delete operations with `OperationNameValue has 'Microsoft.Storage/storageAccounts/delete'`, restricts to failed operations via `ActivityStatusValue == 'Failed'`, and then counts failures by caller using `summarize Failures=count() by Caller`. This precisely meets the requirement to find failed storage account delete operations in the last hour and count them by caller.
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.
✓
AzureActivity | where TimeGenerated > ago(1h) | where OperationNameValue has 'Microsoft.Storage/storageAccounts/delete' | where ActivityStatusValue == 'Failed' | summarize Failures=count() by Caller
Why this is correct
This query filters to the last hour, matches the delete operation, keeps only failed records, and groups the results by caller. It returns exactly the data needed to see who attempted the failed deletes.
Related concept
Read the scenario before looking for a memorised answer.
✗
AzureActivity | where TimeGenerated > ago(1h) | where OperationNameValue has 'Microsoft.Storage/storageAccounts/delete' | where ActivityStatusValue == 'Succeeded' | summarize Failures=count() by Caller
Why it's wrong here
This query looks for successful deletes instead of failed ones. It would miss the failures that the incident response team wants to investigate.
✗
SecurityEvent | where EventID == 4670 | summarize count() by Account
Why it's wrong here
SecurityEvent is an operating system security log table, not the Azure Activity log. It would not correctly query Azure resource management operations.
✗
AzureActivity | where TimeGenerated > ago(1h) | where OperationNameValue has 'Microsoft.Storage/storageAccounts/delete' | summarize Failures=count() by Caller
Why it's wrong here
This query counts all delete attempts but does not filter to failures. Successful deletions would be included, which makes the result inaccurate for the incident.
Common exam traps
Common exam trap: answer the scenario, not the keyword
The trap here is that candidates may forget to filter by `ActivityStatusValue == 'Failed'` (as in Option D) or mistakenly filter for `'Succeeded'` (as in Option B), both of which fail to meet the requirement for counting only failed operations.
Detailed technical explanation
How to think about this question
The `AzureActivity` table in Log Analytics stores Azure Resource Manager control-plane logs, where `OperationNameValue` uses the full resource provider path (e.g., `Microsoft.Storage/storageAccounts/delete`). The `ago(1h)` function uses the cluster's UTC time, and `has` is a case-insensitive substring match that is faster than `contains`. The `summarize` operator groups results by the `Caller` field (typically the user or service principal UPN), enabling per-caller failure counts. In real-world scenarios, this query helps identify unauthorized or repeated failed deletion attempts, which may indicate a misconfigured RBAC role or a compromised account.
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 media company stores terabytes of video archives that are accessed once a year for audit purposes. Moving these objects to a cold storage tier (Azure Archive, S3 Glacier, or Google Nearline) costs a fraction of hot storage. Questions like this test whether you understand storage tiers, access frequency tradeoffs, and retrieval latency requirements.
Related glossary terms
Concepts from this question explained
These glossary pages explain the core terms tested in this AZ-104 question in full detail.
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: AzureActivity | where TimeGenerated > ago(1h) | where OperationNameValue has 'Microsoft.Storage/storageAccounts/delete' | where ActivityStatusValue == 'Failed' | summarize Failures=count() by Caller — Option A is correct because it filters AzureActivity logs to the last hour using `TimeGenerated > ago(1h)`, targets only storage account delete operations with `OperationNameValue has 'Microsoft.Storage/storageAccounts/delete'`, restricts to failed operations via `ActivityStatusValue == 'Failed'`, and then counts failures by caller using `summarize Failures=count() by Caller`. This precisely meets the requirement to find failed storage account delete operations in the last hour and count them by caller.
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 →
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.
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.
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.
Sign in to join the discussion.