clientAuthError: token_refresh_required Issue after update to Vs 17.12.4

Inam Siddiqui 20 Reputation points
2025-01-22T10:18:33.46+00:00

I am getting error when trying to start project in debug mode in AthuenticationService.js

Its starts coming after I update my vs version to latest v17.12.4 and instal .net 9 sdk

ClientAuthError: token_refresh_required: Cannot return token from cache because it must be refreshed. This may be due to one of the following reasons: forceRefresh parameter is set to true, claims have been requested, there is no cached access token or it is expired.

Microsoft Authenticator
Microsoft Authenticator
A Microsoft app for iOS and Android devices that enables authentication with two-factor verification, phone sign-in, and code generation.
8,424 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Orlando Villa 5 Reputation points
    2025-02-17T06:10:35.35+00:00

    Solved this issue by adding all the required scopes to the DefaultAccessTokenScopes when adding the msal authentication service.

    Seems that it prevents the client from requesting a new token due to missing scopes in the existing/cached token.

    1 person found this answer helpful.

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.