3
votes

We know that OAUTH flow cannot be implemented in Office add-ins like you would do for a normal (non iFramed) web app, we must rely on some popup technique: see the best explanation here.

To overcome this, Microsoft released a dialogAPI within Office.js. This dialog API for a while was only available for Office Desktop.

If a developer wants to have a solution that works on Office Online (and to be allowed to be distributed on the Office store) he had to implement a fallback solution involving a plain old browser pop-up. Remark: this is what we do in the open source sample for Outlook that we released.

As explained in the Documentation, to test the availability we have to check using this code sample

if (Office.context.requirements.isSetSupported('DialogAPI', 1.1)) {
// Use Office UI methods; } else { // Alternate path }

The thing is, today, I tried to force the usage of dialogAPI even when the if() statement returns false. Surprise, it looks like dialogAPI is working even in Office Online ! (Chrome, Edge, FF, IE tested). That rocks! dialogAPI in OWA

My questions are:

  • Will we have dialogAPI in Office Online for all browsers (including mobiles)?
  • Can we have an ETA when this will be production ready?
  • Will we have to continue implementing a fallback solution?
  • What about old Office builds (if it works for all browser maybe for old IE as well)?
2

2 Answers

4
votes

Yes the dialog API will be available for online hosts and it will work across all major modern browsers. As for the ETA I cannot give you a specific date but rest assured this is top of mind for us. You can check the official status in our Add-in Availability page; the API is already available in Windows Desktop, Mac, IPad.

1
votes

Benoit, I will reach out to the team to see what the status is, and we'll try to get back to you.

In terms of general info: features do often get deployed "dark" -- and for example, in Excel APIs, which is the area I work on primarily, we might have ExcelApi 1.3 be something that we work on for several months... but it's not like we don't check in anything during that time! Rather, we continuously check in and roll changes to production, but we make no guarantees about them being available and/or fully tested until (Office.context.requirements.isSetSupported('ExcelApi', 1.3) returns true. So, you might well be seeing that most of the functionality is already in -- but the team hasn't fully "signed off" on this yet. So, I would consider this to be internal/non-production API until isSetSupported does return true; but you probably can infer that the feature is getting close to complete, and so it should be lighting up in the not-too-distant future (disclaimer, I personally have little visibility into this particular API; so take this with a grain of salt).