问题
We have an Outlook (Office JS) Add-in with a manifest configured to support shared folders, i.e.
<SupportsSharedFolders>true</SupportsSharedFolders>
The add-in has been running flawlessly, for many months, on a number of machines that meet the minimum requirement set of 1.8 for shared folder support. Since 22-Apr-2020 it has returned the following error when selecting an email in a shared email inbox:
Status Code: 404
ErrorInvalidMailboxItemId - Item Id doesn't belong to the current mailbox
The REST API call that returns this error is:
https://outlook.office.com/api/v2.0/me/messages/<RestID>/
Where <RestID>
is created from: Office.context.mailbox.convertToRestId(Office.context.mailbox.item.itemId, Office.MailboxEnums.RestVersion.v2_0)
Has an API change been documented anywhere?
Do we need to modify our code?
回答1:
This is not a recent change. The REST URL should be constructed based on the SharedProperties descrbied here https://docs.microsoft.com/en-us/javascript/api/outlook/office.sharedproperties?view=outlook-js-1.8 Note that the SharedProperties API is only available for shared items.
来源:https://stackoverflow.com/questions/61597663/outlook-add-in-rest-api-in-shared-inbox-fails-errorinvalidmailboxitemid-item