Share via

GET /sites/delta — no mechanism to detect deleted sites in response

Tom Avi 0 Reputation points
2026-04-26T13:29:23.3666667+00:00

The sites/delta documentation states:

▎ "Get newly created, updated, or deleted sites

▎ "Any resources marked as deleted should be removed from your local state."

Example 2 describes a response where "the site named All Company was deleted." However, the JSON response in the example contains no deletion indicator —

It looks identical to a created or modified site. No @removed annotation, no deleted facet, no distinguishing property.

We tested this with application permissions (Sites.Read.All):

  1. Confirmed a test site appeared in sites/delta full enumeration
  2. Saved the deltaLink
  3. Soft-deleted the site and permanently purged it from the recycle bin
  4. Confirmed GET /sites/{id} returns 404 itemNotFound
  5. Queried delta with the saved token

The deleted site appeared as a regular site object with standard properties (id, name, displayName, webUrl, createdDateTime, isPersonalSite,

siteCollection, root). No @removed, no deleted facet — indistinguishable from a live site.

For comparison, other delta APIs have clear deletion signals:

  • driveItem/delta → "deleted": {} facet
  • listItem/delta → "deleted": {"state": "deleted"}
  • Directory object delta → "@removed": {"reason": "deleted"}

Questions:

  1. How should consumers of sites/delta programmatically detect that a site was deleted
  2. Is a deletion indicator (@removed or deleted facet) planned for sites/delta?
  3. In Example 2, what in the response indicates that "All Company" was deleted?
Microsoft 365 and Office | SharePoint | Development
0 comments No comments

1 answer

Sort by: Most helpful
  1. Teddie-D 15,210 Reputation points Microsoft External Staff Moderator
    2026-04-27T00:15:21.9466667+00:00

    Hi @Tom Avi 

    Just to clarify, moderators and contributors here don’t have access to back‑end systems or engineering internals. We can only share guidance based on public documentation and experience.   

    1.How should consumers of sites/delta programmatically detect that a site was deleted 

    There’s no supported way to detect a site deletion from a single sites/delta response. The API does not emit a deletion marker; instead, deletion is inferred through reconciliation. 
    To use sites/delta effectively, you first perform a full enumeration and build a local store of site IDs. On subsequent calls with the saved @odata.deltaLink, you compare your local set against the server’s current state. If a site that previously existed locally such as All Company is missing from the server’s authoritative state during reconciliation, you remove it from your local store and treat it as deleted. 
    In other words, deletion is determined by the absence of a site across delta cycles, not by inspecting any explicit field in the JSON payload.

    2.Is a deletion indicator (@removed or deleted facet) planned for sites/delta? 

    Unlike some other delta APIs, sites/delta does not currently return an explicit deletion signal such as @removed or a deleted facet. There’s no documentation suggesting that such an indicator is planned. Consumers must rely on state reconciliation rather than payload flags. 

    3.In Example 2, what in the response indicates that "All Company" was deleted? 

    Nothing in the sites/delta response payload explicitly signals deletion. In Example 2, the JSON for All Company is just a standard site object. The claim that All Company was deleted comes only from the explanatory text above the JSON, not from any field in the response itself. 
    The example assumes you had a previously synchronized local state where All Company existed. When reconciling across delta cycles, its absence from the current server state is what indicates deletion.
    In other words, Example 2 is descriptive rather than declarative, it describes the outcome of reconciliation, not an explicit deletion signal in the payload. 

    I hope this explanation makes things clearer.


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".   

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.  


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.