I don't think it is a good idea to try every Azure CLI account, as this may cause unexpected user credential to be used.
Instead, only the default/selected (subscription, tenant, user) combination should be used to get an access token. If that token doesn't have access, we should explicitly switch account with az account set.
I don't think it is a good idea to try every Azure CLI account, as this may cause unexpected user credential to be used.
Instead, only the default/selected (subscription, tenant, user) combination should be used to get an access token. If that token doesn't have access, we should explicitly switch account with
az account set
.Originally posted by @jiasli in https://github.com/Azure/azure-devops-cli-extension/issues/1226#issuecomment-963889338