Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is Office.context.ui.messageParent broken in Outlook 2016 for Mac?

I'm working on an Outlook addin using the new Office-JS apis, and in building out the authentication flow, I've found that in the Outlook 2016 for Mac case, the dialog system seems to not work properly.

To be clear, we're using the Office Insider Fast Track build as it has much improved support for the Office-JS API.

I've been through several iterations of this particular piece (most of which worked fine both in the Windows client and the web client on Mac and Win), and have had no luck. The scenario is:

  1. List item
  2. Open up the task pane in outlook.
  3. Hit the sign in button
  4. A new window opens, pointed at our authentication portal
  5. User signs in.
  6. On auth completion, the window redirects to a page in the office add-in scope, and calls back to the parent frame with the auth token, where it can be further processed.

Steps 1 through 5 work fine on all platforms. Step 6 refuses to work on Outlook for Mac. Initially, this flow was built using the native js window.open and window.postMessage apis. As mentioned above, this worked everywhere but Outlook Mac, where, the API seemed to ignore the window options and just open the url in a new tab in whatever browser was open and never setting the child window reference (result of window.open being null).

Failing this, I followed the advice found here on SO to use the Office functionality, displayDialogAsync and messageParent. After some initial hurdles, this too was setup and working on every platform save Outlook Mac.

As there is no dev tools or JS console support in Mac Outlook, I followed the advice found here Howto: Outlook 2016 for Mac - Debugging/View Console Logs in Outlook Add-in and setup Vorlon to attempt to get some context, adding numerous logging points to try and get some context. Unfortunately, while Vorlon does pick up my auth landing page as a client, and sees the Office interfaces, none of my console outputs are presented, making it seem as though the JS isn't running at all.

At this point I'm not sure what to try next. Has anyone run into this issue, or gotten this to work on the Outlook 2016 for Mac client?

Clarifying context:

  • All auth pages are listed in the AppDomains section of the Manifest.
  • While initial versions pointed directly at our auth service (this worked on not Mac), the current version first opens up an in scope pre-auth page that redirects to the auth service.
  • The Office-JS api's block alerts, preventing their use in displaying useful information.
  • Authentication through all versions of this app have worked on both Outlook 2016 on Windows and OWA on both Win and Mac.

Thank you.

like image 425
Ava Avatar asked Mar 04 '17 02:03

Ava


1 Answers

This issue in Outlook Mac has been fixed a few months ago. If anyone still encounters this issue with a recent Outlook Mac build, please reply with the build number.

like image 50
BharathanMSFT Avatar answered Oct 21 '22 23:10

BharathanMSFT