Custom detection in MDE

joomla3597 35 Reputation points
2024-04-23T12:01:01.1433333+00:00

I am trying to create Custom Detection in Microsoft Security Center where my query has multiple Join and summarize statements.

Whenever I am running query its providing results but after saving in Custom Detection form and under its results section its giving below message, although I already have Timestamp, ReportId, DeviceId as an output coming.

"No events match the given event identifiers (a combination of ReportId, AlertId, BehaviorId, or DeviceId and Timestamp). Edit the query's aggregation expressions for these columns and try again."

Can anyone help me to understand how I can fix the above issue?

Microsoft 365
Microsoft 365
Formerly Office 365, is a line of subscription services offered by Microsoft which adds to and includes the Microsoft Office product line.
5,086 questions
Windows 10 Security
Windows 10 Security
Windows 10: A Microsoft operating system that runs on personal computers and tablets.Security: The precautions taken to guard against crime, attack, sabotage, espionage, or another threat.
2,926 questions
Microsoft Defender for Cloud
Microsoft Defender for Cloud
An Azure service that provides threat protection for workloads running in Azure, on-premises, and in other clouds. Previously known as Azure Security Center and Azure Defender.
1,403 questions
{count} votes

Accepted answer
  1. Givary-MSFT 32,991 Reputation points Microsoft Employee
    2024-04-24T06:29:13.7966667+00:00

    @Ankush Kumar Thank you for reaching out to us, for better understanding of the issue, if you can share the screenshot/query which you are trying to execute.

    1 person found this answer helpful.

1 additional answer

Sort by: Most helpful
  1. Jan Farwick 0 Reputation points
    2024-09-26T12:56:11.6333333+00:00

    I have a very similar (but probably simpler) query where I run into the same problem.

    I actually only need an alarm if a user logs in several times (5 times a day) on his client as local admin

    The following query works as a query, but not as a custom detection rule

    DeviceLogonEvents

    | where DeviceName startswith “NB”

    | where ActionType==“LogonSuccess” and LogonType=="Interactive”

    | extend parsing=parse_json(AdditionalFields)

    | extend LocalLogon=parsing[“IsLocalLogon”]

    | where LocalLogon=="true”

    | where Timestamp > ago(1d)

    | summarize LogonCount=count(), LatestTimestamp=max(Timestamp) by DeviceId, AccountName, bin(Timestamp, 1d), DeviceName

    | where LogonCount >= 5

    | where AccountName startswith “admin_”

    | project DeviceId, DeviceName, AccountName, LatestTimestamp, LogonCount, ReportId = tostring(DeviceId), Timestamp = LatestTimestamp

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.