Share via

Teams Export API - beta or GA?

Eran Otmi 40 Reputation points
2026-04-29T12:30:34.0366667+00:00

Hey
regarding these endpoints (Teams Export API)
/getAllMessages

/getAllRetainedMessages

I see some inconsistent behavior during the past few weeks, for example -

  1. To retrieve deleted messages I needed to use /getAllMessages at first, then I stopped getting them and had to use /getAllRetainedMessages - and then I got them on both endpoints. What is the expected behavior? why did it change?
  2. Using /getAllRetainedMessages, the response included deleted messages from up to 30 days ago, but now (since 2 days ago) I only receive deleted messages from the last 24H.

Is these endpoints Beta or GA?
If they are beta - is there an official date for GA?
Are any more changes planned for them or are they stable?
What is the expected behavior for them?

Thanks!

Microsoft Teams | Development
Microsoft Teams | Development

Building, integrating, or customizing apps and workflows within Microsoft Teams using developer tools and APIs

Locked Question. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

1 answer

Sort by: Most helpful
  1. AI answer

    2026-04-29T12:30:56.42+00:00

    The Teams Export APIs in Microsoft Graph that use /getAllMessages and /getAllRetainedMessages are generally available (GA) endpoints, not beta, but they have specific, documented behaviors and limits that explain what is being seen.

    1. Relationship between /getAllMessages and /getAllRetainedMessages

    There are two different concepts in the Teams export story:

    • Standard export of messages
      • For chats: GET /users/{id}/chats/getAllMessages
      • For channels: GET /teams/{teamId}/channels/getAllMessages
      • For deleted teams: GET /teamwork/deletedTeams/{deletedTeamId}/channels/getAllMessages
    • Export of retained messages (compliance/hold copies)
      • For chats: GET /users/{id}/chats/getAllRetainedMessages
      • For channels: GET /teams/{teamId}/channels/getAllRetainedMessages

    The retained variants are specifically tied to Teams retention policies or holds:

    • getAllRetainedMessages requires that the tenant be configured with Teams retention policies.
    • It returns messages from the holds folder (compliance copies), including:
      • Messages soft‑deleted by users beyond the normal 21‑day deletion period, if the user is on hold or a valid retention policy is set.
      • Previous versions of edited messages, when a valid retention policy is set.

    The standard getAllMessages endpoints return the normal export view of chat/channel messages, including support for:

    • Messages from active and deleted teams/channels for up to 30 days from the day of deletion.
    • Messages for deleted or inactive users for up to 30 days from deletion/inactivation.

    Because both APIs can surface deleted content within certain time windows, there can be overlap where deleted messages appear in both getAllMessages and getAllRetainedMessages. That overlap depends on:

    • Whether the team/channel/user is within the 30‑day deleted window.
    • Whether retention policies/holds are configured and still in effect.
    1. Why behavior around deleted messages can appear to change

    From the documented behavior:

    • Export APIs support capturing messages from deleted Teams and channels for a maximum of 30 days from deletion. After 30 days, the team/channel is hard deleted and messages cannot be retrieved.
    • getAllRetainedMessages supports retrieving deleted channel messages for a maximum of 30 days from the day of deletion when retention/holds apply.
    • For soft‑deleted messages in chats/channels, if the user is on hold or a valid retention policy is set, messages can be exported beyond the normal 21‑day deletion period, but the API note still caps deleted channel messages at 30 days.

    This means:

    • In some periods, deleted messages may be visible via getAllMessages (because the team/channel is still within the 30‑day deleted window) and also via getAllRetainedMessages (because retention/holds are active).
    • Once the 30‑day window is passed for deleted teams/channels, getAllMessages will stop returning those deleted items, and only retained copies (if any) remain accessible via getAllRetainedMessages.

    If behavior changed from “only via getAllMessages” → “only via getAllRetainedMessages” → “via both”, that typically reflects:

    • Changes in retention policy configuration or holds.
    • The timing of when deletions occurred relative to the 21‑day and 30‑day windows.
    1. 30‑day vs 24‑hour behavior for getAllRetainedMessages

    The documented expectation for retained messages is:

    • Deleted channel messages can be retrieved for a maximum of 30 days from the day of deletion via getAllRetainedMessages.
    • Export APIs also support deleted Teams/channels and deleted/inactive users for up to 30 days.

    There is no documented change that limits getAllRetainedMessages to only the last 24 hours. If only the last 24 hours of deleted messages are currently returned, that is not reflected in the published behavior and likely indicates either:

    • A change in the tenant’s retention/hold configuration affecting what is retained.
    • A service‑side issue or regression that would need to be raised via support, since the documentation still states 30‑day support for deleted messages.
    1. Stability and GA status

    From the documentation:

    • chat: getAllRetainedMessages (GET /users/{id}/chats/getAllRetainedMessages) is documented under the v1.0 (GA) Microsoft Graph namespace and requires application permissions (Chat.Read.All or Chat.ReadWrite.All).
    • channel: getAllRetainedMessages (GET /teams/{teamId}/channels/getAllRetainedMessages) is also documented under v1.0 and requires ChannelMessage.Read.All application permission.
    • deletedTeam: getAllMessages (GET /teamwork/deletedTeams/{deletedTeamId}/channels/getAllMessages) is likewise in v1.0 and requires ChannelMessage.Read.All.

    Being in the v1.0 endpoint set indicates GA status rather than beta. However, even GA export APIs can have:

    • Strictly enforced limits (such as the 30‑day windows) that cause apparent behavior changes as data ages.
    • Dependence on compliance configuration (retention policies, holds) that, when changed, alter what is returned.

    The documentation does not list any upcoming breaking changes, but it does explicitly note current limitations (for example, no private channels for channel: getAllRetainedMessages, no meeting‑related control messages, and specific support windows for deleted entities).

    1. Expected behavior summary
    • /users/{id}/chats/getAllMessages and /teams/{teamId}/channels/getAllMessages:
      • GA (v1.0) export APIs.
      • Return chat/channel messages, including deleted Teams/channels and deleted/inactive users, up to 30 days after deletion.
    • /users/{id}/chats/getAllRetainedMessages and /teams/{teamId}/channels/getAllRetainedMessages:
      • GA (v1.0) export APIs.
      • Require Teams retention policies to be configured.
      • Return retained (compliance) copies, including:
        • Soft‑deleted messages beyond the normal 21‑day deletion period when on hold or under a valid retention policy.
        • Edited history of messages when retention is configured.
      • For deleted channel messages, retrieval is supported for a maximum of 30 days from deletion.

    If current behavior does not match this (for example, only 24 hours of deleted messages via getAllRetainedMessages), the next step is to verify retention policy configuration and, if still inconsistent, open a support case, as the published contracts for these v1.0 APIs are as described above.


    References:

    AI-generated content may be incorrect. Read our transparency notes for more information.

    Was this answer helpful?