Skip to content

[Shell] Azure CLI receives corrupted arguments in PowerShell #15529

@jiasli

Description

@jiasli

Describe the bug

When invoking az in PowerShell, due to the known issue of PowerShell PowerShell/PowerShell#1995, arguments passed to Azure CLI may get corrupted. For example, literal double quotes (") are lost:

# PowerShell
> az '{"signInAudience":"AzureADAndMicrosoftAccounts"}' --debug
Command arguments: ['{signInAudience:AzureADAndMicrosoftAccounts}', '--debug']

This contradicts the behavior of Bash:

# Bash
$ az '{"signInAudience":"AzureADAndMicrosoftAccounts"}' --debug
Command arguments: ['{"signInAudience":"AzureADAndMicrosoftAccounts"}', '--debug']

Impact

This is mainly affecting

Workaround

See https://github.com/Azure/azure-cli/blob/dev/doc/quoting-issues-with-powershell.md

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions