[ ] Regression (a behavior that used to work and stopped working in a new release)
[ ] Bug report
[x] Performance issue
[ ] Feature request
[ ] Documentation issue or request
[ ] Other... Please describe:
Library version: 1.0.0 and 1.0.1
it seems acquireTokenSilent is always trying to get the accessToken from azure, instead of local cache. I can see acquireTokenSilent sends request to https://login.microsoftonline.com/te/... everytime my code calls it.
I can get a solid repro using this azure sample:
https://github.com/Azure-Samples/active-directory-b2c-javascript-msal-singlepageapp
acquireTokenSilent gets token from azure for first time, and subsequently it gets token from browser cache

@pkanher617 is this related to authority and the cache?
@rick-hayek I will take a look at this today. Thank you for the detailed repro.
I'm seeing this behavior in my application as well. It creates a noticeable drag on performance since there's a slight delay every time a token is requested.
We also faced this issues. Currently, we developed our own Promise-wrapper that cache promise from acquireTokenSilent.
At the start of out app, we send 4 calls to MS Graph, each calls acquireTokenSilent and app initiate 4 auth processes (almost simultaneously). Some of them fail and leave garbage in local storage (key-values from not-finished authentications). All further calls reload iframe to acquire new token as mentioned in this issues.
I think it's also worth noting that this issue further exacerbates the issue reported in #317. Every time a token request is made instead of using the one in cache, it also triggers an additional unnecessary request for the OpenID configuration.
more and more users complains about this, especially when MSAL have to request and update two tokens (for Graph and SharePoint Online) in the same time.
https://antongorbikov.wordpress.com/2019/07/01/migrating-from-adal-to-msal/
This is definitely something we are focused on fixing @jasonnutter is helping drive the investigation
I'm no longer seeing this issue after upgrading to v1.1.2. Anyone else?
Updating to v1.1.2 seems to have corrected the issue for me too.
I'm no longer seeing this issue after upgrading to v1.1.2. Anyone else?
Same here, no issues using 1.1.2
Looks like @pkanher617 's fix for scopes helped improve this. @pkanher617 If you confirm the same, we can tag this issue closed with #875.
Most helpful comment
more and more users complains about this, especially when MSAL have to request and update two tokens (for Graph and SharePoint Online) in the same time.
https://antongorbikov.wordpress.com/2019/07/01/migrating-from-adal-to-msal/