Issues with Delta Query on Graph API: Loading Only Specific Drive Items

Baki 5 Reputation points
2024-04-26T13:55:24.5633333+00:00

I'm trying to use the Microsoft Graph API to specifically load and monitor only shared items from a drive. I'm following the delta query method described here: Best practices for discovering files and detecting changes at scale

I've tried different settings in the Prefer header like hierarchicalsharing, deltashowremovedasdeleted, deltatraversepermissiongaps, and deltashowsharingchanges, but I always end up loading all the items. I even tried filtering by the shared property, but it didn’t work.

Here's the endpoint I used:
https://graph.microsoft.com/v1.0/drives/{DRIVE_ID}/root/delta

Additionally, the documentation mentions properties like @microsoft.graph.sharedChanged and @oneDrive.sharedChanged for detecting changes in response, but I don’t see these properties in my results even when the changes were detected.

Can someone help me figure out how to set up the delta query to only load shared items and continue monitoring just those items in the future?

Thanks!

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
0 comments No comments
{count} votes