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 7 for web https://contoso.sharepoint.com/sites/project-x

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

Get group with name Team Site Members for web https://contoso.sharepoint.com/sites/project-x

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
CTRL + M