-
Notifications
You must be signed in to change notification settings - Fork 155
Description
We have been fetching Microsoft's access token via normal calls however we were getting throttled due to the huge increase in number of fresh access token calls. On checking we found out that we should use acquire token silently first, and only then fall back to the acquireToken API.
We are using version 1.10.0 and when I tried to implement the silent call, it is unable to fetch tokens from cache and fresh calls are being made.
Our usecase - Whenever there is a file upload, a lambda gets triggered which fetches accessToken from Microsoft and submits the file to Microsoft. At times there are 10k+ files which cause issues as there are 10k requests made to fetch new access tokens. Using cache would help us a lot for such cases.
The ConfidentialClientApplication is initialised at the very beginning in a static block to avoid it being reinitialised :

