Outlook add-in API preview requirement set

The Outlook add-in API subset of the Office JavaScript API includes objects, methods, properties, and events that you can use in an Outlook add-in.

Preview APIs are subject to change and aren't intended for use in a production environment. We recommend that you try them out in test and development environments only. Don't use preview APIs in a production environment or within business-critical documents.

To use preview APIs:

  • You must use the preview version of the Office JavaScript API library from the Office.js content delivery network (CDN). The type definition file for TypeScript compilation and IntelliSense is found at the CDN and DefinitelyTyped. You can install these types with npm install --save-dev @types/office-js-preview (be sure to remove the types for @types/office-js if you've previously installed them).

  • You may need to join the Microsoft 365 Insider program for access to more recent Office builds in Outlook on Windows and on Mac.

  • You may need to configure the Targeted release option on your Microsoft 365 tenant to preview features in Outlook on the web. For more information, see the "Targeted release" section of Set up the Standard or Targeted release options.

The preview requirement set includes all of the features of requirement set 1.13.

Important

This documentation is for a preview requirement set. This requirement set isn't fully implemented yet, and clients won't accurately report support for it. You shouldn't specify this requirement set in your add-in manifest.

Features in preview

The following features are in preview.

Activate an event-based add-in on a message in read mode

OnMessageReadWithCustomAttachment and OnMessageReadWithCustomHeader events

Added events to activate an event-based add-in on a message in read mode when it contains certain attachment types or custom internet headers.

Available in: Outlook on Windows (Microsoft 365 subscription)

HeaderName attribute in the LaunchEvent element

Added an attribute to the <LaunchEvent> XML element to specify the internet header name on which the OnMessageReadWithCustomHeader event occurs.

Available in: Outlook on Windows (Microsoft 365 subscription)

MessageAttachments element

Added an XML element to specify the file extension of the attachment included in a message on which the OnMessageReadWithCustomAttachment event occurs.

Available in: Outlook on Windows (Microsoft 365 subscription)




Additional calendar properties

Office.IsAllDayEvent

Added a new object that represents the all-day event property of an appointment in compose mode.

Available in: Outlook on Windows (Microsoft 365 subscription)

Office.Sensitivity

Added a new object that represents the sensitivity level of an appointment in compose mode.

Available in: Outlook on Windows (Microsoft 365 subscription), Outlook on Mac (Microsoft 365 subscription), Outlook on the web (modern), new Outlook on Windows (preview)

Office.context.mailbox.item.isAllDayEvent

Added a new property that represents if an appointment is an all-day event.

Available in: Outlook on Windows (Microsoft 365 subscription)

Office.context.mailbox.item.sensitivity

Added a new property that represents the sensitivity of an appointment.

Available in: Outlook on Windows (Microsoft 365 subscription), Outlook on Mac (Microsoft 365 subscription), Outlook on the web (modern), new Outlook on Windows (preview)

Office.MailboxEnums.AppointmentSensitivityType

Added a new enum AppointmentSensitivityType that represents the sensitivity options available on an appointment.

Available in: Outlook on Windows (Microsoft 365 subscription), Outlook on Mac (Microsoft 365 subscription), Outlook on the web (modern), new Outlook on Windows (preview)




Additional message members

Office.context.mailbox.item.inReplyTo

Added a property to get the message ID of the original message being replied to by the current message.

Available in: Outlook on Windows (Microsoft 365 subscription)

Office.context.mailbox.item.getConversationIndexAsync

Added a method to get the Base64-encoded position of the current message in a conversation thread.

Available in: Outlook on Windows (Microsoft 365 subscription)

Office.context.mailbox.item.getItemClassAsync

Added a method to get the Exchange Web Services (EWS) item class of a message in compose mode.

Available in: Outlook on Windows (Microsoft 365 subscription)




Close and discard a message in compose

Office.context.mailbox.item.closeAsync

Added method to close a current message being composed with the option to discard unsaved changes.

Available in: Outlook on Windows (Microsoft 365 subscription)




Get the URL of the JavaScript runtime of an add-in

Office.context.urls.javascriptRuntimeUrl

Added property to get the URL of the JavaScript runtime of an add-in.

Available in: Outlook on Windows (Microsoft 365 subscription)




Integrated spam reporting

ReportPhishingCommandSurface extension point

Added an extension point to activate your spam-reporting add-in in the Outlook ribbon and prevent it from appearing at the end of the ribbon or in the overflow section.

Available in: Outlook on Windows (Microsoft 365 subscription), Outlook on Mac (Microsoft 365 subscription), Outlook on the web (modern), new Outlook on Windows (preview)

ReportPhishingCustomization element

Added a manifest element to configure the ribbon button and preprocessing dialog of a spam-reporting add-in.

Available in: Outlook on Windows (Microsoft 365 subscription), Outlook on Mac (Microsoft 365 subscription), Outlook on the web (modern), new Outlook on Windows (preview)

Office.context.mailbox.item.getAsFileAsync

Added a method to get the Base64 encoding of a message.

Available in: Outlook on Windows (Microsoft 365 subscription), Outlook on Mac (Microsoft 365 subscription), Outlook on the web (modern), new Outlook on Windows (preview)

Office.SpamReportingEventCompletedOptions

Created options to customize a post-processing dialog or configure a spam-reporting add-in to perform additional operations on a reported message, such as deleting it from the inbox.

Available in: Outlook on Windows (Microsoft 365 subscription), Outlook on Mac (Microsoft 365 subscription), Outlook on the web (modern), new Outlook on Windows (preview)

Office.MailboxEnums.MoveSpamItemTo

Added a new enum to specify the folder to which a reported message is moved once it's processed by a spam-reporting add-in.

Available in: Outlook on Windows (Microsoft 365 subscription), Outlook on Mac (Microsoft 365 subscription), Outlook on the web (modern), new Outlook on Windows (preview)

To learn more about how to implement the integrated spam-reporting feature in your add-in, see Implement an integrated spam-reporting add-in (preview).




Item multi-select: Additional message properties

Office.SelectedItemDetails

The ability to get the properties of selected messages in Outlook using Office.context.mailbox.getSelectedItemsAsync was introduced in requirement set 1.13. Additional properties, such as conversationId, internetMessageId, and hasAttachment, are now available in preview.

Available in: Outlook on Windows (Microsoft 365 subscription)




Office theme

Office.context.officeTheme

Added ability to get Office theme.

Available in: Outlook on Windows (Microsoft 365 subscription)

Office.EventType.OfficeThemeChanged

Added OfficeThemeChanged event to Mailbox.

Available in: Outlook on Windows (Microsoft 365 subscription)




Smart Alerts: Customize the Don't Send option and override the send mode option at runtime

Office.SmartAlertsEventCompletedOptions: Additional options

Added additional event.completed options to customize the Don't Send button of the Smart Alerts dialog and override the send mode option at runtime.

Available in: Outlook on Windows (Microsoft 365 subscription)

Office.MailboxEnums.SendModeOverride

Added an enum to specify the send mode option that overrides the option set in the manifest at runtime.

Available in: Outlook on Windows (Microsoft 365 subscription)

To learn how to implement these features, see the Smart Alerts walkthrough.




Temporarily set the body or subject displayed in read mode

Office.context.mailbox.item.display

Added a property that gets an object to temporarily set the content displayed in the body or subject of a message in read mode.

Available in: Outlook on Windows (Microsoft 365 subscription)

Office.Display

Added an object that provides properties to temporarily set the content displayed in the body or subject of a message in read mode.

Available in: Outlook on Windows (Microsoft 365 subscription)

Office.DisplayedBody

Added an object that provides a method to temporarily set the content displayed in the body of a message in read mode.

Available in: Outlook on Windows (Microsoft 365 subscription)

Office.DisplayedSubject

Added an object that provides a method to temporarily set the content displayed in the subject of a message in read mode.

Available in: Outlook on Windows (Microsoft 365 subscription)




See also