Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Force Outlook Add-in popup to open with embedded browser

I'm seeing an issue with my Outlook Add-in (running in Outlook 2016) where when I open a popup window using window.open, it sometimes opens in the user's default browser (e.g. Chrome) instead of the browser running the add-in (e.g. the IE11 web view embedded in Outlook 2016). This is a problem because it prevents the popup window from communicating with the add-in, which is necessary for clickjacking protection.

Is there a way to force the popup window to be opened in the same browser that is running the add-in, without using the Dialog API? I would like to support requirement set 1.3.

like image 528
Daniel Phan Avatar asked Aug 02 '17 20:08

Daniel Phan


1 Answers

You should check to see if the displayDialogAsync API exists. It was added in requirement set 1.4.

If it exists, we recommend using it. Please note that the dialog can only call the Office.context.ui.messageParent API. This API allows the dialog to communicate one-way with the add-in. The add-in can use those messages to leverage the Office.js APIs.

If the displayDialogAsync API doesn’t exist you can leverage window.open. However, in this case the default browser will not be launched.

like image 115
Outlook Add-ins Team - MSFT Avatar answered Oct 08 '22 09:10

Outlook Add-ins Team - MSFT