2

I need to check integrity of a file that I have uploaded using Microsoft Graph onto Onedrive/Sharepoint. Is there some checksum available via Microsoft Graph ?

Regards Allan

2
  • Is it correct to assume that you're hoping to compare such a target system checksum with a checksum you took before sending the file? Also, is this file a blob file, or is it being processed by Graph for data (which is really the entire point of Graph. Graph isn't about leaving the data alone, it's about making the data useful). Jun 10, 2021 at 2:43
  • It is a compressed file and I need to check the integrity of that file. Jun 10, 2021 at 17:30

1 Answer 1

3

This information can be found in the driveItem resource. You request the file with drive/items/{item-id} and the returning JSON will have a 'file' part looking like this:

"file": {
    "hashes":{
      "sha1Hash":"wmgPQ6jrSeMX7JP1XmstQEGM2fc="
    }
  }

The hash type is usually either SHA1 or SHA256.

A good starting point on how to retreive this information, is via the official documentation on working with files in Microsoft Graph

1
  • 1
    Got the quickXorHash within the JSON, Thanks Jun 10, 2021 at 17:31

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .