{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/azure-ad/json-schema/azure-ad-microsoft-graph-user-consent-request-schema.json",
  "title": "microsoft.graph.userConsentRequest",
  "x-generated": "2026-11-05",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/azure-ad-identitygovernance-appconsentapprovalroute-api-openapi.yml#/components/schemas/microsoft.graph.userConsentRequest",
  "allOf": [
    {
      "$ref": "#/$defs/microsoft.graph.request"
    },
    {
      "title": "userConsentRequest",
      "type": "object",
      "properties": {
        "reason": {
          "type": [
            "string",
            "null"
          ],
          "description": "The user's justification for requiring access to the app. Supports $filter (eq only) and $orderby."
        },
        "approval": {
          "$ref": "#/$defs/microsoft.graph.approval"
        }
      },
      "additionalProperties": {
        "type": "object"
      }
    }
  ],
  "$defs": {
    "microsoft.graph.approval": {
      "allOf": [
        {
          "$ref": "#/$defs/microsoft.graph.entity"
        },
        {
          "title": "approval",
          "type": "object",
          "properties": {
            "stages": {
              "type": "array",
              "items": {
                "$ref": "#/$defs/microsoft.graph.approvalStage"
              },
              "description": "A collection of stages in the approval decision.",
              "x-ms-navigationProperty": true
            }
          },
          "additionalProperties": {
            "type": "object"
          }
        }
      ]
    },
    "microsoft.graph.approvalStage": {
      "allOf": [
        {
          "$ref": "#/$defs/microsoft.graph.entity"
        },
        {
          "title": "approvalStage",
          "type": "object",
          "properties": {
            "assignedToMe": {
              "type": [
                "boolean",
                "null"
              ],
              "description": "Indicates whether the stage is assigned to the calling user to review. Read-only."
            },
            "displayName": {
              "type": [
                "string",
                "null"
              ],
              "description": "The label provided by the policy creator to identify an approval stage. Read-only."
            },
            "justification": {
              "type": [
                "string",
                "null"
              ],
              "description": "The justification associated with the approval stage decision."
            },
            "reviewedBy": {
              "$ref": "#/$defs/microsoft.graph.identity"
            },
            "reviewedDateTime": {
              "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 date and time when a decision was recorded. The date and time information uses ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Read-only.",
              "format": "date-time"
            },
            "reviewResult": {
              "type": [
                "string",
                "null"
              ],
              "description": "The result of this approval record. Possible values include: NotReviewed, Approved, Denied."
            },
            "status": {
              "type": [
                "string",
                "null"
              ],
              "description": "The stage status. Possible values: InProgress, Initializing, Completed, Expired. Read-only."
            }
          },
          "additionalProperties": {
            "type": "object"
          }
        }
      ]
    },
    "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.identitySet": {
      "title": "identitySet",
      "type": "object",
      "properties": {
        "application": {
          "$ref": "#/$defs/microsoft.graph.identity"
        },
        "device": {
          "$ref": "#/$defs/microsoft.graph.identity"
        },
        "user": {
          "$ref": "#/$defs/microsoft.graph.identity"
        }
      },
      "additionalProperties": {
        "type": "object"
      }
    },
    "microsoft.graph.request": {
      "allOf": [
        {
          "$ref": "#/$defs/microsoft.graph.entity"
        },
        {
          "title": "request",
          "type": "object",
          "properties": {
            "approvalId": {
              "type": [
                "string",
                "null"
              ],
              "description": "The identifier of the approval of the request."
            },
            "completedDateTime": {
              "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 request completion date time.",
              "format": "date-time"
            },
            "createdBy": {
              "$ref": "#/$defs/microsoft.graph.identitySet"
            },
            "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",
                "null"
              ],
              "description": "The request creation date time.",
              "format": "date-time"
            },
            "customData": {
              "type": [
                "string",
                "null"
              ],
              "description": "Free text field to define any custom data for the request. Not used."
            },
            "status": {
              "type": "string",
              "description": "The status of the request. Not nullable. The possible values are: Canceled, Denied, Failed, Granted, PendingAdminDecision, PendingApproval, PendingProvisioning, PendingScheduleCreation, Provisioned, Revoked, and ScheduleCreated. Not nullable."
            }
          },
          "additionalProperties": {
            "type": "object"
          }
        }
      ]
    }
  }
}