OfficeDev / office-js

A repo and NPM package for Office.js, corresponding to a copy of what gets published to the official "evergreen" Office.js CDN, at https://appsforoffice.microsoft.com/lib/1/hosted/office.js.
https://learn.microsoft.com/javascript/api/overview
Other
670 stars 96 forks source link

REST token acquisition via getCallbackTokenAsync yields HTTP-403 in Windows Outlook client. #4102

Closed glr0221 closed 6 months ago

glr0221 commented 7 months ago

Provide required information needed to triage your issue

One of our customers is reporting that their REST-capable addin works perfectly fine in OWA but fails with an error 403 when used in their M365 Windows Outlook client. Upon investigation, we found that the cause of the 403-error is the following call :

Office.context.mailbox.getCallbackTokenAsync({ isRest: true }

Apologies in advance if we cannot reproduce this issue in any of our environments and could not give an exact set of steps to reproduce.

Your Environment

Expected behavior

We expect that the authentication will work in OWA or in Windows Outlook client.

Current behavior

Currently OWA works correctly and can get the REST token. Windows outlook client of the said version fails in getting the token and returns error 403.

Steps to reproduce

Currently, this issue can only be reproduced in the customer's environment.

Link to live example(s)




Provide additional details

We have checked the customer's EWS allow list, block list and access policy but could not find anything that might cause this issue.

Context

Currently, they cannot use our addin on their outlook clients. We tested with the Message Header Analyzer (MHA) addin, and it worked in both OWA and Outlook clients.

What configuration/setting/policy can cause the failure of authentication via getCallbackTokenAsync in our addin for windows outlook clients? Thank you.

Useful logs

Thank you for taking the time to report an issue. Our triage team will respond to you in less than 72 hours. Normally, response time is <10 hours Monday through Friday. We do not triage on weekends.

preethikakiru commented 7 months ago

Thanks for your question @glr0221, @exextoc will be able to provide you more information on this question.

glr0221 commented 6 months ago

@preethikakiru @exextoc

Our customer was able to resolve this issue by enabling EWS for their environment. I don't understand completely how this got resolved and by what PowerShell command(s) they resolved this.

Thank you very much for your patience on this.

glr0221 commented 6 months ago

Closing this ticket as resolved.