Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
getEntitiesByType method

Appointment.getEntitiesByType method (JavaScript API for Office)

Office Add-ins

Gets an array of entities of the specified entity type found in an appointment.

Last modified: August 11, 2015

Note Note

The name "apps for Office" is changing to "Office Add-ins". During the transition, the documentation and the UI of some Office host applications and Visual Studio tools might still use the term "apps for Office". For details, see New name for apps for Office and SharePoint.


Add-in type: Mail

Available in requirement sets


Last changed in Mailbox


Applicable Outlook modes


See all support details

var entities = Office.context.mailbox.item.getEntitiesByType(entityType);


One of the EntityType enumeration values.

An array containing all the entities of the specified entity type found in the appointment; or null if no entities of the specified type are present in the appointment.

The following example shows how to access an array of strings that represent postal addresses in the subject or body of the current item. Note that the current item in Outlook can be a Message object or an Appointment object, both of which are derived from the Item object.

// The initialize function is required for all add-ins.
Office.initialize = function () {
    // Checks for the DOM to load using the jQuery ready function.
    $(document).ready(function () {
    // After the DOM is loaded, add-in-specific code can run.
    var item = Office.context.mailbox.item;
    // Get an array of strings that represent postal addresses in the current item.
    var addresses = item.getEntitiesByType(Office.MailboxEnums.EntityType.Address);
    // Continue processing the array of addresses.

A checkmark (√) in the following table indicates that this property is supported in the corresponding Outlook host application. An empty cell indicates that the Outlook host application doesn't support this property.

For more information about Office host application and server requirements, see Requirements for running Office Add-ins.

Supported hosts, by platform

Office for Windows desktop

Office Online
(in browser)

OWA for Devices

Office for Mac


√ (Read mode only)

Available in requirement sets


Minimum permission level

ReadItem but some entities only require Restricted.

Add-in types










© 2015 Microsoft