If you are getting this error when using the Azure CLI commands:
1 |
More than one token matches the criteria. The result is ambiguous. |
And you run the command with the --debug
switch you see something along these lines (the exact path could vary – below is from macOS M1):
1 2 3 |
File "/opt/homebrew/Cellar/azure-cli/2.18.0/libexec/lib/python3.8/site-packages/adal/cache_driver.py", line 124, in _load_single_entry_from_cache raise AdalError('More than one token matches the criteria. The result is ambiguous.') adal.adal_error.AdalError: More than one token matches the criteria. The result is ambiguous. |
Try doing an az account clear
and then logging in again. That helped me today.
I have a couple of Azure accounts and use two functions like these in my .bash_profile
to switch between work and personal accounts:
1 2 3 4 5 6 7 8 9 |
function az_login_work { export AZURE_CONFIG_DIR=~/.Azure az login --use-device-code } function az_login_personal { export AZURE_CONFIG_DIR=~/.Azure-personal az login --use-device-code && az account set -s "Free Trial 1" } |
I guess something messed up somewhere and hence these ambiguous errors.