- A
DeviceFileEvents | where SHA256 == "<hash>" | summarize Actions = make_set(ActionType) by DeviceId | where Actions has_all ("FileCreated", "FileDeleted")
Correct. This query groups by DeviceId and checks that both 'FileCreated' and 'FileDeleted' actions exist in the set for that device, ensuring the file was both created and deleted.
- B
DeviceFileEvents | where SHA256 == "<hash>" and ActionType == "FileDeleted" | project DeviceId
Why wrong: This only finds devices where the file was deleted, without confirming it was also created. It does not meet the requirement to find devices with both events.
- C
DeviceFileEvents | where FileHash == "<hash>" | summarize Actions = make_set(ActionType) by DeviceId | where Actions has "FileCreated"
Why wrong: The correct column is SHA256, not FileHash (which is a higher-level property). Also, it only checks for creation, not deletion.
- D
DeviceFileEvents | summarize by DeviceId, ActionType | where ActionType in ("FileCreated", "FileDeleted")
Why wrong: This does not filter by the specific SHA256 hash and does not ensure both actions occurred on the same device. It returns any device with any file create or delete, which is not targeted.
Quick Answer
The answer is the query pattern that filters DeviceFileEvents by SHA256 hash and then uses make_set(ActionType) to check for both "FileCreated" and "FileDeleted" per device. This is correct because make_set creates a distinct array of all action types for a given DeviceId, and the has_all operator verifies that both creation and deletion events exist in that set, directly matching the scenario of a file being created and later removed—a classic sign of malware cleanup. On the SC-200 exam, this tests your ability to combine filtering, aggregation, and set-based logic in advanced hunting, often appearing as a trap where candidates mistakenly use countif or separate joins instead of the efficient make_set approach. A useful memory tip: think of make_set as packing all actions into a single bag per device, then checking if your two required items are both inside that bag.
SC-200 Practice Question: Advanced hunting uses Kusto Query Language (KQL).
This SC-200 practice question tests your understanding of mitigate threats using microsoft defender xdr. Read the scenario carefully and evaluate each option against the stated constraints before committing to an answer. A key principle to apply: advanced hunting uses Kusto Query Language (KQL).. 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 security analyst is investigating a potential malware outbreak using Microsoft 365 Defender advanced hunting. The analyst wants to find all devices where a file with a specific SHA256 hash was first created and then later deleted, which may indicate a cleanup attempt. Which query pattern on the DeviceFileEvents table is appropriate?
Clue words in this question
Noticing these words before you look at the options changes how you read each choice.
Clue:
"first"Why it matters: Order matters here. You are being tested on which action comes before the others — not which action is generally useful.
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
DeviceFileEvents | where SHA256 == "<hash>" | summarize Actions = make_set(ActionType) by DeviceId | where Actions has_all ("FileCreated", "FileDeleted")
Option A is correct because it first filters by the specific SHA256 hash, then uses `make_set(ActionType)` to collect all actions per device, and finally checks that both 'FileCreated' and 'FileDeleted' appear in the set. This precisely identifies devices where the file was both created and later deleted, indicating a potential cleanup attempt.
Key principle: Advanced hunting uses Kusto Query Language (KQL).
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
DeviceFileEvents | where SHA256 == "<hash>" | summarize Actions = make_set(ActionType) by DeviceId | where Actions has_all ("FileCreated", "FileDeleted")
Why this is correct
Correct. This query groups by DeviceId and checks that both 'FileCreated' and 'FileDeleted' actions exist in the set for that device, ensuring the file was both created and deleted.
Clue confirmation
The clue word "first" in the question point toward this answer.
Related concept
Advanced hunting uses Kusto Query Language (KQL).
- ✗
DeviceFileEvents | where SHA256 == "<hash>" and ActionType == "FileDeleted" | project DeviceId
Why it's wrong here
This only finds devices where the file was deleted, without confirming it was also created. It does not meet the requirement to find devices with both events.
- ✗
DeviceFileEvents | where FileHash == "<hash>" | summarize Actions = make_set(ActionType) by DeviceId | where Actions has "FileCreated"
Why it's wrong here
The correct column is SHA256, not FileHash (which is a higher-level property). Also, it only checks for creation, not deletion.
- ✗
DeviceFileEvents | summarize by DeviceId, ActionType | where ActionType in ("FileCreated", "FileDeleted")
Why it's wrong here
This does not filter by the specific SHA256 hash and does not ensure both actions occurred on the same device. It returns any device with any file create or delete, which is not targeted.
Common exam traps
Common exam trap: answer the scenario, not the keyword
The trap here is that candidates may confuse the column name `SHA256` with `FileHash` (which does not exist in DeviceFileEvents) or forget to filter by the specific hash before summarizing, leading to false positives from unrelated file operations.
Detailed technical explanation
How to think about this question
The `DeviceFileEvents` table in Microsoft 365 Defender stores file creation, deletion, modification, and renaming events. The `SHA256` column contains the hash of the file content, while `FileHash` is not a valid column in this schema. Using `make_set(ActionType)` creates a distinct list of actions per device, and `has_all` ensures both required actions exist, which is critical for detecting cleanup patterns where malware is downloaded then removed.
KKey Concepts to Remember
- Advanced hunting uses Kusto Query Language (KQL).
- The DeviceFileEvents table logs file creation, modification, and deletion.
- The SHA256 column is used for unique file identification.
- summarize with make_set() aggregates unique values into a collection.
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
Advanced hunting uses Kusto Query Language (KQL).
Real-world example
How this comes up in practice
A cloud solutions architect for a retail company is evaluating services for a new workload. The correct answer here reflects best practice for the specific scenario described — not a general cloud recommendation. Advanced hunting uses Kusto Query Language (KQL). Cloud exam questions reward reading the constraint carefully: the same technology can be right or wrong depending on the use case.
What to study next
Got this wrong? Here's your next step.
Review advanced hunting uses Kusto Query Language (KQL)., then practise related SC-200 questions on the same topic to reinforce the concept.
- →
Mitigate threats using Microsoft Defender XDR — study guide chapter
Learn the concepts, then practise the questions
- →
Mitigate threats using Microsoft Defender XDR practice questions
Targeted practice on this topic area only
- →
All SC-200 questions
1,639 questions across all exam domains
- →
Microsoft Security Operations Analyst SC-200 study guide
Full concept coverage aligned to exam objectives
- →
SC-200 practice test guide
How to use practice tests most effectively before exam day
Related practice questions
Related SC-200 practice-question pages
Use these pages to review the topic behind this question. This is how one missed question becomes focused revision.
Manage a security operations environment practice questions
Practise SC-200 questions linked to Manage a security operations environment.
Respond to security incidents practice questions
Practise SC-200 questions linked to Respond to security incidents.
Perform threat hunting practice questions
Practise SC-200 questions linked to Perform threat hunting.
Mitigate threats using Microsoft Defender XDR practice questions
Practise SC-200 questions linked to Mitigate threats using Microsoft Defender XDR.
Mitigate threats using Microsoft Defender for Cloud practice questions
Practise SC-200 questions linked to Mitigate threats using Microsoft Defender for Cloud.
Mitigate threats using Microsoft Sentinel practice questions
Practise SC-200 questions linked to Mitigate threats using Microsoft Sentinel.
SC-200 fundamentals practice questions
Practise SC-200 questions linked to SC-200 fundamentals.
SC-200 scenario practice questions
Practise SC-200 questions linked to SC-200 scenario.
SC-200 troubleshooting practice questions
Practise SC-200 questions linked to SC-200 troubleshooting.
Practice this exam
Start a free SC-200 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 SC-200 question test?
Mitigate threats using Microsoft Defender XDR — This question tests Mitigate threats using Microsoft Defender XDR — Advanced hunting uses Kusto Query Language (KQL)..
What is the correct answer to this question?
The correct answer is: DeviceFileEvents | where SHA256 == "<hash>" | summarize Actions = make_set(ActionType) by DeviceId | where Actions has_all ("FileCreated", "FileDeleted") — Option A is correct because it first filters by the specific SHA256 hash, then uses `make_set(ActionType)` to collect all actions per device, and finally checks that both 'FileCreated' and 'FileDeleted' appear in the set. This precisely identifies devices where the file was both created and later deleted, indicating a potential cleanup attempt.
What should I do if I get this SC-200 question wrong?
Review advanced hunting uses Kusto Query Language (KQL)., then practise related SC-200 questions on the same topic to reinforce the concept.
Are there clue words in this question I should notice?
Yes — watch for: "first". Order matters here. You are being tested on which action comes before the others — not which action is generally useful.
What is the key concept behind this question?
Advanced hunting uses Kusto Query Language (KQL).
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 →
Last reviewed: Jun 11, 2026
This SC-200 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 SC-200 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.