microsoft-authentication-library-for-android
microsoft-authentication-library-for-android copied to clipboard
[Question] Cannot refresh MSAL account claims when acquiring token silently.
Hello,
Is there any way to refresh the account claims when using the acquireTokenSilent method?
We have noticed that account claims refresh only when we use acquire token method interactively. However, we don't want to require the user to log in again, each time a custom claim in our account claims changes.
Thank you for your time.
@paulokagiri @wainaina Any feedback on the issue?
When using the acquireTokenSilent method, the account claims will only be refreshed if the cached token has expired or if the forceRefresh flag is set to true. However, there is no direct way to refresh the account claims without requiring the user to log in again or using the acquireToken method.
One possible solution is to use the forceRefresh flag when calling the acquireTokenSilent method, but only when the custom claim in the account claims has changed. This way, the account claims will only be refreshed when necessary, and the user won't be required to log in again unnecessarily.