cli-microsoft365 icon indicating copy to clipboard operation
cli-microsoft365 copied to clipboard

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

Open milanholemans opened this issue 1 year ago • 6 comments

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:

  • [ ] entra m365group get
  • [ ] entra m365group remove
  • [ ] entra m365group renew
  • [ ] entra m365group teamify
  • [ ] entra m365group conversation list
  • [ ] entra m365group conversation post list
  • [ ] entra m365group user add
  • [ ] entra m365group user remove
  • [ ] entra m365group user set

milanholemans avatar Jul 13 '24 21:07 milanholemans

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.

Adam-it avatar Jul 14 '24 23:07 Adam-it

Can I take it?

MartinM85 avatar Aug 06 '24 12:08 MartinM85

@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?

MartinM85 avatar Aug 08 '24 06:08 MartinM85

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.

milanholemans avatar Aug 08 '24 13:08 milanholemans

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

  • m365 entra m365group user add has alias m365 teams user add https://pnp.github.io/cli-microsoft365/cmd/entra/m365group/m365group-user-add#alias-1
  • m365 entra m365group user remove has alias m365 aad teams user remove (example shows m365 entra teams user remove) https://pnp.github.io/cli-microsoft365/cmd/entra/m365group/m365group-user-remove#alias
  • m365 entra m365group user set has alias m365 aad teams user set (example shows m365 entra teams user set) https://pnp.github.io/cli-microsoft365/cmd/entra/m365group/m365group-user-set#alias

MartinM85 avatar Aug 08 '24 13:08 MartinM85

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.

milanholemans avatar Aug 08 '24 13:08 milanholemans

@milanholemans could we go over again why we consider this v10? I saw those aliases are already clear out and I don't see any breaking change kind of thing here 🤔

Adam-it avatar Oct 30 '24 22:10 Adam-it

Because of this right? https://github.com/pnp/cli-microsoft365/pull/6234#issuecomment-2417936280

milanholemans avatar Oct 30 '24 22:10 milanholemans

Because of this right? #6234 (comment)

this was reverted and we don't change this naming anymore

Adam-it avatar Oct 31 '24 11:10 Adam-it