Our team has been investigating an issue on our side relating to Outlook Online and loading our add-in. What appears to be our issue is that we have a dialog (set to not display in frame) on login, which after a successful login messages our component in the task pane with login information as well as instructions to close said dialog.
What we have been experiencing is that the dialog does not close, nor is the message sent to the parent. There were no error logs or network output that the sign-in was unsuccessful, so as part of a set of investigations we performed, we created a test application that simply focuses on opening and closing a dialog from the task pane.
Our previous investigations indicated that our add-ins performed the described behavior as expected for Word, Excel and PowerPoint Online in all browsers, but for Outlook Online the dialog only successfully closed and messaged the task pane component in IE11 and Edge. For Outlook Online we confirmed that it was not working as expected in Chrome, Safari, Firefox and Edge Chromium (These are the browsers we tested with additional to IE11 and Edge).
To reduce the chances that this issue could be caused by some of the logic on our side, we made the test application you can find here (with readme included to help with this investigation). We tested opening a dialog – setting it to not display in frame - and then clicking a button from the dialog which sends a message back to the parent.
If this message was received by the parent, it would call dialog.close() and the dialog pop-up would close. From our findings we could determine the following:
We also tested this by hosting the application as well as running it locally on one of our dev machines and experienced the same issues. There’s no error output anywhere, so we’re kind of stumped on where to go forward with this.
Potentially we think that we may have to approach this differently to work for Outlook Online in different environments, but we’re not sure what options we have to solve this. The other thing that could potentially be different is that we are missing a configuration in our manifest file for Outlook (which you can also find in the linked repository, the file is called manifest.xml – the manifest we used to test office is called manifest_office.xml).
We would appreciate any input on the linked repo as to where we could be going wrong.
The Outlook JS is (correctly, according to documentation) requires that each entry in AppDomains has a protocol. The first entry in the manifest.xml, which also appears to be present in a lot of github examples which have not been updated to conform to documentation, is contoso.com which has no protocol stated. When checking for whether it will send a message to the parent window, this contoso.com entry without the protocol stated shortcircuited testing any further AppDomain entries, and no message is sent. Please remove the contoso.com and verify that each AppDomain entry has the protocol included, i.e. https://example.com