{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/azure-ad/json-schema/azure-ad-microsoft-graph-user-data-security-and-governance-schema.json",
  "title": "microsoft.graph.userDataSecurityAndGovernance",
  "x-generated": "2026-11-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/azure-ad-users-userdatasecurityandgovernance-api-openapi.yml#/components/schemas/microsoft.graph.userDataSecurityAndGovernance",
  "allOf": [
    {
      "$ref": "#/$defs/microsoft.graph.dataSecurityAndGovernance"
    },
    {
      "title": "userDataSecurityAndGovernance",
      "required": [
        "@odata.type"
      ],
      "type": "object",
      "properties": {
        "activities": {
          "anyOf": [
            {
              "$ref": "#/$defs/microsoft.graph.activitiesContainer"
            },
            {
              "type": [
                "object",
                "null"
              ]
            }
          ],
          "description": "Container for activity logs (content processing and audit) related to this user. ContainsTarget: true.",
          "x-ms-navigationProperty": true
        },
        "protectionScopes": {
          "anyOf": [
            {
              "$ref": "#/$defs/microsoft.graph.userProtectionScopeContainer"
            },
            {
              "type": [
                "object",
                "null"
              ]
            }
          ],
          "x-ms-navigationProperty": true
        },
        "@odata.type": {
          "type": "string",
          "default": "#microsoft.graph.userDataSecurityAndGovernance"
        }
      }
    }
  ],
  "x-ms-discriminator-value": "#microsoft.graph.userDataSecurityAndGovernance",
  "$defs": {
    "microsoft.graph.activitiesContainer": {
      "allOf": [
        {
          "$ref": "#/$defs/microsoft.graph.entity"
        },
        {
          "title": "activitiesContainer",
          "required": [
            "@odata.type"
          ],
          "type": "object",
          "properties": {
            "contentActivities": {
              "type": "array",
              "items": {
                "$ref": "#/$defs/microsoft.graph.contentActivity"
              },
              "description": "Collection of activity logs related to content processing.",
              "x-ms-navigationProperty": true
            },
            "@odata.type": {
              "type": "string"
            }
          }
        }
      ],
      "x-ms-discriminator-value": "#microsoft.graph.activitiesContainer"
    },
    "microsoft.graph.activityMetadata": {
      "title": "activityMetadata",
      "required": [
        "@odata.type"
      ],
      "type": "object",
      "properties": {
        "activity": {
          "$ref": "#/$defs/microsoft.graph.userActivityType"
        },
        "@odata.type": {
          "type": "string"
        }
      }
    },
    "microsoft.graph.applicationMode": {
      "title": "applicationMode",
      "enum": [
        "manual",
        "automatic",
        "recommended",
        "unknownFutureValue"
      ],
      "type": "string"
    },
    "microsoft.graph.contentActivity": {
      "allOf": [
        {
          "$ref": "#/$defs/microsoft.graph.entity"
        },
        {
          "title": "contentActivity",
          "required": [
            "@odata.type"
          ],
          "type": "object",
          "properties": {
            "contentMetadata": {
              "$ref": "#/$defs/microsoft.graph.processContentRequest"
            },
            "scopeIdentifier": {
              "type": [
                "string",
                "null"
              ],
              "description": "The scope identified from computed protection scopes."
            },
            "userId": {
              "type": [
                "string",
                "null"
              ],
              "description": "ID of the user."
            },
            "@odata.type": {
              "type": "string"
            }
          }
        }
      ],
      "x-ms-discriminator-value": "#microsoft.graph.contentActivity"
    },
    "microsoft.graph.contentBase": {
      "title": "contentBase",
      "required": [
        "@odata.type"
      ],
      "type": "object",
      "properties": {
        "@odata.type": {
          "type": "string"
        }
      }
    },
    "microsoft.graph.contentCategory": {
      "title": "contentCategory",
      "enum": [
        "none",
        "ai",
        "unknownFutureValue"
      ],
      "type": "string"
    },
    "microsoft.graph.currentLabel": {
      "title": "currentLabel",
      "required": [
        "@odata.type"
      ],
      "type": "object",
      "properties": {
        "applicationMode": {
          "anyOf": [
            {
              "$ref": "#/$defs/microsoft.graph.applicationMode"
            },
            {
              "type": [
                "object",
                "null"
              ]
            }
          ]
        },
        "id": {
          "type": [
            "string",
            "null"
          ]
        },
        "@odata.type": {
          "type": "string"
        }
      }
    },
    "microsoft.graph.dataSecurityAndGovernance": {
      "allOf": [
        {
          "$ref": "#/$defs/microsoft.graph.entity"
        },
        {
          "title": "dataSecurityAndGovernance",
          "required": [
            "@odata.type"
          ],
          "type": "object",
          "properties": {
            "sensitivityLabels": {
              "type": "array",
              "items": {
                "$ref": "#/$defs/microsoft.graph.sensitivityLabel"
              },
              "x-ms-navigationProperty": true
            },
            "@odata.type": {
              "type": "string"
            }
          }
        }
      ]
    },
    "microsoft.graph.deviceMetadata": {
      "title": "deviceMetadata",
      "required": [
        "@odata.type"
      ],
      "type": "object",
      "properties": {
        "deviceType": {
          "type": [
            "string",
            "null"
          ],
          "description": "Optional. The general type of the device (for example, 'Managed', 'Unmanaged')."
        },
        "ipAddress": {
          "type": [
            "string",
            "null"
          ],
          "description": "The Internet Protocol (IP) address of the device."
        },
        "operatingSystemSpecifications": {
          "anyOf": [
            {
              "$ref": "#/$defs/microsoft.graph.operatingSystemSpecifications"
            },
            {
              "type": [
                "object",
                "null"
              ]
            }
          ],
          "description": "Details about the operating system platform and version."
        },
        "@odata.type": {
          "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.integratedApplicationMetadata": {
      "title": "integratedApplicationMetadata",
      "required": [
        "@odata.type"
      ],
      "type": "object",
      "properties": {
        "name": {
          "type": [
            "string",
            "null"
          ],
          "description": "The name of the integrated application."
        },
        "version": {
          "type": [
            "string",
            "null"
          ],
          "description": "The version number of the integrated application."
        },
        "@odata.type": {
          "type": "string"
        }
      }
    },
    "microsoft.graph.labelActionSource": {
      "title": "labelActionSource",
      "enum": [
        "manual",
        "automatic",
        "recommended",
        "none",
        "unknownFutureValue"
      ],
      "type": "string"
    },
    "microsoft.graph.operatingSystemSpecifications": {
      "title": "operatingSystemSpecifications",
      "required": [
        "@odata.type"
      ],
      "type": "object",
      "properties": {
        "operatingSystemPlatform": {
          "type": "string",
          "description": "The platform of the operating system (for example, 'Windows')."
        },
        "operatingSystemVersion": {
          "type": "string",
          "description": "The version string of the operating system."
        },
        "@odata.type": {
          "type": "string"
        }
      }
    },
    "microsoft.graph.policyLocation": {
      "title": "policyLocation",
      "required": [
        "@odata.type"
      ],
      "type": "object",
      "properties": {
        "value": {
          "type": "string",
          "description": "The actual value representing the location. Location value is specific for concretetype of the  policyLocation - policyLocationDomain, policyLocationUrl, or policyLocationApplication (for example, 'contoso.com', 'https://partner.contoso.com/upload', '83ef198a-0396-4893-9d4f-d36efbffcaaa')."
        },
        "@odata.type": {
          "type": "string"
        }
      }
    },
    "microsoft.graph.processContentMetadataBase": {
      "title": "processContentMetadataBase",
      "required": [
        "@odata.type"
      ],
      "type": "object",
      "properties": {
        "content": {
          "anyOf": [
            {
              "$ref": "#/$defs/microsoft.graph.contentBase"
            },
            {
              "type": [
                "object",
                "null"
              ]
            }
          ],
          "description": "Represents the actual content, either as text (textContent) or binary data (binaryContent). Optional if metadata alone is sufficient for policy evaluation. Do not use for contentActivities."
        },
        "contentCategory": {
          "anyOf": [
            {
              "$ref": "#/$defs/microsoft.graph.contentCategory"
            },
            {
              "type": [
                "object",
                "null"
              ]
            }
          ]
        },
        "correlationId": {
          "type": [
            "string",
            "null"
          ],
          "description": "An identifier used to group multiple related content entries (for example, different parts of the same file upload, messages in a conversation)."
        },
        "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": "Required. Timestamp indicating when the original content was created (for example, file creation time, message sent time).",
          "format": "date-time"
        },
        "identifier": {
          "type": "string",
          "description": "Required. A unique identifier for this specific content entry within the context of the calling application or enforcement plane (for example, message ID, file path/URL)."
        },
        "isTruncated": {
          "type": "boolean",
          "description": "Required. Indicates if the provided content has been truncated from its original form (for example, due to size limits)."
        },
        "length": {
          "type": [
            "number",
            "null"
          ],
          "description": "The length of the original content in bytes.",
          "format": "int64"
        },
        "modifiedDateTime": {
          "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": "Required. Timestamp indicating when the original content was last modified. For ephemeral content like messages, this might be the same as createdDateTime.",
          "format": "date-time"
        },
        "name": {
          "type": "string",
          "description": "Required. A descriptive name for the content (for example, file name, web page title, 'Chat Message')."
        },
        "sensitivityLabels": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/microsoft.graph.currentLabel"
          }
        },
        "sequenceNumber": {
          "type": [
            "number",
            "null"
          ],
          "description": "A sequence number indicating the order in which content was generated or should be processed, required when correlationId is used.",
          "format": "int64"
        },
        "@odata.type": {
          "type": "string"
        }
      }
    },
    "microsoft.graph.processContentRequest": {
      "title": "processContentRequest",
      "required": [
        "@odata.type"
      ],
      "type": "object",
      "properties": {
        "activityMetadata": {
          "$ref": "#/$defs/microsoft.graph.activityMetadata"
        },
        "contentEntries": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/microsoft.graph.processContentMetadataBase"
          },
          "description": "A collection of content entries to be processed. Each entry contains the content itself and its metadata. Use conversation metadata for content like prompts and responses and file metadata for files. Required."
        },
        "deviceMetadata": {
          "$ref": "#/$defs/microsoft.graph.deviceMetadata"
        },
        "integratedAppMetadata": {
          "$ref": "#/$defs/microsoft.graph.integratedApplicationMetadata"
        },
        "protectedAppMetadata": {
          "anyOf": [
            {
              "$ref": "#/$defs/microsoft.graph.protectedApplicationMetadata"
            },
            {
              "type": [
                "object",
                "null"
              ]
            }
          ],
          "description": "Metadata about the protected application making the request. Required."
        },
        "@odata.type": {
          "type": "string"
        }
      }
    },
    "microsoft.graph.protectedApplicationMetadata": {
      "allOf": [
        {
          "$ref": "#/$defs/microsoft.graph.integratedApplicationMetadata"
        },
        {
          "title": "protectedApplicationMetadata",
          "required": [
            "@odata.type"
          ],
          "type": "object",
          "properties": {
            "applicationLocation": {
              "anyOf": [
                {
                  "$ref": "#/$defs/microsoft.graph.policyLocation"
                },
                {
                  "type": [
                    "object",
                    "null"
                  ]
                }
              ],
              "description": "The client (application) ID of the Microsoft Entra application. Required."
            },
            "@odata.type": {
              "type": "string",
              "default": "#microsoft.graph.protectedApplicationMetadata"
            }
          }
        }
      ],
      "x-ms-discriminator-value": "#microsoft.graph.protectedApplicationMetadata"
    },
    "microsoft.graph.sensitivityLabel": {
      "allOf": [
        {
          "$ref": "#/$defs/microsoft.graph.entity"
        },
        {
          "title": "sensitivityLabel",
          "required": [
            "@odata.type"
          ],
          "type": "object",
          "properties": {
            "actionSource": {
              "anyOf": [
                {
                  "$ref": "#/$defs/microsoft.graph.labelActionSource"
                },
                {
                  "type": [
                    "object",
                    "null"
                  ]
                }
              ]
            },
            "applicationMode": {
              "anyOf": [
                {
                  "$ref": "#/$defs/microsoft.graph.applicationMode"
                },
                {
                  "type": [
                    "object",
                    "null"
                  ]
                }
              ]
            },
            "autoTooltip": {
              "type": [
                "string",
                "null"
              ]
            },
            "description": {
              "type": [
                "string",
                "null"
              ]
            },
            "displayName": {
              "type": [
                "string",
                "null"
              ]
            },
            "hasProtection": {
              "type": [
                "boolean",
                "null"
              ]
            },
            "isDefault": {
              "type": [
                "boolean",
                "null"
              ]
            },
            "isEndpointProtectionEnabled": {
              "type": [
                "boolean",
                "null"
              ]
            },
            "isScopedToUser": {
              "type": [
                "boolean",
                "null"
              ]
            },
            "locale": {
              "type": [
                "string",
                "null"
              ]
            },
            "name": {
              "type": [
                "string",
                "null"
              ]
            },
            "priority": {
              "maximum": 2147483647,
              "minimum": -2147483648,
              "type": [
                "number",
                "null"
              ],
              "format": "int32"
            },
            "toolTip": {
              "type": [
                "string",
                "null"
              ]
            },
            "rights": {
              "anyOf": [
                {
                  "$ref": "#/$defs/microsoft.graph.usageRightsIncluded"
                },
                {
                  "type": [
                    "object",
                    "null"
                  ]
                }
              ],
              "x-ms-navigationProperty": true
            },
            "sublabels": {
              "type": "array",
              "items": {
                "$ref": "#/$defs/microsoft.graph.sensitivityLabel"
              },
              "x-ms-navigationProperty": true
            },
            "@odata.type": {
              "type": "string"
            }
          }
        }
      ],
      "x-ms-discriminator-value": "#microsoft.graph.sensitivityLabel"
    },
    "microsoft.graph.usageRights": {
      "title": "usageRights",
      "enum": [
        "unknown",
        "docEdit",
        "edit",
        "comment",
        "export",
        "forward",
        "owner",
        "print",
        "reply",
        "replyAll",
        "view",
        "extract",
        "viewRightsData",
        "editRightsData",
        "objModel",
        "accessDenied",
        "userDefinedProtectionTypeNotSupportedException",
        "encryptedProtectionTypeNotSupportedException",
        "purviewClaimsChallengeNotSupportedException",
        "exception",
        "labelNotFoundException",
        "unknownFutureValue"
      ],
      "type": "string",
      "x-ms-enum-flags": {
        "isFlags": true
      }
    },
    "microsoft.graph.usageRightsIncluded": {
      "allOf": [
        {
          "$ref": "#/$defs/microsoft.graph.entity"
        },
        {
          "title": "usageRightsIncluded",
          "required": [
            "@odata.type"
          ],
          "type": "object",
          "properties": {
            "ownerEmail": {
              "type": [
                "string",
                "null"
              ],
              "description": "The email of owner label rights."
            },
            "userEmail": {
              "type": [
                "string",
                "null"
              ],
              "description": "The email of user with label user rights."
            },
            "value": {
              "$ref": "#/$defs/microsoft.graph.usageRights"
            },
            "@odata.type": {
              "type": "string"
            }
          }
        }
      ],
      "x-ms-discriminator-value": "#microsoft.graph.usageRightsIncluded"
    },
    "microsoft.graph.userActivityType": {
      "title": "userActivityType",
      "enum": [
        "uploadText",
        "uploadFile",
        "downloadText",
        "downloadFile",
        "unknownFutureValue",
        "copyToClipboard",
        "pasteFromClipboard",
        "print",
        "accessDebugTools"
      ],
      "type": "string"
    },
    "microsoft.graph.userProtectionScopeContainer": {
      "allOf": [
        {
          "$ref": "#/$defs/microsoft.graph.entity"
        },
        {
          "title": "userProtectionScopeContainer",
          "required": [
            "@odata.type"
          ],
          "type": "object",
          "properties": {
            "@odata.type": {
              "type": "string"
            }
          }
        }
      ],
      "x-ms-discriminator-value": "#microsoft.graph.userProtectionScopeContainer"
    }
  }
}