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 4 test cases in this PR demonstrate what MSAL scenarios are covered. On top of that, the AcquireTokenSilent() is also implicitly tested by each scenario.
UPDATE: The authority implementation is also adjusted to support https://contoso.ciamlogin.com/..., implemented in #543.
~Get that app's authority and scope. Note: You shall NOT hardcode the test app's client id "b8e9..." into your test code. Read it from the response of the first API above.~
UPDATE: The lab API has been changed again in #564.
The 4 test cases in this PR demonstrate what MSAL scenarios are covered. On top of that, the AcquireTokenSilent() is also implicitly tested by each scenario.
UPDATE: The authority implementation is also adjusted to support
https://contoso.ciamlogin.com/...
, implemented in #543.This is how to obtain test configuration: