Open binarykitchen opened 6 years ago
So, Office.context.ui is undefined. Hmmm, but Office-JS is loaded fine.
This error happens when trying to use
authenticator.authenticate(OfficeHelpers.DefaultEndpoints.Microsoft, false)
in a Dialog.
For example, when trying to follow the recommended workflow : https://docs.microsoft.com/en-us/office/dev/add-ins/design/authentication-patterns :
At this point, the office-js-helpers authenticator is called and it tries to open a new Dialog. But it's already in the previous Dialog context, therefore, Excel context is not available anymore.
After reading the code, my pov is : office-js-helpers should know that it's running in a Dialog and launch a web window instead. I don't know exactly how to check it, maybe around getHostInfo() of office-js-helpers/src/helpers/utilities.ts ? Or is there an other way?
This error happens when I want to test authentication on https://localhost:3443 for an add-in I'm developing locally:
Any clues what it is?