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".
The HTTP cache introduced by #379 makes device code login very slow, as the response is now cached. The retry logic goes to the cache and see 400 is returned.
The HTTP cache introduced by #379 makes device code login very slow, as the response is now cached. The retry logic goes to the cache and see 400 is returned.
https://github.com/AzureAD/microsoft-authentication-library-for-python/blob/f97cb7c69d1f5c2eed6c85e28dd828b2434263b4/msal/oauth2cli/oauth2.py#L383-L390
Device code login now can take as long as 60s.
The cache look up behavior can be confirmed by logging the cache query before
https://github.com/AzureAD/microsoft-authentication-library-for-python/blob/27097e66d1844b7862439c551360ce90d3615ab6/msal/individual_cache.py#L263
Output:
The exclusion rule for device code flow
https://github.com/AzureAD/microsoft-authentication-library-for-python/blob/a1f9ca7cc0cbd4330ea91b729f700de9d275c9d7/msal/throttled_http_client.py#L112
doesn't work because
data
is not passed tohttps://github.com/AzureAD/microsoft-authentication-library-for-python/blob/27097e66d1844b7862439c551360ce90d3615ab6/msal/individual_cache.py#L271-L276