Cloud drive change feeds
Use the provider-specific storage interface with the current authorized SDK client. Pass the server-owned identifier of the exact OAuth grant used by that client. Resolve the grant and the delegated credential before each call. Retain the returned position alongside the same member, provider and connection. Treat the position as private server data and keep the provider token or link opaque.
Google Drive
Use IGoogleDriveStorage.GetChangesCursorAsync to begin watching new changes in the configured account root, then call ReadChangesPageAsync with that grant. Storage checks the native Google account permission ID on each call. SupportsAllDrives also governs whether this account feed includes Shared Drive items available to the grant. The position is bound to that setting. An application can use the existing drive.file consent for the files that account granted to that application.
Continue with Continuation even when the file list is empty. Persist the terminal Checkpoint after applying the page’s changes. Google documents the tokens as nonexpiring. A rejected or malformed position returns a failure and leaves the application in control of reconciliation. A Google removal or trashed item is unavailable through this observation. A removal can mean that the grant lost access. Match the exact retained file ID and verify current access before using it again. Google Drive start position, Google Drive changes, Google Drive account identity.
OneDrive
Use IOneDriveStorage.StartDeltaAsync under the current delegated Files.Read connection, at its default drive root. Choose FromNow to obtain the provider’s current checkpoint or FullEnumeration to obtain its current hierarchy page by page. Subsequent ReadDeltaPageAsync requests check the current grant and resolve the same drive and root before following a native Graph link. Configured subfolders and other drives require their own feed contract.
Follow Continuation through the end, including from an empty page. Preserve order and use the last observed occurrence of an item when reconciling duplicate native IDs. Checkpoint marks the next round. A Graph 410 Gone returns Reset: explicitly reconcile via its scoped Restart cursor when present, or start a full enumeration. Complete the reconciliation before replacing the old checkpoint. Authorization failures return a failed result without a new position. Microsoft Graph drive delta.
Ordinary OneDrive listings follow each native child-page link within the same folder and retain their existing file metadata projection. Graph must provide a children collection on the first page and each continuation. An empty collection is valid. An absent collection fails the listing so the caller can retry. Microsoft Graph list children.
Applying a change page
sequenceDiagram
participant Consumer
participant Storage
participant Provider
Consumer->>Storage: Read one page under the current grant
Storage->>Provider: Verify account and read the scoped position
Provider-->>Storage: Item changes and next position
Storage-->>Consumer: Changes, continuation, checkpoint, or reset
Consumer->>Consumer: Reconcile exact items and retain the position
A change is an observation of an item ID and optional provider revision. Apply it only to an exact source the caller can currently use. Recheck the item, revision and content rights through ReadDocumentAsync, CaptureItemRevisionAsync or ReadItemRevisionAsync before indexing or presenting content. Preserve existing independent access checks when presenting a citation. Apply a page and its position durably in the caller’s existing owner so retrying the same page cannot duplicate effects. Keep previous data subject to its existing access and retention rules while reconciling a reset.