Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Discussion options

🏷️ Discussion Type

Question

Body

Hi,

I am going to use the Microsoft Graph Delta Query API to track incremental changes on Exchange Online mailbox folders on very large scale:

GET /users/{userId}/mailFolders/{folderId}/messages/delta?$deltaToken={token}

I am going to store the deltaToken per user-folder resource and reuse it on subsequent calls to fetch only changes since the last sync.

The Problem:

The official Microsoft documentation states that delta tokens can expire and that a 410 Gone response should be handled but nowhere in the documentation is an actual TTL or expiry window defined for mailbox delta tokens. There is no mention of whether the token is backed by a sliding window, a fixed TTL, or an internal server-side cache with an undocumented eviction policy.

What I specifically need to know:

What is the actual TTL or lifetime of a delta token for mailFolders/messages/delta? Is it fixed, sliding, or undefined?

Is the token backed by a server-side cache that can be evicted under memory or load pressure - independent of time? i.e., can a token expire not because of time but because of server-side resource constraints?

If there is genuinely no guaranteed TTL - meaning a token could expire at any point without a time bound - how should production systems handle this reliably at scale, given that a 410 on millions of resources simultaneously would cause a thundering herd of full re-syncs?

You must be logged in to vote

Replies: 1 comment · 1 reply

Comment options

Hi,
As far as publicly documented behavior goes, Microsoft Graph does not provide a guaranteed or officially documented TTL for mailbox delta tokens. From practical experience and community discussions, the lifetime appears to be implementation-dependent rather than a strict published SLA.

A few important points:

  • Delta tokens should generally be treated as opaque and potentially short-lived.
  • There is no confirmed fixed expiration window published for mailFolders/messages/delta.
  • The backend may invalidate tokens because of mailbox changes, service maintenance, topology changes, retention boundaries, or internal cache/state eviction.
  • So yes, in practice, expiration may occur independently of elapsed time and not purely because of a fixed TTL.

Because of this, production systems at scale are usually designed assuming that:

  • Any token can eventually become invalid at any time.
  • A 410 Gone is a normal recovery scenario rather than an exceptional edge case.

To handle this reliably at scale, common strategies include:

  • Staggering synchronization schedules to avoid synchronized token refreshes
  • Applying exponential backoff and retry policies
  • Limiting concurrent full re-sync operations
  • Maintaining checkpoints/watermarks to reduce resync scope where possible
  • Using queue-based resync orchestration instead of immediate mass retries
  • Monitoring token invalidation rates as an operational metric

For very large-scale systems, it is generally safer to architect around eventual token invalidation rather than relying on a stable long-term retention guarantee from the service.

Hopefully Microsoft can provide more authoritative clarification, but currently the documentation intentionally seems to avoid guaranteeing a deterministic TTL.

You must be logged in to vote
1 reply
@Mahatva1303
Comment options

@utkarshvijay hope this answers your query if yes please mark it as answered

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Codespaces Your development environment, in the cloud. Run VS Code and code on GitHub's cloud platform, Question Ask and answer questions about GitHub features and usage Welcome 🎉 Used to greet and highlight first-time discussion participants. Welcome to the community! source:ui Discussions created via Community GitHub templates
2 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.