Can't save a meeting as a draft in Outlook for Mac by using Office JS API
Original KB number: 4505745
Symptoms
Microsoft Outlook for Mac doesn't support saveAsync on a meeting in Compose mode. Outlook add-ins can't get the item identifier. It means that the add-ins can't uniquely identify and communicate with Microsoft Exchange to update or listen for changes on the item.
Workaround
To work around this issue, you can set an extended property (customProperty: Office JS API) on the item. An extended property is part of the item and is available on Exchange as soon as the item is sent. Therefore, the add-in can query or listen to items that have this extended property set.
To set the property, follow these steps:
Select one of the following APIs to use:
- EWS
- REST
- Graph
Get a valid token for each API set:
- EWS: Use getCallbackTokenAsync
- REST: Use getCallbackTokenAsync with options.isRest = true
- Graph: Use onBehalfOf token
Query or listen for calendar events:
Find the corresponding extended property on Exchange:
EWS:
ExtendedFieldURI {PropertySet = PS_PUBLIC_STRINGS, PropertyName = cecp-<add-in id from manifest>}
REST/Graph:
SingleValueExtendedProperties { PropertyId = String {00020329-0000-0000-c000-000000000046} Name cecp-<add-in id from manifest>}
Use the notification that's sent to the webhook to update the backend with itemId when the subscription is successful.