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
orgroupId
, but not both.--groupName [groupName]
Name of the SharePoint group. Specify either
groupName
orgroupId
, 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 isoptions
.--query [query]
JMESPath query string. See http://jmespath.org/ for more information and examples.
-o, --output [output]
Output type.
json
,text
,csv
,md
,none
. Defaultjson
.--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
- JSON
- Text
- CSV
- Markdown
[
{
"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"
}
]
Email : admin@contoso.onmicrosoft.com
Id : 7
Title : Jon Doe
UserPrincipalName: admin@contoso.onmicrosoft.com
Id,IsHiddenInUI,LoginName,Title,PrincipalType,Email,Expiration,IsEmailAuthenticationGuestUser,IsShareByEmailGuestUser,IsSiteAdmin,UserPrincipalName
7,,i:0#.f|membership|admin@contoso.onmicrosoft.com,Jon Doe,1,admin@contoso.onmicrosoft.com,,,,1,admin@contoso.onmicrosoft.com
# spo group member list --webUrl "https://contoso.sharepoint.com/sites/SiteA" --groupName "Contoso Site Members"
Date: 10/3/2023
## Jon Doe (7)
Property | Value
---------|-------
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
UserPrincipalName | admin@contoso.onmicrosoft.com