Why Total Messages Count From outlook Storage statistics not exactly matching with Graph API total messages

Dharmendra Vishwakarma 40 Reputation points
2024-04-19T08:53:57.28+00:00

Hello Support Team,

I am using Graph API from long time to fetch all messages of a user mailbox with GET /messages endpoint But recently observed that for Big mailboxes (having more than 40 thousands messages) there is discrepancy between total message count from Storage statistics of outlook for a mailbox and Graph API total messages fetched(by pagination).
Mostly we observed that Graph API have somewhat more messages as compare to the total messages can be count and sum up from storage statistics of outlook.

For Example:

I have a mailbox with thousands messages in the mailbox:
So there Outlook Storage statistics, Total Message Count Sum = 44701
User's image

But When Checked on Graph API that return message in total 44712 :
User's image

So we can see clearly the difference is of 11 messages which are extra recieved from Graph API, although I am not to exactly figure out what are this extra 11 messages in the vast list of 44K + messages. I have tried to synchronize Storage statistics by refreshing the mailbox but didn't helped. Does graph API returning any kind of hidden messages in the response as well? what could be the reason?
Even I have tried with multiple big mailboxes and there also same discrepancy. One mailbox having 180K messages, where storage statistics 179811 and graph API fetched 180071 messages where graph API returned 268 extra messages.

Could please help me understand technically, what are possibilities of this cause and is there any we sync the numbers
Thanks

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

Accepted answer
  1. Bruce Jing-MSFT 615 Reputation points Microsoft Vendor
    2024-04-22T09:39:42.9833333+00:00

    Hi,

    Based on the photo you provided, the storage page doesn't show the Recoverable Items emails, and the Graph API reads all the emails, so that would result in the storage number being less than the number read by the Graph API. Here's a screenshot of my test.

    User's imageUser's image

    Also, after discussion with Graph engineer, we found that the newer versions of OWA didn’t include Outbox folder in Storage, which also cause the number mismatch.


0 additional answers

Sort by: Most helpful