All `entra m365group` commands should accept `displayName` option
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
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.
Can I take it?
@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?
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 Not familiar with all aliases, but is it correct that:
-
m365 entra m365group user addhas aliasm365 teams user addhttps://pnp.github.io/cli-microsoft365/cmd/entra/m365group/m365group-user-add#alias-1 -
m365 entra m365group user removehas aliasm365 aad teams user remove(example showsm365 entra teams user remove) https://pnp.github.io/cli-microsoft365/cmd/entra/m365group/m365group-user-remove#alias -
m365 entra m365group user sethas aliasm365 aad teams user set(example showsm365 entra teams user set) https://pnp.github.io/cli-microsoft365/cmd/entra/m365group/m365group-user-set#alias
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 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 🤔
Because of this right? https://github.com/pnp/cli-microsoft365/pull/6234#issuecomment-2417936280