Skip to content

New command: entra group add #5476

@milanholemans

Description

@milanholemans

Usage

m365 entra group add [options]

Description

Creates an Azure AD group

Options

Option Description
-n, --displayName <displayName> The name for the group. The maximum length is 256 characters.
-d, --description [description] The description for the group.
-t, --type <type> The group type. Valid values: microsoft365 or security.
-m, --mailNickname [mailNickname] The mail alias for the group (part before the @). Maximum length is 64 characters.
--ownerIds [ownerIds] Comma-separated list of IDs of Microsoft Entra ID users that will be group owners. Specify either ownerIds or ownerUserNames, but not both.
--ownerUserNames [ownerUserNames] Comma-separated list of UPNs of Microsoft Entra ID users that will be group owners. Specify either ownerIds or ownerUserNames, but not both.
--memberIds [memberIds] Comma-separated list of IDs of Microsoft Entra ID users that will be group members. Specify either memberIds or memberUserNames, but not both.
--memberUserNames [memberUserNames] Comma-separated list of UPNs of Microsoft Entra ID users that will be group members. Specify either memberIds or memberUserNames, but not both.
--visibility [visibility] Specifies the group join policy and group content visibility for Microsoft 365 groups. Possible values are: Private, Public, or HiddenMembership. Defaults to Public. Specify only when creating a group of type microsoft365.

Examples

Create a security group without any owners or members

m365 entra group add --displayName Developers --type security

Create a private Microsoft 365 group with owners and members and a custom mail address

m365 entra group add --displayName Developers --type microsoft365--mailNickname devs --owners [email protected] --members "[email protected],[email protected]" --visibility Private

Create a public Microsoft 365 group without any owners or members

m365 entra group add --displayName Developers --type microsoft365 --description "This group is for all developers in the company."

Default properties

No response

Additional Info

API: https://learn.microsoft.com/en-us/graph/api/group-post-groups?view=graph-rest-1.0&tabs=http

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions