问题
I am using graph.microsoft.com to fetch the exchange online folders and messages. But I am not getting the size of the message and folders in the response. Is there any way to get the message size using the graph Api. Although the size of the attachments is returned in the response. Another problem I am facing is I am not able to fetch all the folders in a mailbox. I was able to fetch all the folders using Exchange Web Service. I have checked the permission level of the folders which were not fetched by the graph api but there was no any such subtle differences when I compared them with the discovered ones.
回答1:
The Message entity doesn't have a size property. You could suggest one at http://officespdev.uservoice.com/.
You should be able to get folders, as long as their visible to normal clients. Which folders can you not get?
回答2:
You can get the message size by expanding the "PidTagMessageSize" extended property, in the following way:
GET https://outlook.office.com/api/v2.0/users/USER@MyOrg.onmicrosoft.com/messages/?$expand=SingleValueExtendedProperties($filter=PropertyId eq 'LONG 0x0E08')
For extra information: https://msdn.microsoft.com/en-us/library/office/cc842471.aspx
回答3:
For Microsoft Graph API v1.0
Sharon's answer will need to be tweaked and the URL becomes
https://graph.microsoft.com/v1.0/me/mailFolders/Inbox/messages?$expand=singleValueExtendedProperties($filter=Id eq 'LONG 0x0E08')
Exchange Server Protocols Master Property List: https://docs.microsoft.com/en-us/openspecs/exchange_server_protocols/ms-oxprops/f6ab1613-aefe-447d-a49c-18217230b148
来源:https://stackoverflow.com/questions/34896696/how-to-get-the-message-size-of-exchange-online-using-microsoft-graph-api