Azure CLI
Useful az commands.
Users
az ad signed-in-user show– get details of the logged-in user
Subscriptions
az account show– get details of the current subscriptionaz account list– get a list of subscriptions for the logged in accountaz account set --subscription <subscription_name>– change the current subscription to<subscription_name>
Full list at https://docs.microsoft.com/en-us/cli/azure/account.
Function Apps
az webapp show --resource_group <group_name> --name <function_app> --query outboundIpAddresses– show function app's outbound IP addresses.az webapp identity show --resource-group <group_name> --name <function_app>– show function app's managed service identity
Queries
All az commands support the --query argument, allowing you to pipe output results into a JMESPath query – see https://docs.microsoft.com/en-us/cli/azure/query-azure-cli.
For example:
search service principals by object ID
az ad sp list --query "[?objectId=='15e4529c-113b-4872-a510-08e97f87af9b']"