Skip to content

New command: m365 spo tenant site membership list #5980

@mkm17

Description

@mkm17

Usage

m365 spo tenant site membership list

Description

Retrieve information about default site groups' membership.

Options

Option Description
-u, --siteUrl <siteUrl> The URL of the site
-r, --role [role] Filter the results to only users with the given role: 'Owner', 'Member', 'Visitor'.

Examples

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

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

Retrieves information about site owners.

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

Default properties

  • Email
  • LoginName
  • Name
  • UserPrincipalName
  • Role

Additional Info

This command could be helpful for SharePoint administrators, It would allow getting information about membership of a site using the _api/SPO.Tenant/sites/GetSiteUserGroups endpoint, like in the SP admin page.

The benefit here is that administrators can access this information with SharePoint admin permission only, without needing site collection admin permission.

Remarks

To execute this command successfully, ensure that you are logged in to the CLI for M365 with an account that has SharePoint admin permissions. In other scenarios, please check the spo web get --withGroups and spo group member list commands.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions