Why is there no refreshToken in the cache even after setting forceRefresh: true (acquireTokenSilent)

Justin Ar-Rasheed 6 Reputation points
2022-07-14T00:51:48.557+00:00

After setting the following parameters, I get the error message "No refresh token found in the cache. Please sign-in."

const response = await msalClient.acquireTokenSilent({
scopes: [
"user.read",
"calendars.readwrite",
"mailboxsettings.read",
"offline_access",
],
forceRefresh: true,
redirectUri,
account,
});

Why is there no refreshToken in the cache even after setting forceRefresh: true

Not Monitored
Not Monitored
Tag not monitored by Microsoft.
40,309 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. 2022-07-14T05:00:02.997+00:00

    Hello @Justin Ar-Rasheed , forceRefresh to true will skip cached tokens. Set it to false to attempt using a valid cached token. If none is found and the user is signed in acquireTokenSilent will attempt to retrieve a new set of tokens.

    Let us know if this answer was helpful to you or if you need additional assistance! If it was helpful, please accept it and complete the quality survey so it helps other community users facing similar issues.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.