Convert Outlook REST API item id to MAPI EntryID

自闭症网瘾萝莉.ら 提交于 2019-12-04 12:53:47

Your query to the Microsoft Graph API can specify that you would like to include the PR_ENTRYID or other MAPI properties. Here is the official documentation for singleValueLegacyExtendedProperty from Microsoft.

For example, if you wanted to fetch a page of your messages and include the PR_ENTRYID, you could make a GET request to:

https://graph.microsoft.com/v1.0/me/messages?$expand=singleValueExtendedProperties($filter=id%20eq%20'Binary%200x0FFF')

Without URL encoding, the $expand statement reads: $expand=singleValueExtendedProperties($filter=id eq 'Binary 0x0FFF')

There are three valid syntaxes to filter for MAPI properties:

  1. 'MapiPropertyType namespaceGuid Name propertyName'
  2. 'MapiPropertyType namespaceGuid Id propertyId'
  3. 'MapiPropertyType propertyTag'

Note that the example above uses #3, and that 0x0FFF is the propertyTag for PR_ENTRYID per the [MS-OXPROPS] Exchange Server Protocols Master Property List.

is there an officially supported way to convert item ids from the Outlook REST API into an MAPI EntryID?

No, office.js API doesn't have anything to convert REST/EWS Id to PR_ENTRY_ID

Is there an official documentation how to convert between the id formats?

Obviously there is no documentation as of point above

Or an API to call? Would prefer a local convert functions to avoid additional REST roundtrips.

Yes, there are calls to retrieve (not convert) IMessage Id and this is exactly what you've done ... RESTful or EWS requests. With those requests you are able to get IMessage properties, including PR_ENTRY_ID. I just don't really understand what you are going to use it for? Any requests back to the message have to be done with EWS/REST Id anyway. Well, probably this is something to do with your message manipulation.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!