Search code examples
office-jsoffice-addinsoutlook-web-addins

Opening same origin page in default browser from outlook add-in


I have an outlook add-in using office.js. The add-in uses requirement set 1.5. If the addin is opened in the browser, it behaves as expected. (links with target set to "_blank" open in new tab, regardless of origin) When clicking a link that has the same origin as the apps SourceLocation, and the target is set to "_blank", the page is opened in a small browser within outlook, rather than opening in the users default browser.

I have tested on the following versions:

Same domain links open in the popup window:

Windows 10 Enterprise
    Version 1903
    Build 18362.418
Outlook
    Version 1908 
    Build 11929.20388 Click-to-Run

Windows 10 Enterprise
    Version 1903
    Build 18362.418
Outlook
    Version 1908 
    Build 11929.20300 Click-to-Run

Works as intended (opens in default browser) :

macOS 
    Mojave 
    version 10.14.6 
Outlook:
    Version 16.29 (19090802)

Windows 10 Enterprise
    Version 1803
    Build 17134.766
Outlook
    Version 1908 
    Build 11929.20300 Click-to-Run

Windows 10 Enterprise
    Version 1809
    Build 17763.557
Outlook
    Version 1803 
    Build 9126.2275 Click-to-Run

I believe this issue started with a recent update to either windows or outlook : around the same time the add-in started to use Edge rather than IE. Note that when tested on mac, a page opened using window.open(URL, '_blank'); opens in a popup browser rather than the users default browser if the url being opened has the same origin as the apps SourceLocation.


Solution

  • The behavior that you're seeing is by design. New windows are opened with Edge if it is the same domain in order to support using cookies to pass data to the window.