Usage
m365 spo group add
Description
Creates group in the specified site
Options
| Option |
Description |
-u, --webUrl <webUrl> |
URL of the site where the group should be added. |
-n, --name <name> |
Name of the group to add. |
--description [description] |
The description for the group. |
--allowMembersEditMembership |
When specified members can edit membership, otherwise only owners can do this. |
--onlyAllowMembersViewMembership |
When specified only group members can view the membership, otherwise everyone can. |
--allowRequestToJoinLeave |
Allow users to request membership in this group and allow users to request to leave the group. |
--autoAcceptRequestToJoinLeave |
If auto-accept is enabled, users will automatically be added or removed when they make a request. |
--requestToJoinLeaveEmailSetting [requestToJoinLeaveEmailSetting] |
All membership requests will be sent to the e-mail address specified. |
Examples
Create group with title and description
m365 spo group add --webUrl https://contoso.sharepoint.com/sites/project-x --name "Project contributors" --description "This group contains all project contributors"
Create group with membership requests
m365 spo group add --webUrl https://contoso.sharepoint.com/sites/project-x --name "Project leaders" --allowRequestToJoinLeave --requestToJoinLeaveEmailSetting [email protected]
Additional Info
Request:
POST https://contoso.sharepoint.com/sites/project-x/_api/web/sitegroups
Accept: application/json
Content-Type: application/json
{
"Title": "New Site Group",
"Description": "New Site Group description",
"AllowMembersEditMembership": false,
"OnlyAllowMembersViewMembership": false,
"AllowRequestToJoinLeave": false,
"AutoAcceptRequestToJoinLeave": false,
"RequestToJoinLeaveEmailSetting": "[email protected]"
}
Usage
m365 spo group add
Description
Creates group in the specified site
Options
-u, --webUrl <webUrl>-n, --name <name>--description [description]--allowMembersEditMembership--onlyAllowMembersViewMembership--allowRequestToJoinLeave--autoAcceptRequestToJoinLeave--requestToJoinLeaveEmailSetting [requestToJoinLeaveEmailSetting]Examples
Create group with title and description
Create group with membership requests
Additional Info
Request: