{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/azure-ad/json-schema/azure-ad-microsoft-graph-access-review-history-definition-schema.json",
  "title": "microsoft.graph.accessReviewHistoryDefinition",
  "x-generated": "2026-11-05",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/azure-ad-identitygovernance-accessreviewset-api-openapi.yml#/components/schemas/microsoft.graph.accessReviewHistoryDefinition",
  "allOf": [
    {
      "$ref": "#/$defs/microsoft.graph.entity"
    },
    {
      "title": "accessReviewHistoryDefinition",
      "type": "object",
      "properties": {
        "createdBy": {
          "$ref": "#/$defs/microsoft.graph.userIdentity"
        },
        "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": "Timestamp when the access review definition was created.",
          "format": "date-time"
        },
        "decisions": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/microsoft.graph.accessReviewHistoryDecisionFilter"
          },
          "description": "Determines which review decisions will be included in the fetched review history data if specified. Optional on create. All decisions are included by default if no decisions are provided on create. The possible values are: approve, deny, dontKnow, notReviewed, and notNotified."
        },
        "displayName": {
          "type": "string",
          "description": "Name for the access review history data collection. Required."
        },
        "reviewHistoryPeriodEndDateTime": {
          "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": "A timestamp. Reviews ending on or before this date will be included in the fetched history data. Only required if scheduleSettings isn't defined.",
          "format": "date-time"
        },
        "reviewHistoryPeriodStartDateTime": {
          "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": "A timestamp. Reviews starting on or before this date will be included in the fetched history data. Only required if scheduleSettings isn't defined.",
          "format": "date-time"
        },
        "scheduleSettings": {
          "$ref": "#/$defs/microsoft.graph.accessReviewHistoryScheduleSettings"
        },
        "scopes": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/microsoft.graph.accessReviewScope"
          },
          "description": "Used to scope what reviews are included in the fetched history data. Fetches reviews whose scope matches with this provided scope. Required."
        },
        "status": {
          "$ref": "#/$defs/microsoft.graph.accessReviewHistoryStatus"
        },
        "instances": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/microsoft.graph.accessReviewHistoryInstance"
          },
          "description": "If the accessReviewHistoryDefinition is a recurring definition, instances represent each recurrence. A definition that doesn't recur will have exactly one instance.",
          "x-ms-navigationProperty": true
        }
      },
      "additionalProperties": {
        "type": "object"
      }
    }
  ],
  "$defs": {
    "microsoft.graph.accessReviewHistoryDecisionFilter": {
      "title": "accessReviewHistoryDecisionFilter",
      "enum": [
        "approve",
        "deny",
        "notReviewed",
        "dontKnow",
        "notNotified",
        "unknownFutureValue"
      ],
      "type": "string"
    },
    "microsoft.graph.accessReviewHistoryInstance": {
      "allOf": [
        {
          "$ref": "#/$defs/microsoft.graph.entity"
        },
        {
          "title": "accessReviewHistoryInstance",
          "type": "object",
          "properties": {
            "downloadUri": {
              "type": [
                "string",
                "null"
              ],
              "description": "Uri that can be used to retrieve review history data. This URI will be active for 24 hours after being generated. Required."
            },
            "expirationDateTime": {
              "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": "Timestamp when this instance and associated data expires and the history is deleted. Required.",
              "format": "date-time"
            },
            "fulfilledDateTime": {
              "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": "Timestamp when all of the available data for this instance was collected and is set after this instance's status is set to done. Required.",
              "format": "date-time"
            },
            "reviewHistoryPeriodEndDateTime": {
              "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": "Timestamp reviews ending on or before this date will be included in the fetched history data.",
              "format": "date-time"
            },
            "reviewHistoryPeriodStartDateTime": {
              "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": "Timestamp reviews starting on or after this date will be included in the fetched history data.",
              "format": "date-time"
            },
            "runDateTime": {
              "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": "Timestamp when the instance's history data is scheduled to be generated.",
              "format": "date-time"
            },
            "status": {
              "$ref": "#/$defs/microsoft.graph.accessReviewHistoryStatus"
            }
          },
          "additionalProperties": {
            "type": "object"
          }
        }
      ]
    },
    "microsoft.graph.accessReviewHistoryScheduleSettings": {
      "title": "accessReviewHistoryScheduleSettings",
      "type": "object",
      "properties": {
        "recurrence": {
          "$ref": "#/$defs/microsoft.graph.patternedRecurrence"
        },
        "reportRange": {
          "type": "string",
          "description": "A duration string in ISO 8601 duration format specifying the lookback period of the generated review history data. For example, if a history definition is scheduled to run on the first of every month, the reportRange is P1M. In this case, on the first of every month, access review history data is collected containing only the previous month's review data. Note: Only years, months, and days ISO 8601 properties are supported. Required."
        }
      },
      "additionalProperties": {
        "type": "object"
      }
    },
    "microsoft.graph.accessReviewHistoryStatus": {
      "title": "accessReviewHistoryStatus",
      "enum": [
        "done",
        "inprogress",
        "error",
        "requested",
        "unknownFutureValue"
      ],
      "type": "string"
    },
    "microsoft.graph.accessReviewScope": {
      "title": "accessReviewScope",
      "type": "object",
      "additionalProperties": {
        "type": "object"
      }
    },
    "microsoft.graph.dayOfWeek": {
      "title": "dayOfWeek",
      "enum": [
        "sunday",
        "monday",
        "tuesday",
        "wednesday",
        "thursday",
        "friday",
        "saturday"
      ],
      "type": "string"
    },
    "microsoft.graph.entity": {
      "title": "entity",
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "The unique identifier for an entity. Read-only."
        }
      },
      "additionalProperties": {
        "type": "object"
      }
    },
    "microsoft.graph.identity": {
      "title": "identity",
      "type": "object",
      "properties": {
        "displayName": {
          "type": [
            "string",
            "null"
          ],
          "description": "The display name of the identity.For drive items, the display name might not always be available or up to date. For example, if a user changes their display name the API might show the new value in a future response, but the items associated with the user don't show up as changed when using delta."
        },
        "id": {
          "type": [
            "string",
            "null"
          ],
          "description": "Unique identifier for the identity or actor. For example, in the access reviews decisions API, this property might record the id of the principal, that is, the group, user, or application that's subject to review."
        }
      },
      "additionalProperties": {
        "type": "object"
      }
    },
    "microsoft.graph.patternedRecurrence": {
      "title": "patternedRecurrence",
      "type": "object",
      "properties": {
        "pattern": {
          "$ref": "#/$defs/microsoft.graph.recurrencePattern"
        },
        "range": {
          "$ref": "#/$defs/microsoft.graph.recurrenceRange"
        }
      },
      "additionalProperties": {
        "type": "object"
      }
    },
    "microsoft.graph.recurrencePattern": {
      "title": "recurrencePattern",
      "type": "object",
      "properties": {
        "dayOfMonth": {
          "maximum": 2147483647,
          "minimum": -2147483648,
          "type": "number",
          "description": "The day of the month on which the event occurs. Required if type is absoluteMonthly or absoluteYearly.",
          "format": "int32"
        },
        "daysOfWeek": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/microsoft.graph.dayOfWeek"
          },
          "description": "A collection of the days of the week on which the event occurs. The possible values are: sunday, monday, tuesday, wednesday, thursday, friday, saturday. If type is relativeMonthly or relativeYearly, and daysOfWeek specifies more than one day, the event falls on the first day that satisfies the pattern.  Required if type is weekly, relativeMonthly, or relativeYearly."
        },
        "firstDayOfWeek": {
          "$ref": "#/$defs/microsoft.graph.dayOfWeek"
        },
        "index": {
          "$ref": "#/$defs/microsoft.graph.weekIndex"
        },
        "interval": {
          "maximum": 2147483647,
          "minimum": -2147483648,
          "type": "number",
          "description": "The number of units between occurrences, where units can be in days, weeks, months, or years, depending on the type. Required.",
          "format": "int32"
        },
        "month": {
          "maximum": 2147483647,
          "minimum": -2147483648,
          "type": "number",
          "description": "The month in which the event occurs.  This is a number from 1 to 12.",
          "format": "int32"
        },
        "type": {
          "$ref": "#/$defs/microsoft.graph.recurrencePatternType"
        }
      },
      "additionalProperties": {
        "type": "object"
      }
    },
    "microsoft.graph.recurrencePatternType": {
      "title": "recurrencePatternType",
      "enum": [
        "daily",
        "weekly",
        "absoluteMonthly",
        "relativeMonthly",
        "absoluteYearly",
        "relativeYearly"
      ],
      "type": "string"
    },
    "microsoft.graph.recurrenceRange": {
      "title": "recurrenceRange",
      "type": "object",
      "properties": {
        "endDate": {
          "pattern": "^[0-9]{4,}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])$",
          "type": [
            "string",
            "null"
          ],
          "description": "The date to stop applying the recurrence pattern. Depending on the recurrence pattern of the event, the last occurrence of the meeting may not be this date. Required if type is endDate.",
          "format": "date"
        },
        "numberOfOccurrences": {
          "maximum": 2147483647,
          "minimum": -2147483648,
          "type": "number",
          "description": "The number of times to repeat the event. Required and must be positive if type is numbered.",
          "format": "int32"
        },
        "recurrenceTimeZone": {
          "type": [
            "string",
            "null"
          ],
          "description": "Time zone for the startDate and endDate properties. Optional. If not specified, the time zone of the event is used."
        },
        "startDate": {
          "pattern": "^[0-9]{4,}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])$",
          "type": [
            "string",
            "null"
          ],
          "description": "The date to start applying the recurrence pattern. The first occurrence of the meeting may be this date or later, depending on the recurrence pattern of the event. Must be the same value as the start property of the recurring event. Required.",
          "format": "date"
        },
        "type": {
          "$ref": "#/$defs/microsoft.graph.recurrenceRangeType"
        }
      },
      "additionalProperties": {
        "type": "object"
      }
    },
    "microsoft.graph.recurrenceRangeType": {
      "title": "recurrenceRangeType",
      "enum": [
        "endDate",
        "noEnd",
        "numbered"
      ],
      "type": "string"
    },
    "microsoft.graph.userIdentity": {
      "allOf": [
        {
          "$ref": "#/$defs/microsoft.graph.identity"
        },
        {
          "title": "userIdentity",
          "type": "object",
          "properties": {
            "ipAddress": {
              "type": [
                "string",
                "null"
              ],
              "description": "Indicates the client IP address associated with the user performing the activity (audit log only)."
            },
            "userPrincipalName": {
              "type": [
                "string",
                "null"
              ],
              "description": "The userPrincipalName attribute of the user."
            }
          },
          "additionalProperties": {
            "type": "object"
          }
        }
      ]
    },
    "microsoft.graph.weekIndex": {
      "title": "weekIndex",
      "enum": [
        "first",
        "second",
        "third",
        "fourth",
        "last"
      ],
      "type": "string"
    }
  }
}