Issues with Delta Query on Graph API: Loading Only Specific Drive Items
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!