-
Notifications
You must be signed in to change notification settings - Fork 248
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Logging in to the Azure CLI does not provide access to az devops
commands as expected
#1258
Comments
I've had similar issues. One cause for this is https://github.com/Azure/azure-devops-cli-extension/blob/master/azure-devops/azext_devops/dev/common/services.py#L165 hiding issues with token fetch. Exceptions are logged only with debug level. Other minor issue with the selection of default subscription. The code does not work ATM at all. PR coming soon. |
any workaround for this? |
If i remember correctly using
Extension tries tenant of the selected subscription first. That should decrease the amount of login issues. Sadly that feature does not work and looks like nobody works with PRs. Might be better using other tools for scripting. other work: ticket about the state of the tooling: https://developercommunity.visualstudio.com/t/The-current-state-and-the-future-of-Az-C/10145300 Alternative tools: |
Hi @mdekrey, Please find the below analysis for az login and az devops project list
|
does not work for me |
Not really true
Current AAD token authentication in this extension is really buggy by hiding information and error from user and should be rewritten. (Issue describing the problems coming soon) |
@mdekrey, we recently started working on the CLI service and we have checked the code if you have Azure active Directory/Microsoft account (AAD/MSA) you can see the "az devops project list" output by using "az login" otherwise you need to use "az devops login" (provide PAT) to see the "az devops project list". |
fixed for me in the current version |
Updating Azure CLI fixes the problem. |
Which version you updated from? 0.22.0 has some fixes but it was released over years ago. Extension authentication is buggy(1)(2) and badly documented:
|
I'm sorry but that information is gone... But I'm guessing that I have been running on the same version for some years now. But did now setup the option of auto-upgrade that the upgrade hinted about so now I will stay up-to-date :-) |
Spent all day on this till I stumbled upon this related issue Ensure you run AZ Login through an elevated prompt the first time as it tries to install the Python keyring package! |
This might be the best way to authenticate with devsops extension: Connect-AzAccount -tenant "xxxx" -Scope Process -DeviceAuth
$Env:AZURE_DEVOPS_EXT_PAT = (Get-AzAccessToken -ResourceUrl "499b84ac-1321-427f-aa17-267ca6975798").Token
# check your login
az devops project show --org "$ORG" -p "$PROJECT"
|
Logging in to the Azure CLI does not provide access to
az devops
commands as expectedCommand Name
az devops project list
(Extension Name: azure-devops. Version: 0.23.0.)
Errors:
To Reproduce:
Steps to reproduce the behavior. Note that argument values have been redacted, as they may contain sensitive information.
az login
az devops project list
Expected Behavior
A list of projects in my devops organizations should be presented.
Environment Summary
Additional Context
The link in the error message does not provide further information on using
az login
for using AAD/MSA identity.The text was updated successfully, but these errors were encountered: