{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/microsoft-intune/json-schema/microsoft-intune-microsoft-graph-device-compliance-policy-schema.json",
  "title": "microsoft.graph.deviceCompliancePolicy",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/microsoft-intune-devicemanagement-devicecompliancepolicy-api-openapi.yml#/components/schemas/microsoft.graph.deviceCompliancePolicy",
  "allOf": [
    {
      "$ref": "#/$defs/microsoft.graph.entity"
    },
    {
      "title": "deviceCompliancePolicy",
      "required": [
        "@odata.type"
      ],
      "type": "object",
      "properties": {
        "createdDateTime": {
          "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",
          "description": "DateTime the object was created.",
          "format": "date-time"
        },
        "description": {
          "type": [
            "string",
            "null"
          ],
          "description": "Admin provided description of the Device Configuration."
        },
        "displayName": {
          "type": "string",
          "description": "Admin provided name of the device configuration."
        },
        "lastModifiedDateTime": {
          "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",
          "description": "DateTime the object was last modified.",
          "format": "date-time"
        },
        "version": {
          "maximum": 2147483647,
          "minimum": -2147483648,
          "type": "number",
          "description": "Version of the device configuration.",
          "format": "int32"
        },
        "assignments": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/microsoft.graph.deviceCompliancePolicyAssignment"
          },
          "description": "The collection of assignments for this compliance policy.",
          "x-ms-navigationProperty": true
        },
        "deviceSettingStateSummaries": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/microsoft.graph.settingStateDeviceSummary"
          },
          "description": "Compliance Setting State Device Summary",
          "x-ms-navigationProperty": true
        },
        "deviceStatuses": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/microsoft.graph.deviceComplianceDeviceStatus"
          },
          "description": "List of DeviceComplianceDeviceStatus.",
          "x-ms-navigationProperty": true
        },
        "deviceStatusOverview": {
          "anyOf": [
            {
              "$ref": "#/$defs/microsoft.graph.deviceComplianceDeviceOverview"
            },
            {
              "type": [
                "object",
                "null"
              ]
            }
          ],
          "description": "Device compliance devices status overview",
          "x-ms-navigationProperty": true
        },
        "scheduledActionsForRule": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/microsoft.graph.deviceComplianceScheduledActionForRule"
          },
          "description": "The list of scheduled action per rule for this compliance policy. This is a required property when creating any individual per-platform compliance policies.",
          "x-ms-navigationProperty": true
        },
        "userStatuses": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/microsoft.graph.deviceComplianceUserStatus"
          },
          "description": "List of DeviceComplianceUserStatus.",
          "x-ms-navigationProperty": true
        },
        "userStatusOverview": {
          "anyOf": [
            {
              "$ref": "#/$defs/microsoft.graph.deviceComplianceUserOverview"
            },
            {
              "type": [
                "object",
                "null"
              ]
            }
          ],
          "description": "Device compliance users status overview",
          "x-ms-navigationProperty": true
        },
        "@odata.type": {
          "type": "string"
        }
      },
      "description": "This is the base class for Compliance policy. Compliance policies are platform specific and individual per-platform compliance policies inherit from here. "
    }
  ],
  "$defs": {
    "microsoft.graph.complianceStatus": {
      "title": "complianceStatus",
      "enum": [
        "unknown",
        "notApplicable",
        "compliant",
        "remediated",
        "nonCompliant",
        "error",
        "conflict",
        "notAssigned"
      ],
      "type": "string"
    },
    "microsoft.graph.deviceAndAppManagementAssignmentTarget": {
      "title": "deviceAndAppManagementAssignmentTarget",
      "required": [
        "@odata.type"
      ],
      "type": "object",
      "properties": {
        "@odata.type": {
          "type": "string"
        }
      },
      "description": "Base type for assignment targets."
    },
    "microsoft.graph.deviceComplianceActionItem": {
      "allOf": [
        {
          "$ref": "#/$defs/microsoft.graph.entity"
        },
        {
          "title": "deviceComplianceActionItem",
          "required": [
            "@odata.type"
          ],
          "type": "object",
          "properties": {
            "actionType": {
              "$ref": "#/$defs/microsoft.graph.deviceComplianceActionType"
            },
            "gracePeriodHours": {
              "maximum": 2147483647,
              "minimum": -2147483648,
              "type": "number",
              "description": "Number of hours to wait till the action will be enforced. Valid values 0 to 8760",
              "format": "int32"
            },
            "notificationMessageCCList": {
              "type": "array",
              "items": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "description": "A list of group IDs to speicify who to CC this notification message to."
            },
            "notificationTemplateId": {
              "type": [
                "string",
                "null"
              ],
              "description": "What notification Message template to use"
            },
            "@odata.type": {
              "type": "string"
            }
          },
          "description": "Scheduled Action Configuration"
        }
      ],
      "x-ms-discriminator-value": "#microsoft.graph.deviceComplianceActionItem"
    },
    "microsoft.graph.deviceComplianceActionType": {
      "title": "deviceComplianceActionType",
      "enum": [
        "noAction",
        "notification",
        "block",
        "retire",
        "wipe",
        "removeResourceAccessProfiles",
        "pushNotification"
      ],
      "type": "string",
      "description": "Scheduled Action Type Enum",
      "x-ms-enum": {
        "name": "deviceComplianceActionType",
        "modelAsString": false,
        "values": [
          {
            "value": "noAction",
            "description": "No Action",
            "name": "noAction"
          },
          {
            "value": "notification",
            "description": "Send Notification",
            "name": "notification"
          },
          {
            "value": "block",
            "description": "Block the device in AAD",
            "name": "block"
          },
          {
            "value": "retire",
            "description": "Retire the device",
            "name": "retire"
          },
          {
            "value": "wipe",
            "description": "Wipe the device",
            "name": "wipe"
          },
          {
            "value": "removeResourceAccessProfiles",
            "description": "Remove Resource Access Profiles from the device",
            "name": "removeResourceAccessProfiles"
          },
          {
            "value": "pushNotification",
            "description": "Send push notification to device",
            "name": "pushNotification"
          }
        ]
      }
    },
    "microsoft.graph.deviceComplianceDeviceOverview": {
      "allOf": [
        {
          "$ref": "#/$defs/microsoft.graph.entity"
        },
        {
          "title": "deviceComplianceDeviceOverview",
          "required": [
            "@odata.type"
          ],
          "type": "object",
          "properties": {
            "configurationVersion": {
              "maximum": 2147483647,
              "minimum": -2147483648,
              "type": "number",
              "description": "Version of the policy for that overview",
              "format": "int32"
            },
            "errorCount": {
              "maximum": 2147483647,
              "minimum": -2147483648,
              "type": "number",
              "description": "Number of error devices",
              "format": "int32"
            },
            "failedCount": {
              "maximum": 2147483647,
              "minimum": -2147483648,
              "type": "number",
              "description": "Number of failed devices",
              "format": "int32"
            },
            "lastUpdateDateTime": {
              "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",
              "description": "Last update time",
              "format": "date-time"
            },
            "notApplicableCount": {
              "maximum": 2147483647,
              "minimum": -2147483648,
              "type": "number",
              "description": "Number of not applicable devices",
              "format": "int32"
            },
            "pendingCount": {
              "maximum": 2147483647,
              "minimum": -2147483648,
              "type": "number",
              "description": "Number of pending devices",
              "format": "int32"
            },
            "successCount": {
              "maximum": 2147483647,
              "minimum": -2147483648,
              "type": "number",
              "description": "Number of succeeded devices",
              "format": "int32"
            },
            "@odata.type": {
              "type": "string"
            }
          }
        }
      ],
      "x-ms-discriminator-value": "#microsoft.graph.deviceComplianceDeviceOverview"
    },
    "microsoft.graph.deviceComplianceDeviceStatus": {
      "allOf": [
        {
          "$ref": "#/$defs/microsoft.graph.entity"
        },
        {
          "title": "deviceComplianceDeviceStatus",
          "required": [
            "@odata.type"
          ],
          "type": "object",
          "properties": {
            "complianceGracePeriodExpirationDateTime": {
              "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",
              "description": "The DateTime when device compliance grace period expires",
              "format": "date-time"
            },
            "deviceDisplayName": {
              "type": [
                "string",
                "null"
              ],
              "description": "Device name of the DevicePolicyStatus."
            },
            "deviceModel": {
              "type": [
                "string",
                "null"
              ],
              "description": "The device model that is being reported"
            },
            "lastReportedDateTime": {
              "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",
              "description": "Last modified date time of the policy report.",
              "format": "date-time"
            },
            "status": {
              "$ref": "#/$defs/microsoft.graph.complianceStatus"
            },
            "userName": {
              "type": [
                "string",
                "null"
              ],
              "description": "The User Name that is being reported"
            },
            "userPrincipalName": {
              "type": [
                "string",
                "null"
              ],
              "description": "UserPrincipalName."
            },
            "@odata.type": {
              "type": "string"
            }
          }
        }
      ],
      "x-ms-discriminator-value": "#microsoft.graph.deviceComplianceDeviceStatus"
    },
    "microsoft.graph.deviceCompliancePolicyAssignment": {
      "allOf": [
        {
          "$ref": "#/$defs/microsoft.graph.entity"
        },
        {
          "title": "deviceCompliancePolicyAssignment",
          "required": [
            "@odata.type"
          ],
          "type": "object",
          "properties": {
            "target": {
              "anyOf": [
                {
                  "$ref": "#/$defs/microsoft.graph.deviceAndAppManagementAssignmentTarget"
                },
                {
                  "type": [
                    "object",
                    "null"
                  ]
                }
              ],
              "description": "Target for the compliance policy assignment."
            },
            "@odata.type": {
              "type": "string"
            }
          },
          "description": "Device compliance policy assignment."
        }
      ],
      "x-ms-discriminator-value": "#microsoft.graph.deviceCompliancePolicyAssignment"
    },
    "microsoft.graph.deviceComplianceScheduledActionForRule": {
      "allOf": [
        {
          "$ref": "#/$defs/microsoft.graph.entity"
        },
        {
          "title": "deviceComplianceScheduledActionForRule",
          "required": [
            "@odata.type"
          ],
          "type": "object",
          "properties": {
            "ruleName": {
              "type": [
                "string",
                "null"
              ],
              "description": "Name of the rule which this scheduled action applies to. Currently scheduled actions are created per policy instead of per rule, thus RuleName is always set to default value PasswordRequired."
            },
            "scheduledActionConfigurations": {
              "type": "array",
              "items": {
                "$ref": "#/$defs/microsoft.graph.deviceComplianceActionItem"
              },
              "description": "The list of scheduled action configurations for this compliance policy. Compliance policy must have one and only one block scheduled action.",
              "x-ms-navigationProperty": true
            },
            "@odata.type": {
              "type": "string"
            }
          },
          "description": "Scheduled Action for Rule"
        }
      ],
      "x-ms-discriminator-value": "#microsoft.graph.deviceComplianceScheduledActionForRule"
    },
    "microsoft.graph.deviceComplianceUserOverview": {
      "allOf": [
        {
          "$ref": "#/$defs/microsoft.graph.entity"
        },
        {
          "title": "deviceComplianceUserOverview",
          "required": [
            "@odata.type"
          ],
          "type": "object",
          "properties": {
            "configurationVersion": {
              "maximum": 2147483647,
              "minimum": -2147483648,
              "type": "number",
              "description": "Version of the policy for that overview",
              "format": "int32"
            },
            "errorCount": {
              "maximum": 2147483647,
              "minimum": -2147483648,
              "type": "number",
              "description": "Number of error Users",
              "format": "int32"
            },
            "failedCount": {
              "maximum": 2147483647,
              "minimum": -2147483648,
              "type": "number",
              "description": "Number of failed Users",
              "format": "int32"
            },
            "lastUpdateDateTime": {
              "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",
              "description": "Last update time",
              "format": "date-time"
            },
            "notApplicableCount": {
              "maximum": 2147483647,
              "minimum": -2147483648,
              "type": "number",
              "description": "Number of not applicable users",
              "format": "int32"
            },
            "pendingCount": {
              "maximum": 2147483647,
              "minimum": -2147483648,
              "type": "number",
              "description": "Number of pending Users",
              "format": "int32"
            },
            "successCount": {
              "maximum": 2147483647,
              "minimum": -2147483648,
              "type": "number",
              "description": "Number of succeeded Users",
              "format": "int32"
            },
            "@odata.type": {
              "type": "string"
            }
          }
        }
      ],
      "x-ms-discriminator-value": "#microsoft.graph.deviceComplianceUserOverview"
    },
    "microsoft.graph.deviceComplianceUserStatus": {
      "allOf": [
        {
          "$ref": "#/$defs/microsoft.graph.entity"
        },
        {
          "title": "deviceComplianceUserStatus",
          "required": [
            "@odata.type"
          ],
          "type": "object",
          "properties": {
            "devicesCount": {
              "maximum": 2147483647,
              "minimum": -2147483648,
              "type": "number",
              "description": "Devices count for that user.",
              "format": "int32"
            },
            "lastReportedDateTime": {
              "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",
              "description": "Last modified date time of the policy report.",
              "format": "date-time"
            },
            "status": {
              "$ref": "#/$defs/microsoft.graph.complianceStatus"
            },
            "userDisplayName": {
              "type": [
                "string",
                "null"
              ],
              "description": "User name of the DevicePolicyStatus."
            },
            "userPrincipalName": {
              "type": [
                "string",
                "null"
              ],
              "description": "UserPrincipalName."
            },
            "@odata.type": {
              "type": "string"
            }
          }
        }
      ],
      "x-ms-discriminator-value": "#microsoft.graph.deviceComplianceUserStatus"
    },
    "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.settingStateDeviceSummary": {
      "allOf": [
        {
          "$ref": "#/$defs/microsoft.graph.entity"
        },
        {
          "title": "settingStateDeviceSummary",
          "required": [
            "@odata.type"
          ],
          "type": "object",
          "properties": {
            "compliantDeviceCount": {
              "maximum": 2147483647,
              "minimum": -2147483648,
              "type": "number",
              "description": "Device Compliant count for the setting",
              "format": "int32"
            },
            "conflictDeviceCount": {
              "maximum": 2147483647,
              "minimum": -2147483648,
              "type": "number",
              "description": "Device conflict error count for the setting",
              "format": "int32"
            },
            "errorDeviceCount": {
              "maximum": 2147483647,
              "minimum": -2147483648,
              "type": "number",
              "description": "Device error count for the setting",
              "format": "int32"
            },
            "instancePath": {
              "type": [
                "string",
                "null"
              ],
              "description": "Name of the InstancePath for the setting"
            },
            "nonCompliantDeviceCount": {
              "maximum": 2147483647,
              "minimum": -2147483648,
              "type": "number",
              "description": "Device NonCompliant count for the setting",
              "format": "int32"
            },
            "notApplicableDeviceCount": {
              "maximum": 2147483647,
              "minimum": -2147483648,
              "type": "number",
              "description": "Device Not Applicable count for the setting",
              "format": "int32"
            },
            "remediatedDeviceCount": {
              "maximum": 2147483647,
              "minimum": -2147483648,
              "type": "number",
              "description": "Device Compliant count for the setting",
              "format": "int32"
            },
            "settingName": {
              "type": [
                "string",
                "null"
              ],
              "description": "Name of the setting"
            },
            "unknownDeviceCount": {
              "maximum": 2147483647,
              "minimum": -2147483648,
              "type": "number",
              "description": "Device Unkown count for the setting",
              "format": "int32"
            },
            "@odata.type": {
              "type": "string"
            }
          },
          "description": "Device Compilance Policy and Configuration for a Setting State summary"
        }
      ],
      "x-ms-discriminator-value": "#microsoft.graph.settingStateDeviceSummary"
    }
  }
}