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".
Please see https://identitydivision.visualstudio.com/DevEx/_git/AuthLibrariesApiReview/pullrequest/4733
The gist of it is:
AuthenticationResult
such as "time spent in cache", "time spent in http" etc.