# Microsoft Defender

> Triage Microsoft Defender incidents and alerts, run advanced hunting queries, track your Microsoft Secure Score, and start workflows when an incident opens or changes or a high-severity alert is raised.

App · 13 actions. Web page: https://docs.lodol.com/docs/integrations/microsoft-defender

## Actions

### Add comment to alert

Add a comment to a Microsoft Defender alert's history. Comments can't be edited or removed.

**Inputs**

- Alert (`alert_id`, text, required): The alert. Pick one of the 50 most recent, or use its id from a trigger or List alerts.
- Comment (`comment`, text, required): The comment.

**Outputs**

- `alert_id` (text): The alert's id
- `comments` (list): Every comment on the alert, with the new one
- `count` (number): How many are returned

**Example output**

```json
{
  "alert_id": "da09e47ccc-b74a-45bb-985f-8d6c077b70b6_1",
  "comments": [
    {
      "comment": "Isolated the device and reset the user's password.",
      "createdByDisplayName": "secadmin@contoso.com",
      "createdDateTime": "2026-01-22T14:02:11.1606766Z"
    }
  ],
  "count": 1
}
```

### Add comment to incident

Add a comment to a Microsoft Defender incident's history. Comments can't be edited or removed.

**Inputs**

- Incident (`incident_id`, text, required): The incident. Pick one of the 50 most recent, or use its number from a trigger or List incidents.
- Comment (`comment`, text, required): The comment.

**Outputs**

- `comments` (list): Every comment on the incident, with the new one
- `count` (number): How many are returned
- `incident_id` (text): The incident's id

**Example output**

```json
{
  "comments": [
    {
      "comment": "Isolated the device and reset the user's password.",
      "createdByDisplayName": "secadmin@contoso.com",
      "createdDateTime": "2026-01-22T14:02:11.1606766Z"
    }
  ],
  "count": 1,
  "incident_id": "29"
}
```

### Get alert

Get one Microsoft Defender alert: what it detected, what it involves (devices, users, files), what Microsoft recommends, and its comments.

**Inputs**

- Alert (`alert_id`, text, required): The alert. Pick one of the 50 most recent, or use its id from a trigger or List alerts.

**Outputs**

- `alert` (object): A Microsoft Defender alert

**Example output**

```json
{
  "alert": {
    "actorDisplayName": "",
    "alertWebUrl": "https://security.microsoft.com/alerts/da09e47ccc-b74a-45bb-985f-8d6c077b70b6_1?tid=cfcdbe43-297b-4c6b-ac7e-8d7f6befb514",
    "assignedTo": "secadmin@contoso.com",
    "category": "Persistence",
    "classification": "truePositive",
    "comments": [
      {
        "comment": "Isolated the device and reset the user's password.",
        "createdByDisplayName": "secadmin@contoso.com",
        "createdDateTime": "2026-01-22T14:02:11.1606766Z"
      }
    ],
    "createdDateTime": "2026-01-22T12:09:22.8566667Z",
    "description": "An event consumer represents the action to take upon the firing of an event.",
    "detectionSource": "microsoftDefenderForEndpoint",
    "determination": "multiStagedAttack",
    "evidence": [
      {
        "name": "w11pro-test",
        "remediationStatus": "active",
        "type": "device",
        "verdict": "suspicious"
      },
      {
        "name": "W11PRO-TEST\\adminlocal",
        "remediationStatus": "active",
        "type": "process",
        "verdict": "suspicious"
      }
    ],
    "firstActivityDateTime": "2026-01-22T12:08:16.1404016Z",
    "id": "da09e47ccc-b74a-45bb-985f-8d6c077b70b6_1",
    "incidentId": "29",
    "incidentWebUrl": "https://security.microsoft.com/incident2/29/overview?tid=cfcdbe43-297b-4c6b-ac7e-8d7f6befb514",
    "investigationState": "unsupportedAlertType",
    "lastActivityDateTime": "2026-01-22T13:36:33.6406679Z",
    "lastUpdateDateTime": "2026-02-25T16:29:33.1Z",
    "mitreTechniques": [
      "T1546.003"
    ],
    "productName": "Microsoft Defender for Endpoint",
    "providerAlertId": "09e47ccc-b74a-45bb-985f-8d6c077b70b6_1",
    "recommendedActions": "1. Find the propagation entry point.",
    "resolvedDateTime": "",
    "serviceSource": "microsoftDefenderForEndpoint",
    "severity": "high",
    "status": "inProgress",
    "threatDisplayName": "",
    "threatFamilyName": "",
    "title": "A WMI event filter was bound to a suspicious event consumer"
  }
}
```

### Get incident

Get one Microsoft Defender incident with its comments and, if you choose, its alerts and what they involve.

**Inputs**

- Incident (`incident_id`, text, required): The incident. Pick one of the 50 most recent, or use its number from a trigger or List incidents.
- Include alerts (`include_alerts`, true/false): Yes to include the incident's alerts. No unless chosen. Default: `false`.

**Outputs**

- `incident` (object): A Microsoft Defender incident

**Example output**

```json
{
  "incident": {
    "alerts": [
      {
        "actorDisplayName": "",
        "alertWebUrl": "https://security.microsoft.com/alerts/da09e47ccc-b74a-45bb-985f-8d6c077b70b6_1?tid=cfcdbe43-297b-4c6b-ac7e-8d7f6befb514",
        "assignedTo": "secadmin@contoso.com",
        "category": "Persistence",
        "classification": "truePositive",
        "comments": [
          {
            "comment": "Isolated the device and reset the user's password.",
            "createdByDisplayName": "secadmin@contoso.com",
            "createdDateTime": "2026-01-22T14:02:11.1606766Z"
          }
        ],
        "createdDateTime": "2026-01-22T12:09:22.8566667Z",
        "description": "An event consumer represents the action to take upon the firing of an event.",
        "detectionSource": "microsoftDefenderForEndpoint",
        "determination": "multiStagedAttack",
        "evidence": [
          {
            "name": "w11pro-test",
            "remediationStatus": "active",
            "type": "device",
            "verdict": "suspicious"
          },
          {
            "name": "W11PRO-TEST\\adminlocal",
            "remediationStatus": "active",
            "type": "process",
            "verdict": "suspicious"
          }
        ],
        "firstActivityDateTime": "2026-01-22T12:08:16.1404016Z",
        "id": "da09e47ccc-b74a-45bb-985f-8d6c077b70b6_1",
        "incidentId": "29",
        "incidentWebUrl": "https://security.microsoft.com/incident2/29/overview?tid=cfcdbe43-297b-4c6b-ac7e-8d7f6befb514",
        "investigationState": "unsupportedAlertType",
        "lastActivityDateTime": "2026-01-22T13:36:33.6406679Z",
        "lastUpdateDateTime": "2026-02-25T16:29:33.1Z",
        "mitreTechniques": [
          "T1546.003"
        ],
        "productName": "Microsoft Defender for Endpoint",
        "providerAlertId": "09e47ccc-b74a-45bb-985f-8d6c077b70b6_1",
        "recommendedActions": "1. Find the propagation entry point.",
        "resolvedDateTime": "",
        "serviceSource": "microsoftDefenderForEndpoint",
        "severity": "high",
        "status": "inProgress",
        "threatDisplayName": "",
        "threatFamilyName": "",
        "title": "A WMI event filter was bound to a suspicious event consumer"
      }
    ],
    "assignedTo": "secadmin@contoso.com",
    "classification": "truePositive",
    "comments": [
      {
        "comment": "Isolated the device and reset the user's password.",
        "createdByDisplayName": "secadmin@contoso.com",
        "createdDateTime": "2026-01-22T14:02:11.1606766Z"
      }
    ],
    "createdDateTime": "2026-01-22T12:09:23.1433333Z",
    "customTags": [
      "Demo"
    ],
    "description": "Microsoft observed Raspberry Robin worm activity spreading through infected USB devices.",
    "determination": "multiStagedAttack",
    "displayName": "Multi-stage incident involving Execution & Command and control on one endpoint",
    "id": "29",
    "incidentWebUrl": "https://security.microsoft.com/incident2/29/overview?tid=cfcdbe43-297b-4c6b-ac7e-8d7f6befb514",
    "lastModifiedBy": "API-App:secadmin@contoso.com",
    "lastUpdateDateTime": "2026-02-25T16:29:33.1Z",
    "priorityScore": 100,
    "redirectIncidentId": "",
    "resolvingComment": "",
    "severity": "high",
    "status": "active",
    "summary": "Defender Experts has identified malicious activity.",
    "systemTags": []
  }
}
```

### Get Secure Score

Get your organization's latest Microsoft Secure Score: the score, the highest possible, averages to compare with, and the score on each recommendation.

**Inputs**: None.

**Outputs**

- `secure_score` (object): Your organization's Microsoft Secure Score

**Example output**

```json
{
  "secure_score": {
    "activeUserCount": 0,
    "averageComparativeScores": [
      {
        "averageScore": 37.0,
        "basis": "AllTenants"
      },
      {
        "averageScore": 46.0,
        "basis": "TotalSeats"
      }
    ],
    "controlScores": [
      {
        "controlCategory": "Identity",
        "controlName": "AdminMFA",
        "description": "Requiring multifactor authentication (MFA) for all accounts with privileged roles",
        "score": 35.0
      }
    ],
    "createdDateTime": "2026-11-01T15:21:00Z",
    "currentScore": 387.0,
    "enabledServices": [
      "HasExchange",
      "HasSharePoint",
      "HasInTune"
    ],
    "id": "00000001-0001-0001-0001-000000000001_2026-11-01",
    "licensedUserCount": 100,
    "maxScore": 697.0,
    "percentage": 55.5
  }
}
```

### Get Secure Score recommendation

Get one Microsoft Secure Score recommendation: what to do, how, what it is worth and the changes your organization made to it.

**Inputs**

- Recommendation (`control_id`, text, required): The recommendation. Pick one, or use its id, such as AdminMFAV2.

**Outputs**

- `control` (object): A Secure Score recommendation (Microsoft calls it a control profile)

**Example output**

```json
{
  "control": {
    "actionType": "Config",
    "actionUrl": "https://entra.microsoft.com",
    "controlCategory": "Identity",
    "controlStateUpdates": [
      {
        "assignedTo": "",
        "comment": "",
        "state": "Default",
        "updatedBy": "",
        "updatedDateTime": "2026-03-19T22:37:14.628799Z"
      }
    ],
    "deprecated": false,
    "id": "AdminMFAV2",
    "implementationCost": "Low",
    "lastModifiedDateTime": "2026-03-19T22:37:14.628799Z",
    "maxScore": 10,
    "rank": 1,
    "remediation": "Require multifactor authentication for administrative roles.",
    "remediationImpact": "Administrators will be asked for a second factor.",
    "service": "AzureAD",
    "threats": [
      "Account Breach",
      "Elevation of Privilege"
    ],
    "tier": "Core",
    "title": "Ensure multifactor authentication is enabled for all users in administrative roles",
    "userImpact": "Low"
  }
}
```

### List alerts

List Microsoft Defender alerts, newest first, by status, severity, classification, product, owner, date or title.

**Inputs**

- Status (`status`, text): Only alerts with this status. Leave empty for all. One of: `new`, `inProgress` (In progress), `resolved`.
- Severity (`severity`, text): Only this severity. Leave empty for all. One of: `high`, `medium`, `low`, `informational`.
- Classification (`classification`, text): Only this classification. Leave empty for all. One of: `truePositive` (True positive (a real threat)), `informationalExpectedActivity` (Informational, expected activity), `falsePositive` (False positive (not a threat)), `unknown` (Not set).
- Product (`service_source`, text): Only alerts this Microsoft product raised. Leave empty for all. One of: `microsoftDefenderForEndpoint` (Defender for Endpoint), `microsoftDefenderForOffice365` (Defender for Office 365), `microsoftDefenderForIdentity` (Defender for Identity), `microsoftDefenderForCloudApps` (Defender for Cloud Apps), `microsoftDefenderForCloud` (Defender for Cloud), `microsoft365Defender` (Microsoft Defender XDR), `azureAdIdentityProtection` (Entra ID Protection), `dataLossPrevention` (Data loss prevention), `microsoftInsiderRiskManagement` (Insider risk management), `microsoftAppGovernance` (App governance), `microsoftSentinel` (Microsoft Sentinel).
- Assigned to (`assigned_to`, text): Only those assigned to this person, by their sign-in such as ana@city.gov. Leave empty for everyone.
- Created after (`created_after`, date and time): Only alerts raised at or after this time. Leave empty for any.
- Updated after (`updated_after`, date and time): Only alerts changed at or after this time. Leave empty for any.
- Title contains (`title_contains`, text): Only alerts whose title contains this. Leave empty for all.
- Maximum results (`limit`, number): How many to return, newest first, up to 1000. From 1 to 1000. Default: `50`.

**Outputs**

- `alerts` (list): The alerts
- `count` (number): How many are returned

**Example output**

```json
{
  "alerts": [
    {
      "actorDisplayName": "",
      "alertWebUrl": "https://security.microsoft.com/alerts/da09e47ccc-b74a-45bb-985f-8d6c077b70b6_1?tid=cfcdbe43-297b-4c6b-ac7e-8d7f6befb514",
      "assignedTo": "secadmin@contoso.com",
      "category": "Persistence",
      "classification": "truePositive",
      "comments": [
        {
          "comment": "Isolated the device and reset the user's password.",
          "createdByDisplayName": "secadmin@contoso.com",
          "createdDateTime": "2026-01-22T14:02:11.1606766Z"
        }
      ],
      "createdDateTime": "2026-01-22T12:09:22.8566667Z",
      "description": "An event consumer represents the action to take upon the firing of an event.",
      "detectionSource": "microsoftDefenderForEndpoint",
      "determination": "multiStagedAttack",
      "evidence": [
        {
          "name": "w11pro-test",
          "remediationStatus": "active",
          "type": "device",
          "verdict": "suspicious"
        },
        {
          "name": "W11PRO-TEST\\adminlocal",
          "remediationStatus": "active",
          "type": "process",
          "verdict": "suspicious"
        }
      ],
      "firstActivityDateTime": "2026-01-22T12:08:16.1404016Z",
      "id": "da09e47ccc-b74a-45bb-985f-8d6c077b70b6_1",
      "incidentId": "29",
      "incidentWebUrl": "https://security.microsoft.com/incident2/29/overview?tid=cfcdbe43-297b-4c6b-ac7e-8d7f6befb514",
      "investigationState": "unsupportedAlertType",
      "lastActivityDateTime": "2026-01-22T13:36:33.6406679Z",
      "lastUpdateDateTime": "2026-02-25T16:29:33.1Z",
      "mitreTechniques": [
        "T1546.003"
      ],
      "productName": "Microsoft Defender for Endpoint",
      "providerAlertId": "09e47ccc-b74a-45bb-985f-8d6c077b70b6_1",
      "recommendedActions": "1. Find the propagation entry point.",
      "resolvedDateTime": "",
      "serviceSource": "microsoftDefenderForEndpoint",
      "severity": "high",
      "status": "inProgress",
      "threatDisplayName": "",
      "threatFamilyName": "",
      "title": "A WMI event filter was bound to a suspicious event consumer"
    }
  ],
  "count": 1
}
```

### List incidents

List Microsoft Defender incidents, newest first, by status, severity, classification, owner or date. An incident groups the alerts of one attack.

**Inputs**

- Status (`status`, text): Only incidents with this status. Leave empty for all. One of: `active`, `inProgress` (In progress), `resolved`, `redirected` (Merged into another incident), `awaitingAction` (Awaiting your action).
- Severity (`severity`, text): Only this severity. Leave empty for all. One of: `high`, `medium`, `low`, `informational`.
- Classification (`classification`, text): Only this classification. Leave empty for all. One of: `truePositive` (True positive (a real threat)), `informationalExpectedActivity` (Informational, expected activity), `falsePositive` (False positive (not a threat)), `unknown` (Not set).
- Assigned to (`assigned_to`, text): Only those assigned to this person, by their sign-in such as ana@city.gov. Leave empty for everyone.
- Created after (`created_after`, date and time): Only incidents created at or after this time. Leave empty for any.
- Updated after (`updated_after`, date and time): Only incidents changed at or after this time. Leave empty for any.
- Name contains (`name_contains`, text): Only incidents whose name contains this. Leave empty for all.
- Maximum results (`limit`, number): How many to return, newest first, up to 1000. From 1 to 1000. Default: `50`.

**Outputs**

- `count` (number): How many are returned
- `incidents` (list): The incidents

**Example output**

```json
{
  "count": 1,
  "incidents": [
    {
      "assignedTo": "secadmin@contoso.com",
      "classification": "truePositive",
      "comments": [
        {
          "comment": "Isolated the device and reset the user's password.",
          "createdByDisplayName": "secadmin@contoso.com",
          "createdDateTime": "2026-01-22T14:02:11.1606766Z"
        }
      ],
      "createdDateTime": "2026-01-22T12:09:23.1433333Z",
      "customTags": [
        "Demo"
      ],
      "description": "Microsoft observed Raspberry Robin worm activity spreading through infected USB devices.",
      "determination": "multiStagedAttack",
      "displayName": "Multi-stage incident involving Execution & Command and control on one endpoint",
      "id": "29",
      "incidentWebUrl": "https://security.microsoft.com/incident2/29/overview?tid=cfcdbe43-297b-4c6b-ac7e-8d7f6befb514",
      "lastModifiedBy": "API-App:secadmin@contoso.com",
      "lastUpdateDateTime": "2026-02-25T16:29:33.1Z",
      "priorityScore": 100,
      "redirectIncidentId": "",
      "resolvingComment": "",
      "severity": "high",
      "status": "active",
      "summary": "Defender Experts has identified malicious activity.",
      "systemTags": []
    }
  ]
}
```

### List Secure Score history

List your organization's Microsoft Secure Score for each recent day, newest first.

**Inputs**

- Days (`days`, number): How many days to list, up to 90. From 1 to 90. Default: `30`.

**Outputs**

- `count` (number): How many are returned
- `secure_scores` (list): Each day's score

**Example output**

```json
{
  "count": 1,
  "secure_scores": [
    {
      "activeUserCount": 0,
      "createdDateTime": "2026-11-01T15:21:00Z",
      "currentScore": 387.0,
      "id": "00000001-0001-0001-0001-000000000001_2026-11-01",
      "licensedUserCount": 100,
      "maxScore": 697.0,
      "percentage": 55.5
    }
  ]
}
```

### List Secure Score recommendations

List the recommendations that make up the Microsoft Secure Score, most important first, with what each is worth and protects against.

**Inputs**

- Category (`category`, text): Only recommendations in this category. Leave empty for all. One of: `Identity`, `Data`, `Device`, `Apps`, `Infrastructure`.
- Include retired (`include_deprecated`, true/false): Yes to include recommendations Microsoft has retired. No unless chosen. Default: `false`.

**Outputs**

- `controls` (list): The recommendations
- `count` (number): How many are returned

**Example output**

```json
{
  "controls": [
    {
      "actionType": "Config",
      "actionUrl": "https://entra.microsoft.com",
      "controlCategory": "Identity",
      "controlStateUpdates": [
        {
          "assignedTo": "",
          "comment": "",
          "state": "Default",
          "updatedBy": "",
          "updatedDateTime": "2026-03-19T22:37:14.628799Z"
        }
      ],
      "deprecated": false,
      "id": "AdminMFAV2",
      "implementationCost": "Low",
      "lastModifiedDateTime": "2026-03-19T22:37:14.628799Z",
      "maxScore": 10,
      "rank": 1,
      "remediation": "Require multifactor authentication for administrative roles.",
      "remediationImpact": "Administrators will be asked for a second factor.",
      "service": "AzureAD",
      "threats": [
        "Account Breach",
        "Elevation of Privilege"
      ],
      "tier": "Core",
      "title": "Ensure multifactor authentication is enabled for all users in administrative roles",
      "userImpact": "Low"
    }
  ],
  "count": 1
}
```

### Run advanced hunting query

Search your organization's Microsoft Defender data (device, email, identity and app activity) with an advanced hunting query written in Kusto Query Language (KQL), and return the rows it finds. A query can only read data; it can't change anything. Defender keeps about 30 days of this data.

**Inputs**

- Query (`query`, text, required): The query, in Kusto Query Language, such as: DeviceProcessEvents | where FileName == "powershell.exe" | take 10
- From (`start_time`, date and time): Only data from this time on. Leave empty for the last 30 days.
- To (`end_time`, date and time): Only data up to this time. Leave empty for now.
- Maximum rows (`max_rows`, number): How many rows to return, up to 10000. Use take in the query to ask Defender for fewer. From 1 to 10000. Default: `1000`.

**Outputs**

- `columns` (list): The result's columns
- `count` (number): How many rows are returned
- `rows` (list): The rows, in the query's order
- `total_rows` (number): How many rows the query found
- `truncated` (true/false): Whether more rows were found than 'Maximum rows' allows

**Example output**

```json
{
  "columns": [
    {
      "name": "Timestamp",
      "type": "DateTime"
    },
    {
      "name": "FileName",
      "type": "String"
    },
    {
      "name": "InitiatingProcessFileName",
      "type": "String"
    }
  ],
  "count": 1,
  "rows": [
    {
      "FileName": "cmd.exe",
      "InitiatingProcessFileName": "powershell.exe",
      "Timestamp": "2026-03-26T09:39:50.7688641Z"
    }
  ],
  "total_rows": 1,
  "truncated": false
}
```

### Update alert

Change a Microsoft Defender alert's status, owner, classification or determination, and add a comment. Only the fields you fill in change.

**Inputs**

- Alert (`alert_id`, text, required): The alert. Pick one of the 50 most recent, or use its id from a trigger or List alerts.
- Status (`status`, text): The alert's new status. Leave empty to keep it. One of: `new`, `inProgress` (In progress), `resolved`.
- Assign to (`assigned_to`, text): The new owner's sign-in, such as ana@city.gov. Leave empty to keep the alert's owner.
- Unassign (`unassign`, true/false): Yes to remove the alert's owner. No unless chosen. Default: `false`.
- Classification (`classification`, text): Whether the alert is a real threat. Leave empty to keep it. One of: `truePositive` (True positive (a real threat)), `informationalExpectedActivity` (Informational, expected activity), `falsePositive` (False positive (not a threat)), `unknown` (Not set).
- Determination (`determination`, text): What the investigation found. Pick one that fits the classification: Not malicious or Not enough data for a false positive; Security testing, Line-of-business application or Confirmed activity for expected activity. Leave empty to keep it. One of: `multiStagedAttack` (Multistage attack), `maliciousUserActivity` (Malicious user activity), `compromisedAccount` (Compromised account), `malware`, `phishing`, `unwantedSoftware` (Unwanted software), `apt` (Advanced persistent threat), `securityPersonnel` (Security personnel), `securityTesting` (Security testing), `lineOfBusinessApplication` (Line-of-business application), and 5 more.
- Comment (`comment`, text): A comment to add to the alert's history. Leave empty for none.

**Outputs**

- `alert` (object): A Microsoft Defender alert

**Example output**

```json
{
  "alert": {
    "actorDisplayName": "",
    "alertWebUrl": "https://security.microsoft.com/alerts/da09e47ccc-b74a-45bb-985f-8d6c077b70b6_1?tid=cfcdbe43-297b-4c6b-ac7e-8d7f6befb514",
    "assignedTo": "secadmin@contoso.com",
    "category": "Persistence",
    "classification": "truePositive",
    "comments": [
      {
        "comment": "Isolated the device and reset the user's password.",
        "createdByDisplayName": "secadmin@contoso.com",
        "createdDateTime": "2026-01-22T14:02:11.1606766Z"
      }
    ],
    "createdDateTime": "2026-01-22T12:09:22.8566667Z",
    "description": "An event consumer represents the action to take upon the firing of an event.",
    "detectionSource": "microsoftDefenderForEndpoint",
    "determination": "multiStagedAttack",
    "evidence": [
      {
        "name": "w11pro-test",
        "remediationStatus": "active",
        "type": "device",
        "verdict": "suspicious"
      },
      {
        "name": "W11PRO-TEST\\adminlocal",
        "remediationStatus": "active",
        "type": "process",
        "verdict": "suspicious"
      }
    ],
    "firstActivityDateTime": "2026-01-22T12:08:16.1404016Z",
    "id": "da09e47ccc-b74a-45bb-985f-8d6c077b70b6_1",
    "incidentId": "29",
    "incidentWebUrl": "https://security.microsoft.com/incident2/29/overview?tid=cfcdbe43-297b-4c6b-ac7e-8d7f6befb514",
    "investigationState": "unsupportedAlertType",
    "lastActivityDateTime": "2026-01-22T13:36:33.6406679Z",
    "lastUpdateDateTime": "2026-02-25T16:29:33.1Z",
    "mitreTechniques": [
      "T1546.003"
    ],
    "productName": "Microsoft Defender for Endpoint",
    "providerAlertId": "09e47ccc-b74a-45bb-985f-8d6c077b70b6_1",
    "recommendedActions": "1. Find the propagation entry point.",
    "resolvedDateTime": "",
    "serviceSource": "microsoftDefenderForEndpoint",
    "severity": "high",
    "status": "inProgress",
    "threatDisplayName": "",
    "threatFamilyName": "",
    "title": "A WMI event filter was bound to a suspicious event consumer"
  }
}
```

### Update incident

Change a Microsoft Defender incident's status, owner, classification or determination, and add a comment. Resolving an incident resolves its alerts too. Only the fields you fill in change.

**Inputs**

- Incident (`incident_id`, text, required): The incident. Pick one of the 50 most recent, or use its number from a trigger or List incidents.
- Status (`status`, text): The incident's new status. Leave empty to keep it. One of: `active`, `inProgress` (In progress), `resolved`.
- Assign to (`assigned_to`, text): The new owner's sign-in, such as ana@city.gov. Leave empty to keep the incident's owner.
- Unassign (`unassign`, true/false): Yes to remove the incident's owner. No unless chosen. Default: `false`.
- Classification (`classification`, text): Whether the incident is a real threat. Leave empty to keep it. One of: `truePositive` (True positive (a real threat)), `informationalExpectedActivity` (Informational, expected activity), `falsePositive` (False positive (not a threat)), `unknown` (Not set).
- Determination (`determination`, text): What the investigation found. Pick one that fits the classification: Not malicious or Not enough data for a false positive; Security testing, Line-of-business application or Confirmed activity for expected activity. Leave empty to keep it. One of: `multiStagedAttack` (Multistage attack), `maliciousUserActivity` (Malicious user activity), `compromisedAccount` (Compromised account), `malware`, `phishing`, `unwantedSoftware` (Unwanted software), `apt` (Advanced persistent threat), `securityPersonnel` (Security personnel), `securityTesting` (Security testing), `lineOfBusinessApplication` (Line-of-business application), and 5 more.
- Resolving comment (`resolving_comment`, text): Why the incident is resolved and classified this way. Leave empty to keep it.
- Comment (`comment`, text): A comment to add to the incident's history. Leave empty for none.

**Outputs**

- `incident` (object): A Microsoft Defender incident

**Example output**

```json
{
  "incident": {
    "alerts": [],
    "assignedTo": "secadmin@contoso.com",
    "classification": "truePositive",
    "comments": [
      {
        "comment": "Isolated the device and reset the user's password.",
        "createdByDisplayName": "secadmin@contoso.com",
        "createdDateTime": "2026-01-22T14:02:11.1606766Z"
      }
    ],
    "createdDateTime": "2026-01-22T12:09:23.1433333Z",
    "customTags": [
      "Demo"
    ],
    "description": "Microsoft observed Raspberry Robin worm activity spreading through infected USB devices.",
    "determination": "multiStagedAttack",
    "displayName": "Multi-stage incident involving Execution & Command and control on one endpoint",
    "id": "29",
    "incidentWebUrl": "https://security.microsoft.com/incident2/29/overview?tid=cfcdbe43-297b-4c6b-ac7e-8d7f6befb514",
    "lastModifiedBy": "API-App:secadmin@contoso.com",
    "lastUpdateDateTime": "2026-02-25T16:29:33.1Z",
    "priorityScore": 100,
    "redirectIncidentId": "",
    "resolvingComment": "",
    "severity": "high",
    "status": "active",
    "summary": "Defender Experts has identified malicious activity.",
    "systemTags": []
  }
}
```
