Skip to main content

spo group get

Gets site group

Usage

m365 spo group get [options]

Options

-u, --webUrl <webUrl>

URL of the site where the group is located.

-i, --id [id]

ID of the site group to get. Use either id, name or associatedGroup but not multiple.

--name [name]

Name of the site group to get. Use either id, name or associatedGroup but not multiple.

--associatedGroup [associatedGroup]

Type of the associated group to get. Available values: Owner, Member, Visitor. Use either id, name or associatedGroup but not multiple.

-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 is options.

--query [query]

JMESPath query string. See http://jmespath.org/ for more information and examples.

-o, --output [output]

Output type. json, text, csv, md, none. Default json.

--verbose

Runs command with verbose logging.

--debug

Runs command with debug logging.

Examples

Get group with ID for the specified web.

m365 spo group get --webUrl https://contoso.sharepoint.com/sites/project-x --id 7

Get group with name for the specified web.

m365 spo group get --webUrl https://contoso.sharepoint.com/sites/project-x --name "Team Site Members"

Get the associated owner group of a specified site.

m365 spo group get --webUrl https://contoso.sharepoint.com/sites/project-x --associatedGroup Owner

Response

{
"Id": 40,
"IsHiddenInUI": false,
"LoginName": "Project leaders",
"Title": "Project leaders",
"PrincipalType": 8,
"AllowMembersEditMembership": false,
"AllowRequestToJoinLeave": false,
"AutoAcceptRequestToJoinLeave": false,
"Description": "This group contains all project leaders",
"OnlyAllowMembersViewMembership": true,
"OwnerTitle": "Jon Doe",
"RequestToJoinLeaveEmailSetting": null
}
CTRL + M