I am working in a corporate environment and thus do not have a lot of visibility into the intricacies of my network settings; however, I'm still trying to troubleshoot myself.
When on a VPN, I am trying to run az login command for the Azure CLI. Regardless of what configuration of arguments I use, I get an error regarding HTTPSConnectionPool(host='login.microsoftonline.com', port=443) at the openid-configuration endpoint for my company's Azure tenant, running into the problem (Caused by ProtocolError('Connection aborted.', HTTPException('got more than 100 headers'))).
I have tried adding our local self-signed certs to the cacert.pem file used by the Azure CLI and adding an environment variable of REQUESTS_CA_BUNDLE pointing to that path. I have also tried setting the HTTP_PROXY, HTTPS_PROXY, and ALL_PROXY environment variables to a known endpoint for our proxy. The error indicates python executing on a remote server; if I could update the MAX_HEADERS variable on that server, I would, but I believe that server is likely in MicrosoftLand somewhere and inaccessible to me. I have tried updating the Azure CLI to the latest version. Lastly I tried renaming the msal_token_cache.bin file in my APPDATA, but that has neither worked.
Please let me know if you have seen this error before and know how to overcome it. Thank you! This is a necessary step to use the DefaultAzureCredential class in C#, which is my ultimate goal.