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?