首页 > 解决方案 > Outlook.MAPIFolder 和 Office 365 API 之间的 CalendarID 不同

问题描述

目前,我在 Outlook 应用程序中使用 Microsoft.Office.Interop.Outlook.MAPIFolder,并https://outlook.office365.com/api/v2.0/me/calendars在 Office 365 api 中使用此 API 来获取 CalendarID。

但是结果中有不同的 CalendarID。为什么会有这种差异?

标签: microsoft-graph-apioffice365

解决方案


这些是不同的 API,例如,一个是 MAPI,一个是 REST,因此它们具有不同的 Id 格式。您可以使用 Graph API(或 EWS)在格式https://docs.microsoft.com/en-us/graph/api/user-translateexchangeids?view=graph-rest-1.0&tabs=http之间转换 Id 。您也可以使用 PR_EntryId 扩展属性https://docs.microsoft.com/en-us/previous-versions/office/office-365-api/api/version-2.0/extended-properties-rest-operations应该与您从 MAPI 获得的任何 CalendarId 匹配的 REST API。


推荐阅读