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
770 stars 192 forks source link

Actionable exception from ADFS username password flow #456

Closed rayluo closed 2 years ago

rayluo commented 2 years ago

Inspired by https://github.com/Azure/azure-cli/issues/21068#issuecomment-1018752545 , this PR wraps most "expected" ADFS username password flow into one RuntimeError with actionable message.

That being said, this actionable message is meant for MSAL's app developer. If you are the app developer, you probably want to catch this RuntimeError and translate it into your own exception or error message, for example "... consider use 'az login' instead". @jiasli