-
Notifications
You must be signed in to change notification settings - Fork 3.4k
az login and az account set fail with HTML-encoded characters and subscription not found #32324
Copy link
Copy link
Open
Labels
ARMaz resource/group/lock/tag/deployment/policy/managementapp/account management-groupaz resource/group/lock/tag/deployment/policy/managementapp/account management-groupAccountaz login/accountaz login/accountAuto-AssignAuto assign by botAuto assign by botAzure CLI TeamThe command of the issue is owned by Azure CLI teamThe command of the issue is owned by Azure CLI teamact-identity-squadcustomer-reportedIssues that are reported by GitHub users external to the Azure organization.Issues that are reported by GitHub users external to the Azure organization.questionThe issue doesn't require a change to the product in order to be resolved. Most issues start as thatThe issue doesn't require a change to the product in order to be resolved. Most issues start as that
Milestone
Metadata
Metadata
Assignees
Labels
ARMaz resource/group/lock/tag/deployment/policy/managementapp/account management-groupaz resource/group/lock/tag/deployment/policy/managementapp/account management-groupAccountaz login/accountaz login/accountAuto-AssignAuto assign by botAuto assign by botAzure CLI TeamThe command of the issue is owned by Azure CLI teamThe command of the issue is owned by Azure CLI teamact-identity-squadcustomer-reportedIssues that are reported by GitHub users external to the Azure organization.Issues that are reported by GitHub users external to the Azure organization.questionThe issue doesn't require a change to the product in order to be resolved. Most issues start as thatThe issue doesn't require a change to the product in order to be resolved. Most issues start as that
Type
Fields
Give feedbackNo fields configured for issues without a type.
Describe the bug
When using Azure CLI on macOS with zsh, commands like
az account setfail due to HTML-encoded characters like<and>being interpreted literally.Also, even after successful login and selecting the correct subscription, Terraform fails to detect the subscription ID, and Azure CLI shows:
Related command
az login
az account list
az account set --subscription "<SUBSCRIPTION_ID>"
Errors
zsh: no such file or directory: SUBSCRIPTION_ID
The subscription of '<subscription_id>' doesn't exist in cloud 'AzureCloud'.
zsh: missing end of string
Issue script & Debug output
az login --debug
az account set --subscription "" --debug
Expected behavior
Azure CLI should correctly parse and set the subscription ID. HTML-encoded characters should not appear in the terminal. Terraform should be able to detect the subscription ID from the Azure CLI session.
Environment Summary
az --version
Additional context
Using macOS with zsh. Commands copied from web sources seem to include HTML-encoded characters like
<instead of<, which causes parsing issues.