{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/microsoft-entra/json-schema/microsoft-entra-microsoft-graph-access-review-history-definition-schema.json",
  "title": "microsoft.graph.accessReviewHistoryDefinition",
  "x-generated": "2026-11-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/microsoft-entra-identitygovernance-accessreviewset-api-openapi.yml#/components/schemas/microsoft.graph.accessReviewHistoryDefinition",
  "allOf": [
    {
      "$ref": "#/$defs/microsoft.graph.entity"
    },
    {
      "title": "accessReviewHistoryDefinition",
      "required": [
        "@odata.type"
      ],
      "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": {
            "anyOf": [
              {
                "$ref": "#/$defs/microsoft.graph.accessReviewHistoryDecisionFilter"
              },
              {
                "type": [
                  "object",
                  "null"
                ]
              }
            ]
          },
          "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": {
          "anyOf": [
            {
              "$ref": "#/$defs/microsoft.graph.accessReviewHistoryScheduleSettings"
            },
            {
              "type": [
                "object",
                "null"
              ]
            }
          ],
          "description": "The settings for a recurring access review history definition series. Only required if reviewHistoryPeriodStartDateTime or reviewHistoryPeriodEndDateTime aren't defined. Not supported yet."
        },
        "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": {
          "anyOf": [
            {
              "$ref": "#/$defs/microsoft.graph.accessReviewHistoryStatus"
            },
            {
              "type": [
                "object",
                "null"
              ]
            }
          ],
          "description": "Represents the status of the review history data collection. The possible values are: done, inProgress, error, requested, unknownFutureValue."
        },
        "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
        },
        "@odata.type": {
          "type": "string"
        }
      }
    }
  ],
  "x-ms-discriminator-value": "#microsoft.graph.accessReviewHistoryDefinition",
  "$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",
          "required": [
            "@odata.type"
          ],
          "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": {
              "anyOf": [
                {
                  "$ref": "#/$defs/microsoft.graph.accessReviewHistoryStatus"
                },
                {
                  "type": [
                    "object",
                    "null"
                  ]
                }
              ],
              "description": "Represents the status of the review history data collection. The possible values are: done, inProgress, error, requested, unknownFutureValue. Once the status has been marked as done, a link can be generated to retrieve the instance's data by calling generateDownloadUri method."
            },
            "@odata.type": {
              "type": "string"
            }
          }
        }
      ],
      "x-ms-discriminator-value": "#microsoft.graph.accessReviewHistoryInstance"
    },
    "microsoft.graph.accessReviewHistoryScheduleSettings": {
      "title": "accessReviewHistoryScheduleSettings",
      "required": [
        "@odata.type"
      ],
      "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."
        },
        "@odata.type": {
          "type": "string"
        }
      }
    },
    "microsoft.graph.accessReviewHistoryStatus": {
      "title": "accessReviewHistoryStatus",
      "enum": [
        "done",
        "inprogress",
        "error",
        "requested",
        "unknownFutureValue"
      ],
      "type": "string"
    },
    "microsoft.graph.accessReviewScope": {
      "title": "accessReviewScope",
      "required": [
        "@odata.type"
      ],
      "type": "object",
      "properties": {
        "@odata.type": {
          "type": "string"
        }
      }
    },
    "microsoft.graph.dayOfWeek": {
      "title": "dayOfWeek",
      "enum": [
        "sunday",
        "monday",
        "tuesday",
        "wednesday",
        "thursday",
        "friday",
        "saturday"
      ],
      "type": "string"
    },
    "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.identity": {
      "title": "identity",
      "required": [
        "@odata.type"
      ],
      "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."
        },
        "@odata.type": {
          "type": "string"
        }
      }
    },
    "microsoft.graph.patternedRecurrence": {
      "title": "patternedRecurrence",
      "required": [
        "@odata.type"
      ],
      "type": "object",
      "properties": {
        "pattern": {
          "anyOf": [
            {
              "$ref": "#/$defs/microsoft.graph.recurrencePattern"
            },
            {
              "type": [
                "object",
                "null"
              ]
            }
          ],
          "description": "The frequency of an event.  For access reviews: Do not specify this property for a one-time access review.  Only interval, dayOfMonth, and type (weekly, absoluteMonthly) properties of recurrencePattern are supported."
        },
        "range": {
          "anyOf": [
            {
              "$ref": "#/$defs/microsoft.graph.recurrenceRange"
            },
            {
              "type": [
                "object",
                "null"
              ]
            }
          ],
          "description": "The duration of an event."
        },
        "@odata.type": {
          "type": "string"
        }
      }
    },
    "microsoft.graph.recurrencePattern": {
      "title": "recurrencePattern",
      "required": [
        "@odata.type"
      ],
      "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": {
            "anyOf": [
              {
                "$ref": "#/$defs/microsoft.graph.dayOfWeek"
              },
              {
                "type": [
                  "object",
                  "null"
                ]
              }
            ]
          },
          "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": {
          "anyOf": [
            {
              "$ref": "#/$defs/microsoft.graph.dayOfWeek"
            },
            {
              "type": [
                "object",
                "null"
              ]
            }
          ],
          "description": "The first day of the week. The possible values are: sunday, monday, tuesday, wednesday, thursday, friday, saturday. Default is sunday. Required if type is weekly."
        },
        "index": {
          "anyOf": [
            {
              "$ref": "#/$defs/microsoft.graph.weekIndex"
            },
            {
              "type": [
                "object",
                "null"
              ]
            }
          ],
          "description": "Specifies on which instance of the allowed days specified in daysOfWeek the event occurs, counted from the first instance in the month. The possible values are: first, second, third, fourth, last. Default is first. Optional and used if type is relativeMonthly or relativeYearly."
        },
        "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": {
          "anyOf": [
            {
              "$ref": "#/$defs/microsoft.graph.recurrencePatternType"
            },
            {
              "type": [
                "object",
                "null"
              ]
            }
          ],
          "description": "The recurrence pattern type: daily, weekly, absoluteMonthly, relativeMonthly, absoluteYearly, relativeYearly. Required. For more information, see values of type property."
        },
        "@odata.type": {
          "type": "string"
        }
      }
    },
    "microsoft.graph.recurrencePatternType": {
      "title": "recurrencePatternType",
      "enum": [
        "daily",
        "weekly",
        "absoluteMonthly",
        "relativeMonthly",
        "absoluteYearly",
        "relativeYearly"
      ],
      "type": "string"
    },
    "microsoft.graph.recurrenceRange": {
      "title": "recurrenceRange",
      "required": [
        "@odata.type"
      ],
      "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": {
          "anyOf": [
            {
              "$ref": "#/$defs/microsoft.graph.recurrenceRangeType"
            },
            {
              "type": [
                "object",
                "null"
              ]
            }
          ],
          "description": "The recurrence range. The possible values are: endDate, noEnd, numbered. Required."
        },
        "@odata.type": {
          "type": "string"
        }
      }
    },
    "microsoft.graph.recurrenceRangeType": {
      "title": "recurrenceRangeType",
      "enum": [
        "endDate",
        "noEnd",
        "numbered"
      ],
      "type": "string"
    },
    "microsoft.graph.userIdentity": {
      "allOf": [
        {
          "$ref": "#/$defs/microsoft.graph.identity"
        },
        {
          "title": "userIdentity",
          "required": [
            "@odata.type"
          ],
          "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."
            },
            "@odata.type": {
              "type": "string",
              "default": "#microsoft.graph.userIdentity"
            }
          }
        }
      ],
      "x-ms-discriminator-value": "#microsoft.graph.userIdentity"
    },
    "microsoft.graph.weekIndex": {
      "title": "weekIndex",
      "enum": [
        "first",
        "second",
        "third",
        "fourth",
        "last"
      ],
      "type": "string"
    }
  }
}