question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

`az ad group show --group` breaks with group names that use `+` in v2.37

See original GitHub issue

Related 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

  1. Ensure az --version returns a version < 2.37.
  2. az ad group show --group some_group+ - command successful.
  3. Upgrade azure-cli to version 2.37.
  4. 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:closed
  • Created a year ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
jiaslicommented, Jun 8, 2022

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.

$ az rest --url 'https://graph.microsoft.com/v1.0/groups?$search="displayName:azure-cli-test+"' --headers ConsistencyLevel=eventual --debug
cli.azure.cli.core.util: Request URL: 'https://graph.microsoft.com/v1.0/groups?$search=%22displayName:azure-cli-test+%22'

Anyway, I will fix the encoding issue in https://github.com/Azure/azure-cli/pull/22739.

0reactions
jiaslicommented, Jun 15, 2022

Our release schedule can be found at https://github.com/Azure/azure-cli/milestones.

The next release 2.38.0 is 07/05/2022.

Read more comments on GitHub >

github_iconTop Results From Across the Web

az ad group | Microsoft Learn
Object's display name or its prefix. --mail-nickname. Mail nickname. Optional Parameters. --description. Group description. --force.
Read more >
Fixing breaking changes when migrating from Azure AD to ...
I am attempting to setup and install this reference app from Azure, created by the Microsoft patterns & practices team: ...
Read more >
BlackRock: Investment Management & Financial Services
BlackRock is one of the world's preeminent asset management firms and a premier provider of investment management. Find out more information here.
Read more >
Feeding America: U.S. Hunger Relief Organization
Feeding America is a nonprofit network of 200 food banks leading the fight against hunger in the United States. Learn how you can...
Read more >
The Sacramento Bee: Sacramento CA News, Sports & Politics
Read today's latest news headlines from Sacramento and Northern California. Follow state politics, local business, crime, sports, environment and community ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found