question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

MSAL returns Token Renewal operation failed in Chrome, how to resolve this?

See original GitHub issue

I’m submitting an issue regarding the token acquiring after login. I am using ReactJS and MSAL 1.1.3 for Azure AD authentication. I frequently get the “Token Renewal Operation failed” error. I have cleared the cache, and still it appears.

Browser:

  • Firefox
  • IE 9 and 10
  • Edge
  • Opera

Library version


MSAL: 1.1.3
React: 16.8.6

Current behavior

I also tried using it in incognito, it sometimes let me login but most of the times it would return the error. The procedure is working perfectly fine in Chrome, and it does not work properly in IE, Edge, Firefox and Opera. Any help would be highly appreciated.

Expected behavior

As in chrome it works perfectly, it should work the same in other browsers as well, at least in updated browsers such as Edge, Firefox, Opera.

Minimal reproduction of the problem with instructions

const msalConfig = { auth: { clientId: my_client_id, authority: ‘https://login.microsoftonline.com/tenant_id’, scopes: [${websiteURL}/user_impersonation], redirectUri: ${websiteURL}/, postLogoutRedirectUri: ${websiteURL}/, loadFrameTimeout: 10000, }, cache: { cacheLocation: “sessionStorage”, }, navigateToLoginRequestURL: false, storeAuthStateInCookie: true, };

msalInstance = new Msal.UserAgentApplication(msalConfig);

const loginRequest = { scopes: [${websiteURL}/user_impersonation], authority: ‘https://login.microsoftonline.com/tenant_id’, };

msalInstance.loginPopup(loginRequest) .then(response => { msalInstance.acquireTokenSilent(loginRequest) .then(responseToken => { this.setState({ redirect: true }) }) .catch(err => { console.log(err); }) }) .catch(err => { console.log(err); })

I have added the loadFrameTimeout too, but it won’t work. Following is my configuration that I used to create msalInstace and the login procedure:

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:31 (13 by maintainers)

github_iconTop GitHub Comments

2reactions
skyshine999commented, Feb 21, 2020

Right now i am using 1.1.3, it is working fine in all browsers. But if i try with latest version 1.2.1 i am getting token renewal operation failed

1reaction
sameeragcommented, Feb 11, 2020

@brayanL I see you commented on #1260. Can we please track your issue with #1260 instead of this thread?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Token renewal operation failed due to timeout MSAL Angular ...
Its all happening automatically when I have these code in place. So do we really do something to fix this token renewal issue?...
Read more >
Using web browsers (MSAL.NET) - Microsoft Entra
MSAL.NET can respond with an HTTP message or HTTP redirect when a token is received or an error occurs. C# Copy. var options...
Read more >
angular msal refresh token | The AI Search Engine You Control
You are in luck I have been through this exact same problem before and it took me weeks to resolve it. To acquire...
Read more >
@azure/msal-angular - GitHub Pages
MSAL Angular allows you to add an Http interceptor ( MsalInterceptor ) in your app.module.ts as follows. MsalInterceptor will obtain tokens and add...
Read more >
WindowsAzure-Samples - Bountysource
Sometimes the following error is displayed in Chrome Developer tools console. ... Token renewal operation failed due to timeout. $ 0.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found