Unable to retrieve complete list of messages from Microsoft Teams API

Kaif Master 25 Reputation points


I have left a group and the last message visible to me was a system event message indicating that I left the group. Now, I am attempting to retrieve the full list of messages by calling the API https://graph.microsoft.com/v1.0/me/chats/{chat-id}/messages, and its good returns all messages including that last system event message

I've tried adding a query to the API to sort messages by createdDateTime in descending order (https://graph.microsoft.com/v1.0/me/chats/{chat-id}/messages?$orderby=createdDateTime desc), but to my surprise, I am unable to see the last system message indicating that I left the group. I can see other system messages but not this one.

Is this a bug or a feature of the API?, or somthing else ?

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
10,452 questions
0 comments No comments
{count} votes