spo group add
Creates group in the specified site
Usage
m365 spo group add [options]
Options
-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 [allowMembersEditMembership]Who can edit the membership of the group? When
truemembers can edit membership, otherwise only owners can do this. Defaultfalse.--onlyAllowMembersViewMembership [onlyAllowMembersViewMembership]Who can view the membership of the group? When
falseeveryone can view the group membership, otherwise only group members can. Defaulttrue.--allowRequestToJoinLeave [allowRequestToJoinLeave]Specify whether to allow users to request membership in this group and allow users to request to leave the group. Default
false.--autoAcceptRequestToJoinLeave [autoAcceptRequestToJoinLeave]If auto-accept is enabled, users will automatically be added or removed when they make a request. Default
false.--requestToJoinLeaveEmailSetting [requestToJoinLeaveEmailSetting]All membership requests will be sent to the email address specified.
-h, --help [help]Output usage information. Optionally, specify which section of command's help you want to see. Allowed values are
options,examples,remarks,response,full. Default isfull.--query [query]JMESPath query string. See http://jmespath.org/ for more information and examples.
-o, --output [output]Output type.
json,text,csv,md. Defaultjson.--verboseRuns command with verbose logging.
--debugRuns command with debug logging.
Examples
Create group with title and description
m365 spo group add --webUrl https://contoso.sharepoint.com/sites/project-x --name "Project leaders" --description "This group contains all project leaders"
Create group with membership requests
m365 spo group add --webUrl https://contoso.sharepoint.com/sites/project-x --name "Project leaders" --allowRequestToJoinLeave true --requestToJoinLeaveEmailSetting john.doe@contoso.com