title: MSAL access token refreshing not working through AcquireTokenSilent
body: <p>I am implementing MSAL authentication for our SPA. I've followed various official and unofficial guides and so far this is my auth implementation:</p>
  <pre><code>loginMicrosoft() {
    myMSALObj
      .loginPopup(msalConfig.loginRequest)
      .then((response) =&gt; {
        console.log(response);
        this.username = response.account.userName;
        this.account = response.account;
      })
      .catch((error) =&gt; {
        console.error(error);
      });
  },
  readEvents() {
    this.getTokenPopup(msalConfig.tokenRequest)
      .then((response) =&gt; {
        console.log(&quot;silent token!: &quot;, response);
       
        this.callMSGraph(
          graphConfig.graphConfig.graphGetCalendarEventsEndpoint,
          response.accessToken
        );
      })
      .catch((error) =&gt; {
        console.error(error);
      });
  },
  createEvent() {
    this.getTokenPopup(msalConfig.tokenRequest)
      .then((response) =&gt; {
        this.callMSGraphCreateEvent(
          graphConfig.graphConfig.graphCreateCalendarEventEndpoint,
          response.accessToken
        );
      })
      .catch((error) =&gt; {
        console.error(error);
      });
  },
  getTokenPopup(request) {
    request.account = this.account;
    console.log(request);
    return myMSALObj.acquireTokenSilent(request).catch((error) =&gt; {
      console.warn(
        &quot;silent token acquisition fails. acquiring token using popup : &quot;,
        error
      );
      if (error instanceof Msal.InteractionRequiredAuthError) {
        // fallback to interaction when silent call fails
        return myMSALObj
          .acquireTokenPopup(request)
          .then((tokenResponse) =&gt; {
            console.log(tokenResponse);
            return tokenResponse;
          })
          .catch((error) =&gt; {
            console.error(error);
          });
      } else {
        console.warn(error);
      }
    });
  },
  async callMSGraph(endpoint, token) {
    console.log(&quot;request made to Graph API at: &quot; + new Date().toString());
    const resp = await axios.post(&quot;/api/microsoft/get-events&quot;, { endpoint, token });
    this.calendarEvents = resp.data.value;
    console.log(&quot;vaste: &quot;, resp);
  },
  async callMSGraphCreateEvent(endpoint, token) {
    console.log(&quot;request made to Graph API at: &quot; + new Date().toString());
    const resp = await axios.post(&quot;/api/microsoft/create-event&quot;, {
      endpoint,
      token,
    });
    this.calendarEvents = resp.data.value;
    console.log(&quot;vaste: &quot;, resp);
  },
  </code></pre>
  <p>Everything works as intended, until the access token is reaching expiry.
  If AcquireTokenSilent is called 5 minutes before the expiration of after the expiration of the access token, I would expect it to return a new access token, using the hidden refresh token in the MSAL cache. Instead, I get the following error:</p>
  <blockquote>
  <p>silent token acquisition fails. acquiring token using popup :
  InteractionRequiredAuthError: Silent authentication was denied. The
  user must first sign in and if needed grant the client application
  access to the scope 'User.Read Calendars.ReadWrite openid
  profile'.</p>
  </blockquote>
  <p>It doesn't seem to be normal to ask for user sign-in every hour, and I cant seem to find any resources on this issue..</p>
  <p>Any help is greatly appreciated!</p>
  <p><strong>EDIT:</strong></p>
  <p>I tried adding offline_access to my token request scopes. My scopes setup is following:</p>
  <p><a href="https://i.stack.imgur.com/sWrXs.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/sWrXs.png" alt="Azure AD" /></a></p>
  <pre><code>    export const loginRequest = {
    scopes: [&quot;User.Read&quot;, &quot;Calendars.ReadWrite&quot;, &quot;offline_access&quot;],
  };
  
  export const tokenRequest = {
    scopes: [&quot;User.Read&quot;, &quot;Calendars.ReadWrite&quot;, &quot;offline_access&quot;],
    forceRefresh: false, // Set this to &quot;true&quot; to skip a cached token and go to the server to get a new token
  };
  </code></pre>
  <p>Now im getting the login popup with the following error every time i try to call the api:</p>
  <blockquote>
  <p>InteractionRequiredAuthError: Silent authentication was denied. The user must first sign in and if needed grant the client application access to the scope 'User.Read Calendars.ReadWrite offline_access openid profile'.</p>
  </blockquote>