Marshiya
Marshiya

Reputation: 13

Count of messages in mailbox using Outlook REST API

https://outlook.office.com/api/v2.0/me/messages?$count=true seems to return wrong value. Though I have only 31 messages in the mailbox, it gives count as 201. Has anyone been able to get the correct count of messages using the above API?

Also, Is there any other Outlook REST API that can be used to get the count of messages in the outlook mailbox?

Upvotes: 1

Views: 2059

Answers (1)

Jason Johnston
Jason Johnston

Reputation: 17702

Querying /me/messages?$count=true will return the total across all folders in your mailbox. When you say only 31 messages, do you mean in the Inbox, or across all of your folders?

Upvotes: 3

Related Questions