Graph API sometimes return less channel messages than total

CAT 1 Reputation point
2024-05-16T09:04:57.7233333+00:00

I use Microsoft Graph API to get messages in a Team channel.

GET https://graph.microsoft.com/v1.0/teams/f25d16eb-34d2-4028-9598-a3ada02f8ed6/channels/19:e_oZqwczEi2Llv55cLYUGaK5b_FLfLiGgdkqe3Htf6I1@thread.tacv2/messages?$top=50&$expand=replies

However, I found that num of the returned messages could be less than total messages in channel.

(ex: I have 36 messages in total , but sometimes got 35, 28 messages)

I was sure that the nextLink or deltaLink were empty.

I wrote a script which calls the API repeatedly for 50 times, and had this issue 8 times.

I also tried on different $top value from 5 to 50, or remove $expand query, but the issue still persists

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
10,913 questions
Microsoft Teams Development
Microsoft Teams Development
Microsoft Teams: A Microsoft customizable chat-based workspace.Development: The process of researching, productizing, and refining new or existing technologies.
2,933 questions
{count} votes