Skip to main content

spo tenant site membership list

Retrieves information about default site groups' membership

Usage

m365 spo tenant site membership list [options]

Options

-u, --siteUrl <siteUrl>

The URL of the site.

-r, --role [role]

Filter the results to include only users with the specified roles: Owner, Member, or Visitor.

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

Remarks

info

To use this command, you must be a Global or SharePoint administrator.

For other scenarios, refer to the spo web get --withGroups and spo group member list commands.

Examples

Retrieve information about default site groups' owners, members, and visitors of the site.

m365 spo tenant site membership list --siteUrl https://contoso.sharepoint.com

Retrieve information about site owners.

m365 spo tenant site membership list --siteUrl https://contoso.sharepoint.com --role Owner

Response

{
"AssociatedOwnerGroup": [
{
"email": "jdoe@contoso.onmicrosoft.com",
"loginName": "i:0#.f|membership|jdoe@contoso.onmicrosoft.com",
"name": "John Doe",
"userPrincipalName": "jdoe@contoso.onmicrosoft.com"
}
],
"AssociatedMemberGroup": [
{
"email": "avance@contoso.onmicrosoft.com",
"loginName": "i:0#.f|membership|avance@contoso.onmicrosoft.com",
"name": "Adele Vance",
"userPrincipalName": "avance@contoso.onmicrosoft.com"
}
],
"AssociatedVisitorGroup": [
{
"email": "",
"loginName": "c:0-.f|rolemanager|spo-grid-all-users/dc109ffd-4298-487e-9cbc-6b9b1a2cd3e2",
"name": "Everyone except external users",
"userPrincipalName": null
}
]
}
CTRL + M