Building, integrating, or customizing apps and workflows within Microsoft Teams using developer tools and APIs
Hi @Eran Otmi
In addition to the insight provided by the Q&A Assist, I would like to confirm the following details to better understand your situation.
1/ According to the official documentation, deleted messages can be exported from the Teams API for up to 21 days. At the same time, as you mentioned, messages deleted more than 24 hours ago may not appear when running the endpoints. Could you please help confirm whether messages that are older than 24 hours but still within the 21-day window are not being returned in the endpoint results?
To help validate this behavior, you may consider using the $filter parameter as shown in the example below.
GET /users/{id}/chats/getAllMessages?$filter=lastModifiedDateTime gt 2020-06-04T18:03:11.591Z and lastModifiedDateTime lt 2020-06-05T21:00:09.413Z
2/ Could you also double check the Teams retention policy currently applied in your environment, and confirm which option you selected in the configuration shown in the image below?
At this moment, I have not found any recent reports or official documentation that directly address this behavior. That said, if you have any updates or additional findings, please feel free to share them.
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.