ResourceNotFound for defender for Identity incidents

itay4 36 Reputation points
2024-06-07T06:00:53.2533333+00:00

Hi, we are trying to get Defender for Identity incidents using this:

curl -X GET https://api.security.microsoft.com/api/incidents/{} -H "Accept: application/json" -H "Authorization: Bearer <>" -H "Content-Type: application/json" --noproxy "*"

but we are getting this error:

{"error": {"code": "ResourceNotFound", "message": "Incident {} was not found"}

Although the incident ID exists in the MS portal, what should we do?

Microsoft Defender for Identity
Microsoft Defender for Identity
A Microsoft service that helps protect enterprise hybrid environments from multiple types of advanced, targeted cyberattacks and insider threats.
178 questions
0 comments No comments
{count} vote

1 answer

Sort by: Most helpful
  1. Pauline Mbabu 90 Reputation points Microsoft Employee
    2024-07-08T09:03:34.6366667+00:00

    Hello itay4,

    To get the list of all incidents try and run this request: https://api.security.microsoft.com/api/incidents. This should give you all the incidents in your tenant and the associated alerts.

    To get the specific incident try running this request: https://api.security.microsoft.com/api/incidents/{incidentId}?tid={tenantId}. Replace the incidentId with the relevant Id and the tenantId with your tenantId.

    I hope this helps answer your question.

    0 comments No comments