MS Graph API returns different value for modification time vs utilizing the SharePoint REST API RRS feed

  • Question

  • I uploaded a file to OneDrive using the Office 365 Online and then I try to fetch information about this file using two APIs: MS Graph API and SharePoint REST API.

    For MS Graph API I use the next endpoint:{drive-id}/items/{item-id}
    as described here:

    I get the response like:
        "createdDateTime": "2019-12-09T15:03:52Z",
        "eTag": "\"{9E8670D4-185F-4E8D-B2E5-61819E769BC3},2\"",
        "lastModifiedDateTime": "2019-12-09T15:04:12Z",
        "name": "test.psd",
        "cTag": "\"c:{9E8670D4-185F-4E8D-B2E5-61819E769BC3},2\"",
        "size": 56783858,

        "fileSystemInfo": {
            "createdDateTime": "2019-12-09T15:03:52Z",
            "lastModifiedDateTime": "2019-12-09T15:04:15Z"

    For the SharePoint REST API I use the endpoint:*/_api/Web/GetFileByServerRelativePath(decodedurl='*/test.psd')
    and get the response with the next information:
            "LinkingUrl": "",
            "MajorVersion": 1,
            "MinorVersion": 0,
            "Name": "test.psd",
            "ServerRelativeUrl": "/*/test.psd",
            "TimeCreated": "2019-12-09T15:03:52Z",
            "TimeLastModified": "2019-12-09T15:04:11Z",
            "Title": null,
            "UIVersion": 512,
            "UIVersionLabel": "1.0",
            "UniqueId": *

    So the modification time for target file returned by different APIs differs by 4 seconds:
    * for MS Graph the value is 2019-12-09T15:04:15Z
    * from SharePoint REST API we got value 2019-12-09T15:04:11Z
    How this difference can be explained? What API return the right value?
    Tuesday, January 14, 2020 4:49 PM

All replies