pnp / cli-microsoft365

Manage Microsoft 365 and SharePoint Framework projects on any platform
https://aka.ms/cli-m365
MIT License
905 stars 317 forks source link

All `entra m365group` commands should accept `displayName` option #6147

Open milanholemans opened 2 months ago

milanholemans commented 2 months ago

Noticed that quite a lot entra m365group commands are lacking a displayName option to reference a group. Most of them only accept the group ID.

To align these commands more with other entra group commands, let's make sure people can use them with the display name of the group as well.

Option to add: Option Description
-n, displayName [displayName] The display name of the group.

Let's do this for all entra m365group commands, except entra m365group set. It will be a breaking change to implement it for this command.

Commands to update:

Adam-it commented 1 month ago

LGTM. Just to have this clarified we could list out the commands that need to be changed so we will be sure we don't miss anything.

MartinM85 commented 1 month ago

Can I take it?

MartinM85 commented 1 month ago

@milanholemans The entra m365group conversation post list command has the groupDisplayName option. Renaming would be a breaking change. Should I omit the entra m365group conversation post list command?

milanholemans commented 1 month ago

Hi @MartinM85, yes, please. For entra m365group conversation post list the option groupDisplayName is correct. Since the command name doesn't end with m365group noun, we append group to the option to make clear it's a bout the M365 group.

MartinM85 commented 1 month ago

@milanholemans Not familiar with all aliases, but is it correct that:

milanholemans commented 1 month ago

An alias is just an alternative name to run the same command. E.g. when you run entra m365group user add or teams user add, it runs the same command in the background. The same command has 2 names to improve discoverability (since you can add and remove users to a team, but in fact you add/remove them from a group). Seems like the alias in the docs is incorrect indeed. It should be teams user remove instead of entra teams user remove. Let's recheck if this is wrong in de code as well. If this is the case --> we should fix it in v9 since it's a breaking change. If only the docs are wrong --> let's fix the alias in the docs to the correct one.