{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/microsoft-graph/json-schema/microsoft-graph-microsoft-graph-device-install-state-schema.json",
  "title": "microsoft.graph.deviceInstallState",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/microsoft-graph-deviceappmanagement-managedebook-api-openapi.yml#/components/schemas/microsoft.graph.deviceInstallState",
  "allOf": [
    {
      "$ref": "#/$defs/microsoft.graph.entity"
    },
    {
      "title": "deviceInstallState",
      "required": [
        "@odata.type"
      ],
      "type": "object",
      "properties": {
        "deviceId": {
          "type": [
            "string",
            "null"
          ],
          "description": "Device Id."
        },
        "deviceName": {
          "type": [
            "string",
            "null"
          ],
          "description": "Device name."
        },
        "errorCode": {
          "type": [
            "string",
            "null"
          ],
          "description": "The error code for install failures."
        },
        "installState": {
          "$ref": "#/$defs/microsoft.graph.installState"
        },
        "lastSyncDateTime": {
          "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 sync date and time.",
          "format": "date-time"
        },
        "osDescription": {
          "type": [
            "string",
            "null"
          ],
          "description": "OS Description."
        },
        "osVersion": {
          "type": [
            "string",
            "null"
          ],
          "description": "OS Version."
        },
        "userName": {
          "type": [
            "string",
            "null"
          ],
          "description": "Device User Name."
        },
        "@odata.type": {
          "type": "string"
        }
      },
      "description": "Contains properties for the installation state for a device."
    }
  ],
  "x-ms-discriminator-value": "#microsoft.graph.deviceInstallState",
  "$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.installState": {
      "title": "installState",
      "enum": [
        "notApplicable",
        "installed",
        "failed",
        "notInstalled",
        "uninstallFailed",
        "unknown"
      ],
      "type": "string",
      "description": "Possible values for install state.",
      "x-ms-enum": {
        "name": "installState",
        "modelAsString": false,
        "values": [
          {
            "value": "notApplicable",
            "description": "Not Applicable.",
            "name": "notApplicable"
          },
          {
            "value": "installed",
            "description": "Installed.",
            "name": "installed"
          },
          {
            "value": "failed",
            "description": "Failed.",
            "name": "failed"
          },
          {
            "value": "notInstalled",
            "description": "Not Installed.",
            "name": "notInstalled"
          },
          {
            "value": "uninstallFailed",
            "description": "Uninstall Failed.",
            "name": "uninstallFailed"
          },
          {
            "value": "unknown",
            "description": "Unknown.",
            "name": "unknown"
          }
        ]
      }
    }
  }
}