MS Graph API: Wrong file size in DriveItem info

Viewed 266

I have a Word file that has a sensitivity label set. When fetching this file info using:

GET /drives/{drive-id}/items/{item-id}

I get the following response:

  "@odata.context": *",
  "@microsoft.graph.downloadUrl": "*",
  "createdDateTime": "2020-11-23T14:34:46Z",
  "eTag": "\"{57B2B6AB-CA5B-4404-B714-69D4ACF1BAD2},10\"",
  "id": "*",
  "lastModifiedDateTime": "2020-11-23T14:35:42Z",
  "name": "Document.docx",
  "webUrl": "*",
  "cTag": "*",
  "size": 36298,
  "createdBy": *,
  "lastModifiedBy": *
  },
  "parentReference": *,
  "file": {
    "mimeType": "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
    "hashes": {
      "quickXorHash": "KxC7GCjPid2b5o3NGboS9vBPhKg="
    }
  },
  "fileSystemInfo": {
    "createdDateTime": "2020-11-23T14:34:46Z",
    "lastModifiedDateTime": "2020-11-23T14:35:42Z"
  }

As you can see the size of the file is 36298. However, if I download the file using the link from @microsoft.graph.downloadUrl I can see that the file size is bigger. Looking at the content-length header in the response the file size is 59392. I see this behavior only with files that have sensitivity labels set. Is that something expected to happen or it's is bug in MS Graph?

0 Answers
Related