AZ-500 Exam QuestionsBrowse all questions from this exam

AZ-500 Exam - Question 31


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?

Show Answer
Correct Answer: AC

In Azure Log Analytics, to detect unsuccessful user sign-in attempts and filter users who have failed to sign in more than five times, you need to identify the sign-in events and count the occurrences of those events that meet specific criteria. The EventID parameter identifies sign-in events, while the CountIf() parameter allows for counting the occurrences based on certain conditions. Using the EventID and CountIf() parameters, you can structure your query to count only the failed sign-in attempts, thus providing the necessary insight.

Discussion

17 comments
Sign in to comment
Ram9533Option: A
Oct 5, 2021

-- 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

xRiot007
Jul 15, 2024

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)"

Rume
Jun 30, 2021

too many repeat questions - Answer is correct.

kakakayayaya
Aug 20, 2021

Slightly different, note count and countIF

IrishtkOption: C
Apr 29, 2022

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

AzureAdventure
Aug 4, 2023

Thanks

Andre369Option: A
May 18, 2023

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.

salmantarikOption: A
Dec 11, 2022

Correct answer. CountIf returns True of False and can used at a column. Count returns the number of records.

ArchitectXOption: C
Sep 14, 2023

C is the right answer

the_dstryrOption: C
Jan 3, 2022

Answer is correct

majstor86Option: C
Mar 2, 2023

C. The EventID and Count() parameters.

MaryamNesaOption: A
Apr 19, 2023

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.

justjeroen
Apr 23, 2023

Can I do something like countif(EventID == 4625) ?

ESAJRROption: C
Jul 7, 2023

C. The EventID and Count() parameters.

Srihari0908Option: C
Jan 21, 2024

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:

CharnyasheOption: A
Feb 9, 2022

Tricky I had assumed its count(if) since its failed attempts

udmrajOption: C
Feb 21, 2022

Answer C is correct

jaanyaOption: C
Apr 3, 2023

SecurityEvent | where EventID == 4625 | where TimeGenerated > ago(2d) | summarize count() by AccountName | where count_ > 5

ESAJRROption: C
Sep 25, 2023

C. The EventID and Count() parameters.

wardy1983Option: C
Nov 14, 2023

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

DLROption: A
Mar 30, 2024

the answer is A as the question is asking only to show users who failed to sign in at least 5 times.