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

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:
List item
Open up the task pane in outlook.
Hit the sign in button
A new window opens, pointed at our authentication portal
User signs in.
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.

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.

The Office.context.ui is undefined in v16.17 (180909) build of Outlook for Mac 2016 using the following OfficeJS dist:
https://appsforoffice.microsoft.com/lib/1/hosted/office.js

Related

Outlook Web Add In can't open links in web browser

I have developed a very basic Outlook Web Add In, with the purpose of loading a Power Apps app by using an iframe object with a URL pointing to the app, all this from Office 365 on desktop devices.
It works as intended and, when loading, Power Apps asks the user to login first, this isn't the app itself asking to login, but Power Apps asking the user to identify first and then loading the app. This also works, at least on some devices.
It has come to my attention that some users can't make it past the login request, as instead of opening a browser tab and showing the login form, the iframe in the Add In, shows this message, which, obviously, makes users think the app isn't working:
This app isn't working. Refresh your browser or try again later
Apparently this message is not that uncommon and at least from what I've read it isn't clear enough either.
Besides that, Windows is displaying this message:
You'll need a new app to open this about link
I'm not even sure what it means, but it shows a list with zero apps that can open this "about link", and the option to go the Windows Store.
What should happen (and happens on some devices):
User is shown login request (by Power Apps)
User logs in
App is loaded and shown to the user
What happens (only on some devices):
User is shown login request (by Power Apps)
Windows can't open a web browser, so the user can't log in
Message saying app isn't working appears, because app was never loaded.
As I don't quite understand why this only happens on some cases, I have been testing the issue, and I have found that when the Power Apps login button is clicked, a file called ielowutil.exe, which apparently stands for Internet Low MIC Utility Tool, is executed before the web browser is shown with the login screen, and this only happens on the devices that can eventually load the app, the ones that fail never run this program.
From what I understand this file is related to Internet Explorer.
The Outlook Web Add In is already working within a web browser, according to Microsoft the browser is chosen automatically (Browsers used by Office Add-ins), so if it's already opened then I don't quite understand why it can't open a new tab/window.
The combination of system requirements for Office Add-ins and Power Apps may be the cause of the error here. While some combinations of platforms and Office versions still support IE 11 for add-ins and may default to opening URLs in IE per Browsers used by Office Add-ins and Support Internet Explorer 11, it looks like IE is no longer supported by Power Apps (see Supported browsers for running Power Apps).
For users who experience the issue you mentioned because of IE, you may need to add an alternate experience for the add-in to gracefully fail (see Determine at runtime if the add-in is running in Internet Explorer) or consider a different solution for hosting the Power Apps app.

"App not found, Please verify..." when launching from Visual Studio, but installs normally from Developer Portal

I'm currently learning Teams development and I just installed the Teams Toolkit extension. Following the quickstart guide, launching the app opens my browser with the Teams web app and the message
App not found, Please verify the app and it's[sic] access
permissions.
Fortunately, this app can still be launched when selecting the "Preview in Teams" option in the Developer Portal.
Quoting the GettingStarted.txt:
If you Start Debugging in a browser and Teams shows the message "App not found, Please verify the app and it's access permissions", it means the app hasn't been uploaded to Teams Dev Portal. To resolve this, follow the steps in the Quick start section above. The Project > TeamsFx > Configure for SSO menu command will do this step for you.
Except it was successfully uploaded to Dev Portal.
What I did
Did this "Configure for SSO" thing. No problems with that and the app was successfully added to the Developer Portal.
Where I searched for an answer
VS Marketplace page for Teams Toolkit (Reviews, Q&A)
Github page (issues) for Teams Toolkit
This very site - Stack Overflow.
Obviously, I'm not 100% sure that I haven't missed anything.
Temporary solution
In the meantime, I set the "launchBrowser" property to "false" in launchSettings.json. However, it's a waste of time to constantly go back to the Developer Portal to launch it, especially when the functionality is there.
Visual Studio 2019, Microsoft Development Account.
Thanks in advance.
We tried to repro this issue at our end and it is working fine for us. Could you please make sure app is opened in same tenant with which you configured for SSO. Also please remove all credentials from cache to make sure its not taking another credentials and try again.
Assuming nothing else was changed from the new project template, there are a few things you can try to narrow down the issue.
Open your browsers web dev tools and watch the console after clicking the Add button (before you see the error message). Sometimes a useful error message from the developer portal helps identify the issue.
Verify that when Visual Studio launches the URL, the correct tenant is loaded in Teams.
Run the project in VS, then manually navigate in your browser to the endpoint of your tab that you expect to work. It would be something like https://localhost:44357/tab by default (the value is in the manifest.json). The sample won't work completely because it's not running inside Teams, but you should be able to verify it's working locally.
If none of that helps, please log an issue on the GitHub page and we can investigate a bug.

Deep links and Outlook safe links protection

I have deep links configured on iOS and Android using universal links. They're working fine. If the app isn't installed, the request goes through the web site, which I currently have an apache Rewrite redirecting them to the home page of the web site with links to install the app.
Emails that go through Outlook safe links protection, a feature of Office 365 subscriptions, rewrites all URLs in your received emails. So my deep link universal link is rewritten to an outlook handling URL (na01.safelinks.protection.outlook.com), so iOS nor Android have the chance to handle it immediately. This redirects to the original url, however Safari then doesn't treat is as a universal link, at least not in the way I have it configured and the user then gets redirected to the home page, and the app never opens. 😢
I can't be the only one facing this issue, as there are a lot of hotmail users out there.
Anyone got any suggestions on how to alleviate this issue and make universal links work with outlook safe links protection?
Note that this issue only is affecting iOS 13 and Android. It works ok on iOS 14.
I know it's possible, as we've got emails from other apps that seem to be successfully doing it, albeit via a lot of link forwarding it seems.

Outlook add-in with global scope (inbox level)

Is there a way to have an outlook add-in that uses a global scope? I want to be able to launch the add-in at any time, but not necessarily relate it to a specific e-mail. According to the documentation I found, the closest thing would be to have it appear as a Module, but then it only works on the desktop version (not the web), and doesn't allow you to view it alongside e-mails. It would be ideal if this could run on the side of the screen, similar to how Skype works on the web version of Outlook, on both the desktop and web versions. Is Skype a special case, or is it possible to build an add-in like that?
Web-based add-ins work in the context of the current item only.
Instead, you may consider developing a browser plug-in which modifies a web page dynamically. And for the desktop editions of Outlook you may consider creating a COM based add-in which allows to customize the UI in the way you need. See Walkthrough: Creating Your First VSTO Add-In for Outlook to get started quickly.

What browser does Office 2016 on Mac use for taskpanes?

I've got a Word add-in working well on Windows, and the basics are working on Mac also (Word 2016 both).
What browser does Word 2016 for Mac use?
I see this post:
What browser / browser engine do Office Add-ins use?
But it doesn't explicitly define the way Mac does it.
I see posts about clearing the cache, which is helpful (that will be my next challenge) like How to clear client side browser cache for Excel 2016 Task Pane add-in on Mac?.
Specific reason I'm asking is trying to use Firebase for authentication. On Windows, because Word 2016 uses IE11, clicking Login (with Firebase running the show) in my taskpane pops open IE11...and the login through the full browser is recognized by the Taskpane.
On Mac, clicking Login is opening my default browser...
Alternately I could try to keep the Firebase flow in the Taskpane...but not sure how to do that:)
Mostly curious how Microsoft is kludging this on Mac.
For Mac, the native WebKit control is being used (https://developer.apple.com/reference/webkit/webview). Window.open or other popups will open in the default browser and not share cookies or have window.opener pointer to the WebKit control by default. This does not work in authentication scenarios. If you want the popup window to be opened in a separate WebKit control for authentication, you will need to include the trusted domain in the AppDomain list of the manifest: https://dev.office.com/reference/add-ins/manifest/appdomains. window.opener and cookies should then work between the popup and add-in. The AppDomain list is supported on every platform.

Resources