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
754 stars 191 forks source link

msal does not work behind company's VPN #694

Closed bikeridercz closed 2 months ago

bikeridercz commented 2 months ago

Friends, considering simple code from MS examples below, it does not return a response when I'm connected to company's VPN. This really makes the OpenID authentication against our EntraID from python Flask application unusable. Any idea ? Please help.

I tried to use a proxies attribute but without success (proxies={"http":"http://proxy1.xxx:8080"})

from msal import PublicClientApplication
app = PublicClientApplication("your_client_id", authority="https://login.microsoftonline.com/common")
rayluo commented 2 months ago

Agreed that it sounds like that VPN setup makes OpenID auth unusable. You have to somehow fix the connection issue via trial-and-error on your side. Since you have already discovered proxies, you can try more on that direction. You probably need a proxy setup for https, not http.

bikeridercz commented 2 months ago

Yes, adding https proxy helped :-) Thanks. ... proxies={"http":"http://proxy1.xxxx:8080", "https":"http://proxy1.xxxx:8080"}