Sync Drive Delta Query - Parent Id changes

Jimmy 1 Reputation point
2021-09-30T14:43:14.9+00:00

I'm using the delta query to sync the contents of a drive.

I noticed that a file that I uploaded in a folder, say test.txt, has a certain parentId (parentReference -> id).

When I delete test.txt and query the API, it correctly returns the file with the same Id as before and the deleted facet. However, the parentId is different than before.

While the parentId referenced the folder test.txt was in before, the parentId now references the root folder, which is not correct.

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
10,666 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Diya Ahuja 5 Reputation points
    2023-06-30T18:09:51.0566667+00:00

    The delta query returns the link necessary to get future changes each time it is called. When a file is deleted, the delta query will return the file with the same ID as before and the deleted facet. However, the parentId will be different than before and will now reference the root folder. This is expected behavior as the deleted file is no longer associated with the folder it was in before.

    0 comments No comments