mediumMultiple ChoiceObjective-mapped
SC-200 Practice Question: A SOC analyst is investigating a potential…
A SOC analyst is investigating a potential brute-force attack on an Azure VM. The analyst has ingested Windows Security Events into Microsoft Sentinel. Which KQL query would count the number of failed logon attempts (EventID 4625) per user account in the last hour?
⚠ Common exam trap
The trap here is that candidates often apply the time filter after the summarize operator (as in Option A), which incorrectly counts all historical data before filtering, or they confuse the SecurityEvent table with SigninLogs (Option C), which is for Azure AD sign-ins and not Windows Security Events on a VM.
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
✓
SecurityEvent | where EventID == 4625 and TimeGenerated > ago(1h) | summarize Count = count() by Account
It filters for EventID 4625 (failed logon) and restricts the time range to the last hour before summarizing the count per Account. This ensures only relevant events are counted, and the aggregation is performed on the correct field (Account) from the SecurityEvent table, which contains Windows Security Events ingested into Sentinel.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
SecurityEvent | where EventID == 4625 | summarize Count = count() by Account | where TimeGenerated > ago(1h)
Why it's wrong here
This query filters events by EventID 4625, then summarizes the count by account, and only then attempts to apply a time filter. Because the summarize operator discards the TimeGenerated column, the subsequent where clause references a column that no longer exists, causing a query error rather than returning 'incorrect' results. Even if the column were available, the filter would be applied after the aggregation, meaning events older than one hour would still be included in the counts. The correct approach is to apply the time filter before the summarize so only recent failed logons are counted.
- ✓
SecurityEvent | where EventID == 4625 and TimeGenerated > ago(1h) | summarize Count = count() by Account
Why this is correct
This query correctly applies the time filter alongside the EventID filter in the where clause, so only failed logon events (Event 4625) from the last hour are passed into the summarize operator. The summarize then groups these pre-filtered rows by Account, yielding the failure count for each account within the desired time window. This is a textbook example of proper KQL query ordering: filter first, aggregate second, and optionally post-filter aggregated results only if needed.
- ✗
SigninLogs | where ResultType != 0 | summarize Count = count() by UserPrincipalName | where TimeGenerated > ago(1h)
Why it's wrong here
This query uses the SigninLogs table, which contains Microsoft Entra ID authentication logs, not Windows Security Events captured by the SecurityEvent table. Event 4625 is specific to Windows, so any query against SigninLogs with ResultType != 0 will never return the failed logon attempts for a local VM. Additionally, the time filter is again placed after summarize, which is invalid because TimeGenerated is not retained after aggregation. To answer the question, the analyst must query SecurityEvent with EventID 4625 and apply the time filter before the summarize.
- ✗
SecurityEvent | where EventID == 4625 | make-series Count = count() default=0 on TimeGenerated from ago(1h) to now() step 1h by Account
Why it's wrong here
The make-series operator is intended for creating time series data, generating a row per account with an array of counts for each time bucket, often used for line charts. Here, the requirement is simply the total number of failed logons per account, not a per-hour series; the query would return a collection of arrays rather than a flat summary table. While the query does filter by EventID and time, the output shape is wrong and the operator adds unnecessary complexity and overhead. A simple summarize count() by Account with the appropriate where clause is the clear and direct solution.
Go deeper
Related to this question
About these practice questions
One of 209 original SC-200 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
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.