We have a mailapp addin implemented. We have encountered a strange error if we installed the addin in mailbox, which is in Excahnge 2016. There is some problem with EWS requet. We are using office.js to make request to exchange 2016.
makeEwsRequestAsync(data, callback, [userContext])
The above method is used to communicate with exchange. So if mailapp is installed on Exchange 2016 and we request some additional properties from email via above function we receive an asyncResult object with error:
- error code: 9020
- message: Remote server returned an error: (401 Unauthorized)
In documentation there is a note that in exchange the OAuth should be enabled.
NOTE: The server administrator must set OAuthAuthentication to true on the Client Access Server EWS directory to enable the makeEwsRequestAsync method to make EWS requests
We have checked this setting and it is set up. What else should we check? Any suggestion?