MSGraph not retrieving all messages from old chats

16 Views Asked by At

Using MSGraph to retrieve messages from some old chats (2-3 years ago), there is a disturbing behavior - on first run, with paging, it retrieves a number of messages, for example 138. Then on a next run, same parameters, the call retrieves only 38. What is missing are the 100 most recent messages.

There are no errors returned in the response.

After waiting some period of time, like next day, it starts again to retrieve all messages for a while, then starts again getting the reduced set.

I can reproduce the issue both in code and using MSGraph explorer. And also when trying to open those messages in Teams Desktop application with a link like this: https://teams.microsoft.com/l/message/{chatId}/{messageId}?context=%7B%22contextType%22%3A%22chat%22... it opens the chat, but does not display the message, instead showing a banner that the messages was "deleted" (it most certainly isn't)

What can be done to resolve this issue and retrieve all chat messages consistently?

0

There are 0 best solutions below