Custom detection in MDE

joomla3597 55 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 and Office Install, redeem, activate For business Windows
Windows for business Windows Client for IT Pros Devices and deployment Configure application groups
Microsoft Security Microsoft Defender Microsoft Defender for Cloud
{count} votes

Accepted answer
  1. Givary-MSFT 35,621 Reputation points Microsoft Employee Moderator
    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.