Office 365 API query $count (on messages) is not allowed since 23-06-2015
thread on msdn:
I have WebService tool which connect to Office365 Outlook with API.
I'm using few methods to query Mail objects:
and Get Mesages with $count query: https://outlook.office365.com/api/v1.0/me/messages/$count
Everything was working ok, but since 2015-06-23 there are errors in method with $count query. When I try to do these queries directly in Internet Explorer I get "HTTP 405 - Method not allowed"
Why it is not working now
Other methods works correct
Jerzy Sambor commented
Your query works simply like https://outlook.office365.com/api/v1.0/me/messages?
... and give in response messages, not count
... $count should by placed after slash "/" to works correctly - that is Odata specification
I ran into this as well, and it appears you can do:
And the "@odata.count" property is what you want. I have no idea if/where this is documented.