wazuh missing ms-graph events

114 views
Skip to first unread message

leon appel

unread,
Sep 23, 2024, 12:18:12 PM9/23/24
to Wazuh | Mailing List
Hi

I am having an issue with ms-graph not sending all events to wazuh
I tried updating the template and also tried a the following pipeline, with the result more logs werent visible in the console
    {
     "rename": {
       "if": "ctx?.microsoft.graph.riskDetection instanceof Map",
       "field": "createdDateTime",
       "target_field": "detectedDateTime",
       "ignore_missing": true
      }
    },

errors.png

Thank you

Ifeanyi Onyia Odike

unread,
Sep 23, 2024, 3:41:15 PM9/23/24
to Wazuh | Mailing List
Hi Leon,

Can you share your ms-graph configuration block from ossec.conf and tell me what logs you would like to receive?

Regards,

leon appel

unread,
Sep 23, 2024, 5:20:23 PM9/23/24
to Wazuh | Mailing List

Ifeanyi Onyia Odike

unread,
Sep 24, 2024, 9:07:47 AM9/24/24
to Wazuh | Mailing List
The configuration looks good.
What events are you missing?

leon appel

unread,
Sep 24, 2024, 10:00:56 AM9/24/24
to Wazuh | Mailing List
Hi

I am missing these as its somewhere getting the information from that it needs to list createdDateTime but that dont exist in azure. Azure has a property called activityDateTime but where exactly would you change createdDateTime to activityDateTime.

The current config:
<name>identityProtection</name>
<relationship>riskDetections</relationship>

Kind Regards
Leon

Ifeanyi Onyia Odike

unread,
Sep 25, 2024, 7:59:47 AM9/25/24
to Wazuh | Mailing List
Hi Lean

I think I understand the issue here:
Can you share with me the log that shows the failed lookup for the condition you meant in this statement: "I am missing these as its somewhere getting the information from that it needs to list createdDateTime but that dont exist in azure."

Can you also confirm your Wazuh versionThe ms-graph script retrieves logs using both activityDateTime and createdDateTime conditions

leon appel

unread,
Sep 25, 2024, 10:11:19 AM9/25/24
to Wazuh | Mailing List
Hi Ifeanyi

This is the error
2024/09/25 14:51:01 wazuh-modulesd:ms-graph: WARNING: Received unsuccessful status code when attempting to get relationship 'riskDetections' logs: Status code was '400' & response was '{"error":{"code":"BadRequest","message":"Invalid filter clause: Could not find a property named 'createdDateTime' on type 'microsoft.graph.riskDetection'.","innerError":{"date":"2024-09-25T13:51:01","request-id":"0b75322c-3694-4634-b2c2-32019280bc38","client-request-id":"0b75322c-3694-4634-b2c2-32019280bc38"}}}'

Regards

Ifeanyi Onyia Odike

unread,
Sep 25, 2024, 3:45:34 PM9/25/24
to Wazuh | Mailing List
Hi Leon,

I for some reason, it encounters this challenge when trying to access logs using the identityProtection endpoint. I will have to take this issue internally.

Thank you for bringing this up. I will let you know if there are any updates.

leon appel

unread,
Sep 26, 2024, 5:46:00 AM9/26/24
to Wazuh | Mailing List
Hi Ifeanyi

Would there be any way I can perhaps either change the property its lookin for to something like activityDateTime

Kind Regards

Ifeanyi Onyia Odike

unread,
Sep 26, 2024, 9:20:57 AM9/26/24
to Wazuh | Mailing List
Modifying this by yourself will mean that you have to understand the ms-graph script stored at /var/ossec/wodles/azure/azure_services/graph.py, and this might be technically complicated.
Reply all
Reply to author
Forward
0 new messages