Hi @Jean David Ruvini ,
Thanks for reaching out.
The general practice is to refresh the token before it expires.
However, managed identity tokens are cached by the underlying Azure infrastructure for performance and resiliency purposes: the back-end services for managed identities maintain a cache per resource URI for around 24 hours.
When you are saying 60 to 90 min, could you please confirm this token has been generated using managed identity?
Tokens acquired via the App Authentication library currently are refreshed when less than 5 minutes remains until they expire. So, it caches the token for 23 hours 55 minutes in the default case.
The cache lifetime of the token issued by a Managed Identity endpoint is controlled by the service provider, and unfortunately it appears that there is no way to force the refresh.
For more information, see Limitation of using managed identities for authorization.
Hope this will help.
Thanks,
Shweta
Please "Accept the answer" if above answer helped you.