A cloud-based identity and access management service for securing user authentication and resource access
Hello Kumar Sugandh,
This looks like a delta token issue rather than a GraphClient problem.
For /users/delta, the expected flow is:
- Call
GET /users/delta - Follow all
@odata.nextLinkpages - Continue until you receive
@odata.deltaLink - Save only the final
@odata.deltaLinkfor the next sync
If both app instances are running at the same time and using the same stored delta token, one instance may update it while the other is still using the older value. This can cause one instance to return data while the other gets empty results, even during what looks like a full sync.
Also, for the first full sync, avoid using:
Prefer: return=minimal
This is mainly useful when using an existing @odata.deltaLink, not for the initial full snapshot.
Please check:
- only one instance should manage delta sync, or each instance should keep its own delta token
- save only
@odata.deltaLink, not@odata.nextLink - confirm
User.Read.AllandDirectory.Read.AllApplication permissions are granted with admin consent
A common setup is to let one instance handle the sync and store the results in DB, while the second instance reads from the DB instead of calling Graph directly.
Most likely, both instances sharing the same delta state is causing the issue.