Access to Outlook RestAPI from an Outlook web Add-in

后端 未结 2 573

I developed an Outlook Web Add-in that is working fine. It\'s a Taskpane that is available in compose mode of appointments and that collects event\'s data, adds a few ones a

2条回答
  •  粉色の甜心
    2020-12-11 20:01

    The previous answer is right, the error is because you are getting an item scoped token. Because previously Callback tokens only allowed a caller to call GetItem and GetItemAttachment REST APIs. We are making changes to the callback token so that clients can call REST of the APIs as well. The requirement is first you should have readWriteMailBox permission. Second get a REST callback token by providing isRest=true, like below

    Office.context.mailbox.getCallbackTokenAsync({ isRest: true }, function (result))
    

    The resulting token will have Mail.ReadWrite, Calendar.ReadWrite, Contacts.ReadWrite, and Mail.Send Scopes.

    That said the isRest parameter is only supported for outlook mobile client right now. The work to support it on OWA and Outlook is in progress and we expect to release it by March.

提交回复
热议问题