{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/azure-ad/json-schema/azure-ad-microsoft-graph-item-insights-schema.json",
  "title": "microsoft.graph.itemInsights",
  "x-generated": "2026-11-05",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/azure-ad-users-iteminsights-api-openapi.yml#/components/schemas/microsoft.graph.itemInsights",
  "allOf": [
    {
      "$ref": "#/$defs/microsoft.graph.officeGraphInsights"
    },
    {
      "title": "itemInsights",
      "type": "object",
      "additionalProperties": {
        "type": "object"
      }
    }
  ],
  "$defs": {
    "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.insightIdentity": {
      "title": "insightIdentity",
      "type": "object",
      "properties": {
        "address": {
          "type": [
            "string",
            "null"
          ],
          "description": "The email address of the user who shared the item."
        },
        "displayName": {
          "type": [
            "string",
            "null"
          ],
          "description": "The display name of the user who shared the item."
        },
        "id": {
          "type": [
            "string",
            "null"
          ],
          "description": "The ID of the user who shared the item."
        }
      },
      "additionalProperties": {
        "type": "object"
      }
    },
    "microsoft.graph.officeGraphInsights": {
      "allOf": [
        {
          "$ref": "#/$defs/microsoft.graph.entity"
        },
        {
          "title": "officeGraphInsights",
          "type": "object",
          "properties": {
            "shared": {
              "type": "array",
              "items": {
                "$ref": "#/$defs/microsoft.graph.sharedInsight"
              },
              "description": "Calculated relationship that identifies documents shared with or by the user. This includes URLs, file attachments, and reference attachments to OneDrive for work or school and SharePoint files found in Outlook messages and meetings. This also includes URLs and reference attachments to Teams conversations. Ordered by recency of share.",
              "x-ms-navigationProperty": true
            },
            "trending": {
              "type": "array",
              "items": {
                "$ref": "#/$defs/microsoft.graph.trending"
              },
              "description": "Calculated relationship that identifies documents trending around a user. Trending documents are calculated based on activity of the user's closest network of people and include files stored in OneDrive for work or school and SharePoint. Trending insights help the user to discover potentially useful content that the user has access to, but has never viewed before.",
              "x-ms-navigationProperty": true
            },
            "used": {
              "type": "array",
              "items": {
                "$ref": "#/$defs/microsoft.graph.usedInsight"
              },
              "description": "Calculated relationship that identifies the latest documents viewed or modified by a user, including OneDrive for work or school and SharePoint documents, ranked by recency of use.",
              "x-ms-navigationProperty": true
            }
          },
          "additionalProperties": {
            "type": "object"
          }
        }
      ]
    },
    "microsoft.graph.resourceReference": {
      "title": "resourceReference",
      "type": "object",
      "properties": {
        "id": {
          "type": [
            "string",
            "null"
          ],
          "description": "The item's unique identifier."
        },
        "type": {
          "type": [
            "string",
            "null"
          ],
          "description": "A string value that can be used to classify the item, such as 'microsoft.graph.driveItem'"
        },
        "webUrl": {
          "type": [
            "string",
            "null"
          ],
          "description": "A URL leading to the referenced item."
        }
      },
      "additionalProperties": {
        "type": "object"
      }
    },
    "microsoft.graph.resourceVisualization": {
      "title": "resourceVisualization",
      "type": "object",
      "properties": {
        "containerDisplayName": {
          "type": [
            "string",
            "null"
          ],
          "description": "A string describing where the item is stored. For example, the name of a SharePoint site or the user name identifying the owner of the OneDrive storing the item."
        },
        "containerType": {
          "type": [
            "string",
            "null"
          ],
          "description": "Can be used for filtering by the type of container in which the file is stored. Such as Site or OneDriveBusiness."
        },
        "containerWebUrl": {
          "type": [
            "string",
            "null"
          ],
          "description": "A path leading to the folder in which the item is stored."
        },
        "mediaType": {
          "type": [
            "string",
            "null"
          ],
          "description": "The item's media type. Can be used for filtering for a specific type of file based on supported IANA Media Mime Types. Not all Media Mime Types are supported."
        },
        "previewImageUrl": {
          "type": [
            "string",
            "null"
          ],
          "description": "A URL leading to the preview image for the item."
        },
        "previewText": {
          "type": [
            "string",
            "null"
          ],
          "description": "A preview text for the item."
        },
        "title": {
          "type": [
            "string",
            "null"
          ],
          "description": "The item's title text."
        },
        "type": {
          "type": [
            "string",
            "null"
          ],
          "description": "The item's media type. Can be used for filtering for a specific file based on a specific type. See the section Type property values for supported types."
        }
      },
      "additionalProperties": {
        "type": "object"
      }
    },
    "microsoft.graph.sharedInsight": {
      "allOf": [
        {
          "$ref": "#/$defs/microsoft.graph.entity"
        },
        {
          "title": "sharedInsight",
          "type": "object",
          "properties": {
            "lastShared": {
              "$ref": "#/$defs/microsoft.graph.sharingDetail"
            },
            "resourceReference": {
              "$ref": "#/$defs/microsoft.graph.resourceReference"
            },
            "resourceVisualization": {
              "$ref": "#/$defs/microsoft.graph.resourceVisualization"
            },
            "sharingHistory": {
              "type": "array",
              "items": {
                "$ref": "#/$defs/microsoft.graph.sharingDetail"
              }
            },
            "lastSharedMethod": {
              "$ref": "#/$defs/microsoft.graph.entity"
            },
            "resource": {
              "$ref": "#/$defs/microsoft.graph.entity"
            }
          },
          "additionalProperties": {
            "type": "object"
          }
        }
      ]
    },
    "microsoft.graph.sharingDetail": {
      "title": "sharingDetail",
      "type": "object",
      "properties": {
        "sharedBy": {
          "$ref": "#/$defs/microsoft.graph.insightIdentity"
        },
        "sharedDateTime": {
          "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 the file was last shared. The timestamp represents date and time information using 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"
        },
        "sharingReference": {
          "$ref": "#/$defs/microsoft.graph.resourceReference"
        },
        "sharingSubject": {
          "type": [
            "string",
            "null"
          ],
          "description": "The subject with which the document was shared."
        },
        "sharingType": {
          "type": [
            "string",
            "null"
          ],
          "description": "Determines the way the document was shared. Can be by a 1Link1, 1Attachment1, 1Group1, 1Site1."
        }
      },
      "additionalProperties": {
        "type": "object"
      }
    },
    "microsoft.graph.trending": {
      "allOf": [
        {
          "$ref": "#/$defs/microsoft.graph.entity"
        },
        {
          "title": "trending",
          "type": "object",
          "properties": {
            "lastModifiedDateTime": {
              "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. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z",
              "format": "date-time"
            },
            "resourceReference": {
              "$ref": "#/$defs/microsoft.graph.resourceReference"
            },
            "resourceVisualization": {
              "$ref": "#/$defs/microsoft.graph.resourceVisualization"
            },
            "weight": {
              "type": [
                "number",
                "null"
              ],
              "description": "Value indicating how much the document is currently trending. The larger the number, the more the document is currently trending around the user (the more relevant it is). Returned documents are sorted by this value.",
              "format": "double"
            },
            "resource": {
              "$ref": "#/$defs/microsoft.graph.entity"
            }
          },
          "additionalProperties": {
            "type": "object"
          }
        }
      ]
    },
    "microsoft.graph.usageDetails": {
      "title": "usageDetails",
      "type": "object",
      "properties": {
        "lastAccessedDateTime": {
          "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 the resource was last accessed by the user. The timestamp represents date and time information using 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"
        },
        "lastModifiedDateTime": {
          "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 the resource was last modified by the user. The timestamp represents date and time information using 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"
        }
      },
      "additionalProperties": {
        "type": "object"
      }
    },
    "microsoft.graph.usedInsight": {
      "allOf": [
        {
          "$ref": "#/$defs/microsoft.graph.entity"
        },
        {
          "title": "usedInsight",
          "type": "object",
          "properties": {
            "lastUsed": {
              "$ref": "#/$defs/microsoft.graph.usageDetails"
            },
            "resourceReference": {
              "$ref": "#/$defs/microsoft.graph.resourceReference"
            },
            "resourceVisualization": {
              "$ref": "#/$defs/microsoft.graph.resourceVisualization"
            },
            "resource": {
              "$ref": "#/$defs/microsoft.graph.entity"
            }
          },
          "additionalProperties": {
            "type": "object"
          }
        }
      ]
    }
  }
}