{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/microsoft-graph/json-schema/microsoft-graph-agreement-acceptance-schema.json",
  "title": "AgreementAcceptance",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/microsoft-graph-agreement-acceptances-api-openapi.yml#/components/schemas/AgreementAcceptance",
  "allOf": [
    {
      "$ref": "#/$defs/Entity"
    },
    {
      "title": "AgreementAcceptance",
      "required": [
        "@odata.type"
      ],
      "type": "object",
      "properties": {
        "agreementFileId": {
          "type": [
            "string",
            "null"
          ],
          "description": "The identifier of the agreement file accepted by the user."
        },
        "agreementId": {
          "type": [
            "string",
            "null"
          ],
          "description": "The identifier of the agreement."
        },
        "deviceDisplayName": {
          "type": [
            "string",
            "null"
          ],
          "description": "The display name of the device used for accepting the agreement."
        },
        "deviceId": {
          "type": [
            "string",
            "null"
          ],
          "description": "The unique identifier of the device used for accepting the agreement. Supports $filter (eq) and eq for null values."
        },
        "deviceOSType": {
          "type": [
            "string",
            "null"
          ],
          "description": "The operating system used to accept the agreement."
        },
        "deviceOSVersion": {
          "type": [
            "string",
            "null"
          ],
          "description": "The operating system version of the device used to accept the agreement."
        },
        "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",
            "null"
          ],
          "description": "The expiration date time of the acceptance. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time.",
          "format": "date-time"
        },
        "recordedDateTime": {
          "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 Timestamp type represents date and time information using ISO 8601 format and is always in UTC time.",
          "format": "date-time"
        },
        "state": {
          "anyOf": [
            {
              "$ref": "#/$defs/AgreementAcceptanceState"
            },
            {
              "type": [
                "object",
                "null"
              ]
            }
          ],
          "description": "The state of the agreement acceptance. The possible values are accepted, declined. Supports $filter (eq)."
        },
        "userDisplayName": {
          "type": [
            "string",
            "null"
          ],
          "description": "Display name of the user when the acceptance was recorded."
        },
        "userEmail": {
          "type": [
            "string",
            "null"
          ],
          "description": "Email of the user when the acceptance was recorded."
        },
        "userId": {
          "type": [
            "string",
            "null"
          ],
          "description": "The identifier of the user who accepted the agreement. Supports $filter (eq)."
        },
        "userPrincipalName": {
          "type": [
            "string",
            "null"
          ],
          "description": "UPN of the user when the acceptance was recorded."
        },
        "@odata.type": {
          "type": "string"
        }
      }
    }
  ],
  "x-ms-discriminator-value": "#microsoft.graph.agreementAcceptance",
  "$defs": {
    "AgreementAcceptanceState": {
      "title": "AgreementAcceptanceState",
      "type": "string",
      "enum": [
        "accepted",
        "declined"
      ],
      "description": "The state of the agreement acceptance."
    },
    "Entity": {
      "title": "Entity",
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "The unique identifier for an entity. Read-only."
        },
        "@odata.type": {
          "type": "string"
        }
      }
    }
  }
}