Skip to content

spo group user list

List members of a SharePoint Group

Usage

m365 spo group user list [options]

Options

-u, --webUrl <webUrl>
URL of the SharePoint site
--groupId [groupId]
Id of the SharePoint group. Use either groupName or groupId, but not both
--groupName [groupName]
Name of the SharePoint group. Use either groupName or groupId, but not both
-h, --help
output usage information
--query [query]
JMESPath query string. See http://jmespath.org/ for more information and examples
-o, --output [output]
Output type. json,text. Default text
--verbose
Runs command with verbose logging
--debug
Runs command with debug logging

Examples

List the members of the group with ID 5 for web https://contoso.sharepoint.com/sites/SiteA

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

List the members of the group with name Contoso Site Members for web https://contoso.sharepoint.com/sites/SiteA

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