Mailbox.getCallbackTokenAsync method (JavaScript API for Office v1.1)

JavaScript API for Office v1.1

Gets a string that contains a token used to get an attachment or item from an Exchange Server.

Last modified: June 12, 2014

Applicable Outlook modes


Available in requirement sets


Office.context.mailbox.getCallbackTokenAsync(callback, userContext);


The method to call when the asynchronous load operation is complete. Required.


Any state data that is passed to the asynchronous method. Optional.

The getCallbackTokenAsync method makes an asynchronous call to get an opaque token from the Exchange Server that hosts the user's mailbox. When the server responds, the method specified by the callback parameter is called with one parameter, the result object. The result object has the following two properties:

  • Context — Contains the data in the userContext parameter.

  • Value — Contains the token.

You can pass the token and an attachment identifier or item identifier to a third-party system. The third-party system uses the token as a bearer authorization token to call the Exchange Web Services (EWS) GetAttachment or GetItem operation to return an attachment or item.

Your app must have the ReadItem permission specified in its manifest to call the getCallbackTokenAsync method.

App types

Mail app

Supported clients

Outlook 2013, Outlook 2013 SP1, Outlook 2013 RT, Outlook Web App, and OWA for Devices





© 2014 Microsoft