I have a very strange behavior in an office outlook add-in with Edge as a host. I consider it a bug.
If your backend code sends HTTP 302 status code to redirect a user, Edge-hosted add-in opens a new browser tab, instead of performing the redirect.
Check out how it works in IE11-hosted add-in: outlook-ie11-no-issue
The same add-in Edge-hosted: outlook-edge-issue
In my code, I use simple Response. Redirect to reproduce this issue. I've created a sample VS2017 project, which reproduces the issue - https://github.com/s-KaiNet/outlook-web-addin-edge-issue
Simply deploy the add-in, run it from a message read UI, in the menu select "Issue" link.
@s-KaiNet sorry to hear that you've run into this inconsistency in behavior. I'm going to transfer this issue to the OfficeDev/office-js so that a member of the product team can provide feedback there.
@kbrandl thank you! Could you post a link to the new issue? I can't find it in the OfficeDev/office-js-docs-pr repo..
@s-KaiNet there's just one issue (i.e., this one that you're viewing now) -- I've just moved it to a different repo -- now it resides here in the OfficeDev/office-js repo as # 742.
Ah.. I haven't noticed that... thank you again! :)
@jargil are you able to investigate this issue (since it seems related to Edge Webview)?
@s-KaiNet - for this to work, you'll have to include example.com in your AppDomains list. Currently your manifest is listing the sample manifest with AppDomain1, AppDomain2, AppDomain3:
https://github.com/s-KaiNet/outlook-web-addin-edge-issue/blob/master/OutlookWebAddInIssue/OutlookWebAddInIssueManifest/OutlookWebAddInIssue.xml
Here some documentation about AppDomains:
https://docs.microsoft.com/en-us/office/dev/add-ins/reference/manifest/appdomains
@kbrandl sending it back to you to follow up.
@s-KaiNet please let us know if the information that @jargil provided helps you resolve this issue. Thanks!
Yes I resolved the issue, thank you, the name of the property AppDomains is quite confusing because domain usually doesn't include protocol part.
However, now I'm curious why it works in IE-hosted Outlook without the AppDomains entry :)
@s-KaiNet thanks for confirming! I'm going to go ahead and close this issue now, since the problem is resolved; but perhaps @jargil will be able to chime in as to _why it works in IE-hosted Outlook without the AppDomains entry_.