AzureAD / microsoft-authentication-library-for-python

Microsoft Authentication Library (MSAL) for Python makes it easy to authenticate to Microsoft Entra ID. General docs are available here https://learn.microsoft.com/entra/msal/python/ Stable APIs are documented here https://msal-python.readthedocs.io. Questions can be asked on www.stackoverflow.com with tag "msal" + "python".
https://stackoverflow.com/questions/tagged/azure-ad-msal+python
Other
817 stars 203 forks source link

[Feature Request] Expose `refresh_on` when retrieving token from cache #720

Closed pvaneck closed 4 months ago

pvaneck commented 4 months ago

MSAL client type

Public, Confidential

Problem Statement

Similar to https://github.com/AzureAD/microsoft-authentication-library-for-java/issues/822, in our Azure SDKs for Python, one of the primary pipeline policies our SDK clients use is the BearerTokenCredentialPolicy. This policy will save a token it retrieves using the passed-in credential and will keep reusing that token until it's close to expiration. We recently added the ability for the policy to request a token sooner if a refresh_on value is set and has elapsed. We'd like to be able to set it if this value is available.

Request: Expose refresh_on where possible.


Proposed solution

No response