Skip to main content

spo group member list

List the members of a SharePoint Group

Usage

m365 spo group member list [options]

Options

-u, --webUrl <webUrl>

URL of the SharePoint site.

--groupId [groupId]

Id of the SharePoint group. Specify either groupName or groupId, but not both.

--groupName [groupName]

Name of the SharePoint group. Specify either groupName or groupId, but not both.

-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

List the members of the group with ID for the specified web.

m365 spo group member list --webUrl https://contoso.sharepoint.com/sites/SiteA --groupId 5

List the members of the group with name for the specified web.

m365 spo group member list --webUrl https://contoso.sharepoint.com/sites/SiteA --groupName "Contoso Site Members"

Response

[
{
"Id": 7,
"IsHiddenInUI": false,
"LoginName": "i:0#.f|membership|admin@contoso.onmicrosoft.com",
"Title": "Jon Doe",
"PrincipalType": 1,
"Email": "admin@contoso.onmicrosoft.com",
"Expiration": "",
"IsEmailAuthenticationGuestUser": false,
"IsShareByEmailGuestUser": false,
"IsSiteAdmin": true,
"UserId": {
"NameId": "100320006513e584",
"NameIdIssuer": "urn:federation:microsoftonline"
},
"UserPrincipalName": "admin@contoso.onmicrosoft.com"
}
]
CTRL + M