Specify permissions for mail add-in access to the user's mailbox

Office Add-ins

Use the permissions model to request the appropiate mailbox access for a mail app: Restricted, ReadItem, ReadWriteItem, or ReadWriteMailbox.

Last modified: June 04, 2015

Applies to: apps for Office | Office Add-ins | Outlook

Learn more about supported hosts and other requirements.

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.

In this article
Mail app permissions model
Restricted permission
Read item permission
Read/write item permission
Read/write mailbox permission
Additional resources

You can Restricted, ReadItem, ReadWriteItem, or ReadWriteMailbox in the manifest of a mail app to request the corresponding restricted, read item, read/write item, or read/write mailbox permission to access the user's mailbox. These levels of permissions are cumulative: restricted is the lowest level, each higher level includes the permissions of all the lower levels plus some extra permissions. Read/write mailbox includes all the supported permissions.

You can see the permissions requested by a mail app before installing it from the Office Store. Only administrators can install mail apps that require the read/write mailbox permission. You can also see the required permissions of installed apps in the Exchange Admin Center.

Note Note

Starting with version 1.1 of the manifest schema, mail apps can be activated when the user is authoring an item in a compose form as well as when they are viewing an item. For information about updating your manifest schema to v1.1, see Update the manifest of a mail add-in from schema v1.0 to v1.1.

The restricted permission is the most basic level of permission. Specify Restricted in the Permissions element in the manifest to request this permission. Outlook assigns this permission to a mail app by default if the app does not request a specific permission in its manifest.

Can do

  • Get only specific entities (phone number, address, URL) from the item’s subject or body.

  • Specify an ItemIs activation rule that requires the current item in a read or compose form to be a specific item type, or ItemHasKnownEntity rule that matches any of a smaller subset of supported well-known entities (phone number, address, URL) in the selected item.

  • Access any properties and methods that do not pertain to specific information about the user or item. (See the next section for the list of members that do.)

Can't do

The read item permission is the next level of permission in the permissions model. Specify ReadItem in the Permissions element in the manifest to request this permission.

Can do

<Permissions>ReadItem</Permissions>
    <Rule xsi:type="RuleCollection" Mode="And">
    <Rule xsi:type="ItemIs" FormType = "Read" ItemType="Message" />
    <Rule xsi:type="RuleCollection" Mode="Or">
        <Rule xsi:type="ItemHasKnownEntity" 
            EntityType="PhoneNumber" />
        <Rule xsi:type="ItemHasKnownEntity" EntityType="Address" />
        <Rule xsi:type="ItemHasKnownEntity" EntityType="Url" />
        <Rule xsi:type="ItemHasKnownEntity" 
            EntityType="MeetingSuggestion" />
        <Rule xsi:type="ItemHasKnownEntity" 
            EntityType="TaskSuggestion" />
        <Rule xsi:type="ItemHasKnownEntity" 
            EntityType="EmailAddress" />
        <Rule xsi:type="ItemHasKnownEntity" EntityType="Contact" />
</Rule>

Can't do

Specify ReadWriteItem in the Permissions element in the manifest to request this permission. Mail apps activated in compose forms that use write methods (Message.to.addAsync or Message.to.setAsync) must use at least this level of permission.

Can do

Can't do

Use Mailbox.makeEWSRequestAsync.

The read/write mailbox permission is the highest level of permission. Specify ReadWriteMailbox in the Permissions element in the manifest to request this permission.

In addition to what the read/write item permission supports, by using Mailbox.makeEWSRequestAsync, you can access supported Exchange Web Services (EWS) operations to do the following:

  • Read and write all properties of any item in the user’s mailbox.

  • Create, read, and write to any folder or item in that mailbox.

  • Send an item from that mailbox

Through Mailbox.makeEWSRequestAsync, you can access the following EWS operations:

Attempting to use an unsupported operation will result in an error response.

Show:
© 2015 Microsoft