OfficeDev / office-js-helpers

[ARCHIVED] A collection of helpers to simplify development of Office Add-ins & Microsoft Teams Tabs
MIT License
126 stars 56 forks source link

In https://outlook.office365.com promise never gets executed #87

Open binarykitchen opened 6 years ago

binarykitchen commented 6 years ago

I have following code for testing an add-in I'm developing locally and show it up on https://outlook.office365.com/

It seems the promise never gets executed for whatever weird reason. The console.log call never prints this text. Any clues why?

authenticator
    .authenticate(OfficeHelpers.DefaultEndpoints.Microsoft)
    .then(function (token) { console.log('this here never gets printed, why?') }
    .catch(OfficeHelpers.Utilities.log);
binarykitchen commented 6 years ago

And yes, here the configs

authenticator.endpoints.registerMicrosoftAuth('bcf84a37-9abe-44ab-97db-90635563b938', {
    scope: 'Mail.ReadWrite'
});

Note there is no redirect URL since I expect it just to stay on the same page. And no error is thrown saying a redirect URL is missing.