'InvalidAudience' error returned when invoking Outlook REST API

风格不统一 提交于 2019-12-30 11:22:09

问题


We have a Web Add-in in Outlook that has the ReadWriteMailbox permissions. And we use following code to get REST Token successfully:

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

but we got 'InvalidAudience' error

"error":{"code":"InvalidAudience","message":"The audience claim value is invalid \'https://outlook.sample.com\'"}

when calling Outlook REST APIs against one specific mail server (e.g., https://outlook.sample.com).

  • [https://outlook.office.com/api/v2.0/me/calendarview]
  • [https://outlook.office.com/api/v2.0/me/events]

However, based on above configuration and approach, we don't find any issue against Office365 and some other enterprise Exchange servers. Is there any special setting/configuration on Exchange server can resolve the 'InvalidAudience' problem?

来源:https://stackoverflow.com/questions/53878657/invalidaudience-error-returned-when-invoking-outlook-rest-api

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!