exam questions

Exam AZ-500 All Questions

View all questions & answers for the AZ-500 exam

Exam AZ-500 topic 1 question 31 discussion

Actual exam question from Microsoft's AZ-500
Question #: 31
Topic #: 1
[All AZ-500 Questions]

You have a sneaking suspicion that there are users trying to sign in to resources which are inaccessible to them.
You decide to create an Azure Log Analytics query to confirm your suspicions. The query will detect unsuccessful user sign-in attempts from the last few days.
You want to make sure that the results only show users who had failed to sign-in more than five times.
Which of the following should be included in your query?

  • A. The EventID and CountIf() parameters.
  • B. The ActivityID and CountIf() parameters.
  • C. The EventID and Count() parameters.
  • D. The ActivityID and Count() parameters.
Show Suggested Answer Hide Answer
Suggested Answer: C 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
Ram9533
Highly Voted 3 years, 6 months ago
-- KUSTO Query let timeframe = 1d; SecurityEvent | where TimeGenerated > ago(1d) | where AccountType == 'User' and EventID == 4625 // 4625 - failed log in | summarize failed_login_attempts=count(), latest_failed_login=arg_max(TimeGenerated, Account) by Account | where failed_login_attempts > 5 | project-away Account1
upvoted 41 times
xRiot007
9 months, 2 weeks ago
You don't need this part "latest_failed_login=arg_max(TimeGenerated, Account)". It is not important when the last login occurred, you already have a filter that will retrieve everything newer than the timeframe. Regarding timeframe, if you define, you should also use it like this "| where TimeGenerated > ago(timeframe)"
upvoted 1 times
...
...
Rume
Highly Voted 3 years, 10 months ago
too many repeat questions - Answer is correct.
upvoted 7 times
kakakayayaya
3 years, 8 months ago
Slightly different, note count and countIF
upvoted 3 times
...
...
stonwall12
Most Recent 2 months, 2 weeks ago
Selected Answer: C
Answer: C, The EventID and Count() parameters. Reason: To detect unsuccessful sign-in attempts, you need to use the EventID parameter to filter for failed sign-in events. The Count() function is used to aggregate and count these events per user. By using these together, you can identify users with more than five failed sign-in attempts, meeting the requirement of the query. Reference: https://learn.microsoft.com/en-us/azure/azure-monitor/logs/query-language
upvoted 2 times
...
Ruffyit
5 months, 4 weeks ago
You don't need this part "latest_failed_login=arg_max(TimeGenerated, Account)". It is not important when the last login occurred, you already have a filter that will retrieve everything newer than the timeframe. Regarding timeframe, if you define, you should also use it like this "| where TimeGenerated > ago(timeframe)"
upvoted 1 times
...
pentium75
9 months ago
Selected Answer: C
I was tricked because the question doesn't say it would be about on-premises AD logins. Entra ID signins have neither ActivityID not EventID column.
upvoted 1 times
...
DLR
1 year ago
the answer is A as the question is asking only to show users who failed to sign in at least 5 times.
upvoted 1 times
...
Srihari0908
1 year, 3 months ago
Selected Answer: C
In Azure Log Analytics, you typically use the Kusto Query Language (KQL) to analyze and query data. When you want to detect unsuccessful user sign-in attempts and ensure that the results only show users who had failed to sign in more than five times, you need to count the occurrences of failed sign-ins per user and then filter the results based on that count. For sign-in logs, the relevant information is usually stored in fields like EventID (which identifies the type of event) and UserPrincipalName (or a similar field that identifies the user). The actual names of these fields can vary depending on how the data is structured in your specific Azure Log Analytics workspace. Option C, "The EventID and Count() parameters," is the closest to what you need, but it's important to use the correct KQL syntax and structure the query properly. Here's how you can structure the query:
upvoted 3 times
...
wardy1983
1 year, 5 months ago
Answer: C Explanation: KUSTO Query let timeframe = 1d; SecurityEvent | where TimeGenerated > ago(1d) | where AccountType == 'User' and EventID == 4625 // 4625 - failed log in | summarize failed_login_attempts=count(), latest_failed_login=arg_max(TimeGenerated, Account) by Account | where failed_login_attempts > 5 | project-away Account1 Reference: https://docs.microsoft.com/en-us/azure/azure-monitor/log-query/examples
upvoted 1 times
...
ESAJRR
1 year, 7 months ago
Selected Answer: C
C. The EventID and Count() parameters.
upvoted 1 times
...
ArchitectX
1 year, 7 months ago
Selected Answer: C
C is the right answer
upvoted 3 times
...
ESAJRR
1 year, 9 months ago
Selected Answer: C
C. The EventID and Count() parameters.
upvoted 2 times
...
Andre369
1 year, 11 months ago
Selected Answer: A
To create an Azure Log Analytics query that detects unsuccessful user sign-in attempts and filters for users who failed to sign in more than five times, you would need to include the EventID and CountIf() parameters in your query. The EventID parameter helps identify the sign-in events, typically represented by specific event IDs in the logs. The CountIf() parameter allows you to specify a condition to count the occurrences that meet that condition. In this case, you would set the condition to count the unsuccessful sign-in attempts. Therefore, the correct answer is: A. The EventID and CountIf() parameters.
upvoted 5 times
...
MaryamNesa
2 years ago
Answer A is correct. The count() function and countif() function are both used in Azure Log Analytics queries to count the number of records that match a certain condition. However, they differ in the way they apply the condition. The count() function simply counts all records in a given table, without applying any conditions. For example, count(*) would count all records in a table. The countif() function, on the other hand, applies a condition to the count operation. It counts the number of records that match a specific condition, specified using a Boolean expression. For example, countif(Severity == 'Error') would count the number of records where the severity is 'Error'. In summary, the count() function counts all records, while the countif() function counts only the records that match a specified condition.
upvoted 2 times
justjeroen
2 years ago
Can I do something like countif(EventID == 4625) ?
upvoted 3 times
...
...
jaanya
2 years ago
SecurityEvent | where EventID == 4625 | where TimeGenerated > ago(2d) | summarize count() by AccountName | where count_ > 5
upvoted 1 times
...
majstor86
2 years, 1 month ago
Selected Answer: C
C. The EventID and Count() parameters.
upvoted 2 times
...
salmantarik
2 years, 4 months ago
Correct answer. CountIf returns True of False and can used at a column. Count returns the number of records.
upvoted 3 times
...
Irishtk
2 years, 12 months ago
Ans is C. Example of the Kusto query at: https://techcommunity.microsoft.com/t5/core-infrastructure-and-security/failed-login-report-using-log-analytics-and-logic-apps/ba-p/745025
upvoted 5 times
AzureAdventure
1 year, 8 months ago
Thanks
upvoted 1 times
...
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago