Closed tmacro closed 5 years ago
Thanks for the feature request (and your willing to contribute)!
ADAL Python has long been allowing to "specify a custom authority server at runtime". That is needed when for example using an ADFS on-prem server as Identity Provider. And the way to do it, is to specify AuthenticationContext(..., validate_authority=False, ...)
. See the API reference doc here, and the actual usage pattern here.
Ideally Azure CLI should know whether a customer cloud is being used, if so, turn off that validate_authority
flag. Perhaps you can create a similar issue in Azure CLI repo and see how it pans out.
CC: @yonzhan
Addressed in downstream Azure CLI.
Azure-adal defines a static list of authority servers here. It then uses this list here to limit the authority servers used for discovery. Why is this a problem? If I register a custom cloud using
az cloud register ...
with a custom authority server,az login
fails with the errorI would like to add an environment variable (or another method) to allow the user to specify a custom authority server at runtime. This is not just a feature request, I am willing to contribute the code/time needed to make this happen if you are willing.