Using SDK for delta fetching files from Sharepoint - get the versions for each file

Bracha Steinberg 1 Reputation point
2021-12-18T23:59:29.21+00:00

I'm using the delta functionality to monitor changes in Sharepoint- and need to get for each file it's versions - but for some reason it comes null -even if I use the select and send the "Versions" property

example:

graphClient
.drives(properties.getRootDriveId())
.root()
.delta()
.buildRequest()
.select("Versions,Name,WebDavUrl")
.get()

Microsoft Security Microsoft Graph
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Srinivasa Rao Darna 6,761 Reputation points Microsoft External Staff
    2022-01-06T15:44:42.347+00:00

    Hi @Bracha Steinberg ,

    When we use the deltaLink URL for the first time, DriveItems that have been created and deleted prior to the initial delta query won't be returned that’s why we get null value (for example refer below screenshot).

    162952-deltanull.png

    After generating the delta token if there is any change occurred in the drive then it can be fetched using this delta token (for example refer below screenshot).

    162971-deltaresponse.png

    Also please note, you can fetch only latest modified version of a file with delta query.

    Please refer the below documentation links for more information:

    driveitem-delta
    Use delta query to track changes in Microsoft Graph data

    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have further questions about this answer, please click "Comment".

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.