Azure-sdk-for-python: Proxy values unable to be passed to ServicePrincipalCredentials

Created on 23 Sep 2016  路  5Comments  路  Source: Azure/azure-sdk-for-python

I am unable to create an instance of ServicePrincipalCredentials when I am behind a proxy. I can set proxy values on the various resource management client classes before they attempt to make an API call, but I can't create the necessary credentials first.

Since ServicePrincipalCredentials connect via urllib, I believe the only option is to set global environment variables like HTTP_PROXY, which urllib uses as a fallback default, but other libraries connecting via urllib would then be affected, which is not desired.

ARM Service Attention bug

All 5 comments

Hi @krimkus, thanks for the feedback. We are currently replacing the tech code behind by ADAL. I think this might help for some scenario like this one.
@yugangw-msft could you confirm (or not) if ADAL handle this case?

FYI @annatisch @brettcannon

That sounds great, thanks for the quick response. I'll keep an eye on when ADAL gets integrated, but feel free to update/close this issue if things change.

Apologize for such a long delay. ADAL itself doesn't have any specific logic to handle proxy, rather the requests package or maybe the urllib underneath handles it. I did test it works with proxy though.

Hi @krimkus

Now ADAL is integrated directly (needs msrestazure 0.4.5):
http://azure-sdk-for-python.readthedocs.io/en/latest/quickstart_authentication.html#using-adal

Do you think it's enough to answer your problem, so I can close the issue?

I close this issue, I truly think we solved the problem. Please still comment on it on open a new issue if something's wrong.
Thank you!

Was this page helpful?
0 / 5 - 0 ratings