Export (0) Print
Expand All

Limits for activation and JavaScript API for mail apps in Outlook

apps for Office

Learn about the limits for using activation rules and JavaScript API for Office to get or set data and make asynchronous calls in mail apps.

Last modified: June 13, 2014

Applies to: Exchange Online | Exchange Server 2013 | Exchange Server 2013 SP1 | Outlook 2013 | Outlook 2013 RT | Outlook 2013 SP1 | Outlook Web App | OWA for Devices

   Office.js: v1.0, v1.1

   Apps for Office manifests schema: v1.0, v1.1

Note Note

"Outlook" in this article refers to the Outlook rich client, Outlook RT, Outlook Web App, and OWA for Devices.

In this article
Limits for activation rules
Limits for JavaScript API
Additional resources

To provide a satisfactory experience for users of mail apps, you should be aware of certain activation and API usage guidelines, and implement your mail apps to stay within these limits. These guidelines exist so that an individual mail app cannot require Exchange Server or Outlook to spend an unusually long period of time to process its activation rules or calls to the JavaScript API for Office, affecting the overall user experience for Outlook and other mail apps. These limits apply to designing activation rules in the app manifest, and using custom properties, roaming settings, recipients, Exchange Web Services (EWS) requests and responses, and asynchronous calls.

Note Note

If your mail app runs on the Outlook rich client or Outlook RT, you must also verify that the app performs within certain run-time resource usage limits. See Following resource usage rules in apps for Office for more details.

Follow these guidelines when designing activation rules for mail apps:

  • Limit the size of the manifest to 32 KB. You cannot install the mail app for an Exchange mailbox if you exceed that limit.

  • Specify up to 15 activation rules for the mail app. You cannot install the mail app if you exceed that limit.

  • If you use an ItemHasKnownEntity rule on the body of the selected item, expect the Outlook rich client and Outlook RT to apply the rule against only the first 1 MB of the body and not to the rest of the body over that limit. Your mail app would not be activated if matches exist only after the first MB of the body. If you expect that to be a likely scenario, re-design your conditions for activation.

  • If you use regular expressions in ItemHasKnownEntity or ItemHasRegularExpressionMatch rules, be aware of the following limits and guidelines that generally apply to any Outlook host, and those described in tables 1, 2 and 3 that differ depending on the host:

    • Specify up to only 5 regular expressions in activation rules in a mail app. You cannot install a mail app if you exceed that limit.

    • Specify regular expressions such that the results you anticipate are returned by the getRegExMatches method call within the first 50 matches.

    • Can specify look-ahead assertions in regular expressions, but not look-behind, (?<=text), and negative look-behind (?<!text).

    Table 1 lists the limits and describes the differences in the support for regular expressions between the Outlook rich client or Outlook RT, and Outlook Web App or OWA for Devices. The support is independent of any specific type of device and item body.

    Table 1. General differences in the support for regular expressions

    Outlook rich client or Outlook RT

    Outlook Web App or OWA for Devices

    Uses the C++ regular expression engine provided as part of the Visual Studio standard template library. This engine complies with ECMAScript 5 standards.

    Uses regular expression evaluation that is part of JavaScript, is provided by the browser, and supports a superset of ECMAScript 5.

    Because of the different regex engines, expect a regex that includes a custom character class based on predefined character classes may return different results in the Outlook rich client or Outlook RT than in Outlook Web App or OWA for Devices.

    As an example, the regex "[\s\S]{0,100}" matches any number, between 0 and 100, of single characters that is a white space or a non-white-space. This regex returns different results in the Outlook rich client and Outlook RT than Outlook Web App and OWA for Devices. You should rewrite the regex as ""(\s|\S){0,100}" as a work-around. This workaround regex matches any number, between 0 and 100, of white space or non-white space.

    You should test each regex thoroughly on each Outlook host, and if a regex returns different results, rewrite the regex.

    You should test each regex thoroughly on each Outlook host, and if a regex returns different results, rewrite the regex.

    By default, limits the evaluation of all regular expressions for a mail app to 1 second. Exceeding this limit causes reevaluation of up to 3 times. Beyond the reevaluation limit, the Outlook rich client or Outlook RT disables the mail app from running for the same mailbox in any of the Outlook host.

    Administrators can override these evaluation limits by using the OutlookActivationAlertThreshold and OutlookActivationManagerRetryLimit registry keys.

    Do not support the same resource monitoring or registry settings as in the Outlook rich client and Outlook RT. But mail apps with regular expressions that require excessive amount of evaluation time on the Outlook rich client or Outlook RT are disabled for the same mailbox on all the Outlook hosts.

    Table 2 lists the limits and describes the differences in the portion of the item body that the each of the Outlook applies a regular expression. Some of these limits depend on the type of device and item body, if the regular expression is applied on the item body.

    Table 2. Limits on the size of the item body evaluated

    Outlook rich client or Outlook RT

    Outlook Web App, OWA for Devices,OWA for iPad or OWA for iPhone

    Outlook Web App

    Form factor

    Any supported device

    Android smartphones, iPad or iPhone

    Any supported device other than Android smartphones, iPad and iPhone

    Plain text item body

    Applies the regex on the first 1 MB of the data of the body, but not on the rest of the body over that limit.

    Activates the app only if the body < 16,000 characters.

    Activates the app only if the body < 500,000 characters.

    HTML item body

    Applies the regex on the first 512 KB of the data of the body, but not on the rest of the body over that limit. (The actual number of characters depends on the encoding which can range from 1 to 4 bytes per character.)

    Applies the regex on the first 64,000 characters (including HTML tag characters), but not on the rest of the body over that limit.

    Activates the app only if the body < 500,000 characters.

    Table 3 lists the limits and describes the differences in the matches that each of the Outlook hosts returns after evaluating a regular expression. The support is independent of any specific type of device, but may depend on the type of item body, if the regular expression is applied on the item body.

    Table 3. Limits on the matches returned

    Outlook rich client or Outlook RT

    Outlook Web App or OWA for Devices

    Order of returned matches

    Assume getRegExMatches returns matches for the same regular expression applied on the same item is different in the Outlook rich client or Outlook RT than in Outlook Web App or OWA for Devices.

    Assume getRegExMatches returns matches in different order the Outlook rich client or Outlook RT than in Outlook Web App or OWA for Devices.

    Plain text item body

    getRegExMatches returns any matches that are up to 1,536 (1.5 KB) characters, for a maximum of 50 matches.

    Note Note

    getRegExMatches does not return matches in any specific order in the returned array. In general, assume the order of matches in the Outlook rich client or Outlook RT for the same regular expression applied on the same item is different from that in Outlook Web App and OWA for Devices.

    getRegExMatches returns any matches that are up to 3,072 (3 KB) characters, for a maximum of 50 matches.

    HTML item body

    getRegExMatches returns any matches that are up to 3,072 (3 KB) characters, for a maximum of 50 matches.

    Note Note

    getRegExMatches does not return matches in any specific order in the returned array. In general, assume the order of matches in the Outlook rich client or Outlook RT for the same regular expression applied on the same item is different from that in Outlook Web App and OWA for Devices.

    getRegExMatches returns any matches that are up to 3,072 (3 KB) characters, for a maximum of 50 matches.

Aside from the preceding guidelines for activation rules, each of the Outlook hosts enforces certain limits in the JavaScript object model, as described in Table 4.

Table 4. Limits to get or set certain data using the JavaScript API for Office

Feature

Limit

Related API

Description

Custom properties

2,500 characters

CustomProperties object

Item.loadCustomPropertiesAsync method

Limit for all custom properties for an appointment or message item. All the Outlook hosts return an error if the total size of all custom properties of a mail app exceeds this limit.

Roaming settings

32 KB number of characters

RoamingSettings object

Context.roamingSettings property

Limit for all roaming settings for the mail app. All the Outlook hosts return an error if your settings exceed this limit.

Extracting well-known entities

2,000 number of characters

Appointment.getEntities method

Appointment.getEntitiesByType method

Appointment.getFilteredEntitiesByName method

Message.getEntities method

Message.getEntitiesByType method

Message.getFilteredEntitiesByName method

Limit for Exchange Server to extract well-known entities on the item body. Exchange Server ignores entities beyond that limit. Note that this limit is independent of whether the mail app uses an ItemHasKnownEntity rule.

Exchange Web Services

1 MB number of characters

Mailbox.makeEwsRequestAsync method

Limit for a request or response to a Mailbox.makeEwsRequestAsync call.

Recipients

100 recipients

Appointment.requiredAttendees property

Appointment.optionalAttendees property

Appointment.resources property

MeetingRequest.requiredAttendees property

MeetingRequest.optionalAttendees property

MettingRequest.resources property

Message.to property

Message.cc property

Recipients.addAsync method

Recipient.getAsync method

Recipient.setAsync method

Limit for the recipients specified in the requiredAttendees or optionalAttendees properties for the Appointment or MeetingRequest object, or each of the to and cc properties in a Message object,

Display name

255 characters

EmailAddressDetails.displayName property

Recipients object

Appointment.requiredAttendees property

Appointment.optionalAttendees property

Appointment.resources property

MeetingRequest.requiredAttendees property

MeetingRequest.optionalAttendees property

MettingRequest.resources property

Message.to property

Message.cc property

Limit for the length of a display name in an appointment or message.

Setting the subject

255 characters

Mailbox.displayNewAppointmentForm method

Subject.setAsync method

Limit for the subject in the new appointment form, or for setting the subject of an appointment or message.

Setting the location

255 characters

Location.setAsync method

Limit for setting the location of an appointment or meeting request.

Body in a new appointment form

32 KB number of characters

Mailbox.displayNewAppointmentForm method

Limit for the body in a new appointment form.

Displaying the body of an existing item

32 KB number of characters

Mailbox.displayAppointmentForm method

Mailbox.displayMessageForm method

For Outlook Web App and OWA for Devices: limit for the body in an existing appointment or message form.

Setting the body

1 MB number of characters

Body.prependAsync method

Body.setSelectedDataAsync method

Limit for setting the body of an appointment or message item.

Number of attachments

499 files on Outlook Web App and OWA for Devices

Appointment.addFileAttachmentAsync method

Message.addFileAttachmentAsync method

Limit for the number of files that can be attached to an item for sending. Outlook Web App and OWA for Devices generally limit attaching up to 499 files, through the user interface and addFileAttachmentAsync. The Outlook rich client and Outlook RT do not specifically limit the number of file attachments. However, all Outlook hosts observe the limit for the size of attachments that user's Exchange Server has been configured with. See the next row for "Size of attachments".

Size of attachments

Dependent on Exchange Server

Appointment.addFileAttachmentAsync method

Message.addFileAttachmentAsync method

There is a limit on the size of all the attachments for an item, which an administrator can configure on the Exchange Server of the user's mailbox.

For the Outlook rich client and Outlook RT, this limits the number of attachments for an item. For Outlook Web App and OWA for Devices, the lesser of the 2 limits - the number of attachments and the size of all attachments - restricts the actual attachments for an item.

Attachment filename

255 characters

Appointment.addFileAttachmentAsync method

Message.addFileAttachmentAsync method

Limit for the length of the filename of an attachment to be added to an item.

Attachment URI

2048 characters

Appointment.addFileAttachmentAsync method

Message.addFileAttachmentAsync method

Limit of the URI of the filename to be added as an attachment to an item.

Attachment ID

100 characters

Appointment.addItemAttachmentAsync method

Appointment.removeAttachmentAsync method

Message.addItemAttachmentAsync method

Message.removeAttachmentAsync method

Limit for the length of the ID of the attachment to be added to or removed from an item.

Asynchronous calls

3 calls

Appointment.addFileAttachmentAsync method

Appointment.addItemAttachmentAsync method

Appointment.removeAttachmentAsync method

Body.getTypeAsync method

Body.prependAsync method

Body.setSelectedDataAsync method

CustomProperties.saveAsync method

Item.LoadCustomPropertiesAysnc method

Location.getAsync method

Location.setAsync method

Mailbox.getCallbackTokenAsync method

Mailbox.getUserIdentityTokenAsync method

Mailbox.makeEwsRequestAsync method

Message.addFileAttachmentAsync method

Message.addItemAttachmentAsync method

Message.removeAttachmentAsync method

Recipients.addAsync method

Recipient.getAsync method

Recipient.setAsync method

RoamingSettings.saveAsync method

Subject.getAsync method

Subject.setAsync method

Time.getAsync method

Time.setAsync method

For Outlook Web App or OWA for Devices: limit of the number of simultaneous asynchronous calls at any one time, as browsers allow only a limited number of asynchronous calls to servers.

Show:
© 2014 Microsoft