0

We have a function in our Outlook add-in to download CSV file. We had earlier implemented javascript "window.open" which was working fine until January 2020 and suddenly broke with Outlook(2016) update (now in version 1908 build 11929.20606). We then moved our code to displayDialogAsync api but it fails to download CSV. In fiddler trace we could see the csv response(application/octet-stream) but it does not download. We have tried creating a dummy page with download button which loads in dialog and then onclick of button invoke window.open to initiate a popup however instead of popup another dialog opens i.e. Outlook is not supporting window.open at all.

How do we handle such scenario where we have dependency of popup in our add-in? One another example is inability to implement onedrive sdk which relies on window.open.

I appreciate your help on this.

Pallav
  • 145
  • 7
  • Is this happening only with Outlook on Windows or this behavior is observed on other clients (Outlook Mac, OWA) as well? – Outlook Add-ins Team - MSFT Mar 09 '20 at 09:31
  • It works fine in OWA and only breaks in Outlook client in Windows 10. I had been looking in to older discussions in the forum below and tried to implement even Blob but it just does not work. [Opening-url-from-Outlook](https://stackoverflow.com/questions/46562117/pop-up-blocked-error-when-opening-url-from-outlook-webaddin?noredirect=1&lq=1) [Outlook-add-in-file-download](https://stackoverflow.com/questions/44101978/outlook-add-in-file-download) [Example of Blob](https://gist.github.com/rajeevprasanna/327be60b176fa4c1129aca456d9e1d57) – Pallav Mar 09 '20 at 15:36
  • I would steer clear of the OneDrive picker -- too many issues related to cross-domain and pop-ups (such as having to add lots of sites to 'trusted sites' to get cross-window communication to work). If you implement the OneDrive API directly it is better. Is the domain part of the URL in window.open in the manifest as an AppDomain? Any authentication required? – Brian Clink Mar 10 '20 at 20:31
  • Thanks for raising this topic -- in terms of the original question, we also have a feature that is impacted by this. If the Outlook Add-Ins Team has an approach to be able to download files to the computer from within clients other than Outlook Web, such as Outlook Desktop and Outlook Mobile, that would be appreciated. Otherwise we will have to disable the download feature for those clients. – Brian Clink Mar 11 '20 at 15:05
  • @BrianClink We do have the domain listed in manifest, still no luck.Thanks for your thoughts. yes, this must be resolved for Outlook client as there are multiple uses cases for file download in Outlook client across devices. As far as OneDrive API implementation, we wanted to have cloud explorer which is pretty much done by Onedrive SDK. Which absolutely works well in OWA but not supported in Outlook. – Pallav Mar 11 '20 at 15:13
  • Regarding the OneDrive SDK, Chrome works well but we've found that IE and Edge are very sensitive to the security of cross-window communication that the OneDrive SDK relies on. We needed to configure sites in Trusted Zones, including the Sharepoint URL and login.microsoftonline.com (for OAuth if no token provided ahead of time). This sounded too strict of a requirement to impose on deployment., so we developed a simple picker using the API directly. – Brian Clink Mar 11 '20 at 15:29
  • Thanks for reporting this issue regarding window.open. It has been put on our backlog. We unfortunately have no timelines to share at this point – Outlook Add-ins Team - MSFT Mar 27 '20 at 02:35
  • so this is considered as known bug now. Thanks for the update. @BrianClink thank you for quick tip on building our own. We decide to build our own and working on it. – Pallav Mar 31 '20 at 05:35

0 Answers0