I am developing Outlook Add-In that will run over all modern browsers, android and iOS.
I am using Managed EWS API to fetch the email and its attachment by passing ewsUrl
, itemId
and ewsToken
in OAuthCredentials
class which is my remote service.
I am getting ewsToken
by using Office.js getCallbackTokenAsync
method from UI and passing all this information to my remote service to use the Managed EWS API to fetch email from exchange server.
For browsers it works fine but when we use Outlook Mobile on Android, ewsUrl
returns null
which I hard-coded to https://outlook.office365.com/ews/exchange.asmx
but now I am getting 401 unauthorized
error.
How can I identify if ewsToken
or itemId
is wrong?
Per the documentation, EWS functions are not supported by Outlook for Android or Outlook for iOS. This includes ewsUrl
, convertToEwsId
and other methods related to calling into EWS.
I recommend visiting the UserVoice and adding your suggestion.
来源:https://stackoverflow.com/questions/46804213/outlook-365-addin-throws-401-unauthorized-error-on-android-outlook-mobile-app