Closed mohandivraniya closed 4 years ago
Could you please provide the error you're seeing if this is still an issue?
Additionally, your configuration is set up with popUp: true
which will always popup a login window. You can set this to false to do a full redirect. You also don't need the callback: acquireToken
field, as this effectively does nothing.
oauth2AllowUrlPathMatching
should allow you to achieve this.
Yes, generally only with SPAs. See the wiki.
Also, all current authentication work from Microsoft is delivered through the msal js
library here. adal js
is still supported only for security fixes. We recommend moving to msal js
for any advanced feature requests and bugfixes.
Ahh--I'm blind and didn't notice the error was actually in the title. My bad.
Nonetheless, if you're still seeing issues, please respond and we can guide some usage and debugging, as this sounds like a usage error. Double check to make sure that the redirectURI being set in the code (there is a default of window.location.href) and the one set in Azure are indeed the same.
Our current setup is:
SharePoint A SharePoint online site collection JavaScript running inside a content editor web part on a classic .aspx web part page on above site collection ADAL.js calling Azure AD to get token for Power BI end points for current logged in user.
Azure AD An application is registered with reply URL https://<>/
oauth2AllowImplicitFlow and oauth2AllowUrlPathMatching are set to true.
Other Chrome version 73 ADAL.js version 1.0.18
My ADAL.js ApplicationContext config is defined as:
var config = { instance: 'https://login.microsoftonline.com/', tenant: 'common', clientId: 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx', postLogoutRedirectUri: window.location.origin, callback: acquireToken, endpoints: { 'https://api.powerbi.com': 'https://analysis.windows.net/powerbi/api', }, popUp: true, cacheLocation: 'localStorage' };
Now, when I call acquireToken method of ADAL.js, it opens a new popup and displays above error.
My questions are: