Skip to content

GroupName property of New-AzManagementGroupSubscription should be updated to match its meaning #11718

@nguyenlamlll

Description

@nguyenlamlll

Current implementation

Currently, New-AzManagementGroupSubscription accepts a parameter called GroupName, depicted as "Management Group Id". This is quite confusing (at least, to me, when I read the docs).

GroupName is confusing because, on the Azure Portal, we have Group Name and Group ID. Group Name is allowed to have spaces. When we see the param's name of the PS command, we naturally pass in the Group Name from Azure Portal.

PS /home/user > New-AzManagementGroupSubscription -GroupName 'A B C D' -SubscriptionId $subscriptionId
New-AzManagementGroupSubscription: The provided management group name 'A B C D' has these invalid characters: ' ,  '. The name can only be an ASCII letter, digit, -, _, (, ), .

It's even more confusing when I read the error. It clearly says "the provided management group name".

However, in the end, the command works when I pass the ID of the management group.

Description of the new feature

The parameter should be named accordingly to its meaning.

Proposed implementation details

Is it this source file here? Sorry, I am not familiar with the source code structure of this repo.

If so, rename the property GroupName to the name GroupId or ManagementGroupId.

Metadata

Metadata

Assignees

Labels

Azure PS TeamContains Breaking ChangeThis PR contains breaking changecustomer-reportedquestionThe 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