New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New command: entra group add
#5476
Comments
aad group add
entra group add
Can I take it? |
Sure 👍 |
@milanholemans Based on this, distribution and mailEnabledSecurity groups cannot be created via Graph API. Graph API returns the error Cannot Create a mail-enabled security groups and or distribution list. in both cases. |
That's sad, thank you for the feedback. I'll update the spec. |
@MartinM85 made a mall change, changed |
@milanholemans I see that some validation/user utils are already part of PR #5759. Probably the code for adding owners/members will be very similar. |
Usage
m365 entra group add [options]
Description
Creates an Azure AD group
Options
-n, --displayName <displayName>
-d, --description [description]
-t, --type <type>
microsoft365
orsecurity
.-m, --mailNickname [mailNickname]
--ownerIds [ownerIds]
ownerIds
orownerUserNames
, but not both.--ownerUserNames [ownerUserNames]
ownerIds
orownerUserNames
, but not both.--memberIds [memberIds]
memberIds
ormemberUserNames
, but not both.--memberUserNames [memberUserNames]
memberIds
ormemberUserNames
, but not both.--visibility [visibility]
Private
,Public
, orHiddenMembership
. Defaults toPublic
. Specify only when creating a group of typemicrosoft365
.Examples
Create a security group without any owners or members
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 john.doe@contoso.com --members "john.doe@contoso.com,adele.vance@contoso.com" --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
To validate
mailNickname
, consider: This property can contain only characters in the ASCII character set 0 - 127 except the following: @ () \ [] " ; : <> , SPACE.mailNickname
is always a required property. If it's not specified, let's generate one ourselves.Let's allow unknown options: https://learn.microsoft.com/en-us/graph/api/resources/group?view=graph-rest-1.0
Let's also add a remark that warns the user that you cannot change the group type when you choose HiddenMembership.
Let's add a remark that explains all group visibilities
API: https://learn.microsoft.com/en-us/graph/api/group-post-groups?view=graph-rest-1.0&tabs=http
The text was updated successfully, but these errors were encountered: