`az ad group show --group` breaks with group names that use `+` in v2.37
See original GitHub issueRelated command
az ad group show --group <group_name>
Describe the bug
Prior to v2.37
of the azure-cli, this command would complete successfully:
az ad group show --group some_group+
As of v2.37
that same command returns the following error:
No group matches the name of 'some_group+'
If you execute the same command on another group that does not have the +
in its name:
az ad group show --group some_group
…then the command completes successfully.
To Reproduce
- Ensure
az --version
returns a version < 2.37. az ad group show --group some_group+
- command successful.- Upgrade azure-cli to version 2.37.
az ad group show --group some_group+
- command fails.
Further, no amount of shell escaping results in success:
az ad group show --group "some_group+"
- command fails.az ad group show --group 'some_group+'
- command fails.az ad group show --group some_group\+
- command fails.
Expected behavior
I suspect this behavior is a result of the recent move from the Active Directory Graph API
to the Microsoft Graph API
when upgrading to v2.37 of the azure-cli. That said, I think there is a reasonable expectation that rules around illegal characters should at least be harmonized between the two graphs before migrating from one to the other.
I found no mention of this behavior in the documentation I was able to locate on the differences between the two graphs.
Environment summary Experienced in Azure Cloud Shell which recently upgraded azure-cli to v2.37, and also in an installed azure-cli instance on a Manjaro Linux workstation.
Issue Analytics
- State:
- Created a year ago
- Comments:5 (2 by maintainers)
Top GitHub Comments
az ad group show
internally uses$filter
query parameter to find groups.It seems
$search
follows a different pattern that does allow+
to be un-encoded.Anyway, I will fix the encoding issue in https://github.com/Azure/azure-cli/pull/22739.
Our release schedule can be found at https://github.com/Azure/azure-cli/milestones.
The next release 2.38.0 is 07/05/2022.