Useful commands, append | jq
to view results in pretty colors.
Install instructions for Debian/Ubuntu. Install Azure CLI with apt
Login to account.
az login --allow-no-subscriptions
Confirm successful login.
az account show
Log out of account.
az logout
az ad user list
az ad user show [email protected]
az ad group list
az ad group show --group "azure-objectid-identifiers-1a2b3c"
Using json example output for targed attributes.
az ad user show --upn-or-object-id [email protected] --query '{name:displayName, UPN:userPrincipalName}' -o json
{
"UPN": "[email protected]",
"name": "first last"
}
All user objects
az ad user list --query '[].{name:displayName, UPN:userPrincipalName}' -o json
{
"UPN": "[email protected]",
"name": "first last",
"UPN": "[email protected]",
"name": "first last",
}
Add the azure-devops
extension
az extension add --name azure-devops
Configure and add project
az devops configure --defaults organization=https://dev.azure.com/contoso project=ContosoWebApp