{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/microsoft-graph/json-schema/microsoft-graph-microsoft-graph-malware-state-for-windows-device-schema.json",
  "title": "microsoft.graph.malwareStateForWindowsDevice",
  "x-generated": "2026-11-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/microsoft-graph-devicemanagement-windowsmalwareinformation-api-openapi.yml#/components/schemas/microsoft.graph.malwareStateForWindowsDevice",
  "allOf": [
    {
      "$ref": "#/$defs/microsoft.graph.entity"
    },
    {
      "title": "malwareStateForWindowsDevice",
      "required": [
        "@odata.type"
      ],
      "type": "object",
      "properties": {
        "detectionCount": {
          "maximum": 2147483647,
          "minimum": -2147483648,
          "type": [
            "number",
            "null"
          ],
          "description": "Indicates the number of times the malware is detected",
          "format": "int32"
        },
        "deviceName": {
          "type": [
            "string",
            "null"
          ],
          "description": "Indicates the name of the device being evaluated for malware state"
        },
        "executionState": {
          "anyOf": [
            {
              "$ref": "#/$defs/microsoft.graph.windowsMalwareExecutionState"
            },
            {
              "type": [
                "object",
                "null"
              ]
            }
          ],
          "description": "Indicates execution status of the malware. The possible values are: unknown, blocked, allowed, running, notRunning. Defaults to unknown. The possible values are: unknown, blocked, allowed, running, notRunning."
        },
        "initialDetectionDateTime": {
          "pattern": "^[0-9]{4,}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]([.][0-9]{1,12})?(Z|[+-][0-9][0-9]:[0-9][0-9])$",
          "type": [
            "string",
            "null"
          ],
          "description": "Initial detection datetime of the malware",
          "format": "date-time"
        },
        "lastStateChangeDateTime": {
          "pattern": "^[0-9]{4,}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]([.][0-9]{1,12})?(Z|[+-][0-9][0-9]:[0-9][0-9])$",
          "type": [
            "string",
            "null"
          ],
          "description": "The last time this particular threat was changed",
          "format": "date-time"
        },
        "threatState": {
          "anyOf": [
            {
              "$ref": "#/$defs/microsoft.graph.windowsMalwareThreatState"
            },
            {
              "type": [
                "object",
                "null"
              ]
            }
          ],
          "description": "Indicates threat status of the malware. The possible values are: active, actionFailed, manualStepsRequired, fullScanRequired, rebootRequired, remediatedWithNonCriticalFailures, quarantined, removed, cleaned, allowed, noStatusCleared. defaults to noStatusCleared. The possible values are: active, actionFailed, manualStepsRequired, fullScanRequired, rebootRequired, remediatedWithNonCriticalFailures, quarantined, removed, cleaned, allowed, noStatusCleared."
        },
        "@odata.type": {
          "type": "string"
        }
      },
      "description": "Malware state for a windows device"
    }
  ],
  "x-ms-discriminator-value": "#microsoft.graph.malwareStateForWindowsDevice",
  "$defs": {
    "microsoft.graph.entity": {
      "title": "entity",
      "required": [
        "@odata.type"
      ],
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "The unique identifier for an entity. Read-only."
        },
        "@odata.type": {
          "type": "string"
        }
      }
    },
    "microsoft.graph.windowsMalwareExecutionState": {
      "title": "windowsMalwareExecutionState",
      "enum": [
        "unknown",
        "blocked",
        "allowed",
        "running",
        "notRunning"
      ],
      "type": "string",
      "description": "Malware execution status",
      "x-ms-enum": {
        "name": "windowsMalwareExecutionState",
        "modelAsString": false,
        "values": [
          {
            "value": "unknown",
            "description": "Unknown",
            "name": "unknown"
          },
          {
            "value": "blocked",
            "description": "Blocked",
            "name": "blocked"
          },
          {
            "value": "allowed",
            "description": "Allowed",
            "name": "allowed"
          },
          {
            "value": "running",
            "description": "Running",
            "name": "running"
          },
          {
            "value": "notRunning",
            "description": "Not running",
            "name": "notRunning"
          }
        ]
      }
    },
    "microsoft.graph.windowsMalwareThreatState": {
      "title": "windowsMalwareThreatState",
      "enum": [
        "active",
        "actionFailed",
        "manualStepsRequired",
        "fullScanRequired",
        "rebootRequired",
        "remediatedWithNonCriticalFailures",
        "quarantined",
        "removed",
        "cleaned",
        "allowed",
        "noStatusCleared"
      ],
      "type": "string",
      "description": "Malware threat status",
      "x-ms-enum": {
        "name": "windowsMalwareThreatState",
        "modelAsString": false,
        "values": [
          {
            "value": "active",
            "description": "Active",
            "name": "active"
          },
          {
            "value": "actionFailed",
            "description": "Action failed",
            "name": "actionFailed"
          },
          {
            "value": "manualStepsRequired",
            "description": "Manual steps required",
            "name": "manualStepsRequired"
          },
          {
            "value": "fullScanRequired",
            "description": "Full scan required",
            "name": "fullScanRequired"
          },
          {
            "value": "rebootRequired",
            "description": "Reboot required",
            "name": "rebootRequired"
          },
          {
            "value": "remediatedWithNonCriticalFailures",
            "description": "Remediated with non critical failures ",
            "name": "remediatedWithNonCriticalFailures"
          },
          {
            "value": "quarantined",
            "description": "Quarantined",
            "name": "quarantined"
          },
          {
            "value": "removed",
            "description": "Removed",
            "name": "removed"
          },
          {
            "value": "cleaned",
            "description": "Cleaned",
            "name": "cleaned"
          },
          {
            "value": "allowed",
            "description": "Allowed",
            "name": "allowed"
          },
          {
            "value": "noStatusCleared",
            "description": "No status cleared",
            "name": "noStatusCleared"
          }
        ]
      }
    }
  }
}