Skip to content

az login and az account set fail with HTML-encoded characters and subscription not found #32324

@Solutionpoint-blip

Description

@Solutionpoint-blip

Describe the bug

When using Azure CLI on macOS with zsh, commands like az account set fail 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 &lt; instead of <, which causes parsing issues.

Metadata

Metadata

Assignees

Labels

ARMaz resource/group/lock/tag/deployment/policy/managementapp/account management-groupAccountaz login/accountAuto-AssignAuto assign by botAzure CLI TeamThe command of the issue is owned by Azure CLI teamcustomer-reportedIssues 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 that

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions