spo group get
Gets site group
Usage
m365 spo group get [options]
Options
-u, --webUrl <webUrl>
URL of the site where the group is located.
-i, --id [id]
ID of the site group to get. Use either
id
,name
orassociatedGroup
but not multiple.--name [name]
Name of the site group to get. Use either
id
,name
orassociatedGroup
but not multiple.--associatedGroup [associatedGroup]
Type of the associated group to get. Available values:
Owner
,Member
,Visitor
. Use eitherid
,name
orassociatedGroup
but not multiple.
-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
Get group with ID for the specified web.
m365 spo group get --webUrl https://contoso.sharepoint.com/sites/project-x --id 7
Get group with name for the specified web.
m365 spo group get --webUrl https://contoso.sharepoint.com/sites/project-x --name "Team Site Members"
Get the associated owner group of a specified site.
m365 spo group get --webUrl https://contoso.sharepoint.com/sites/project-x --associatedGroup Owner
Response
- JSON
- Text
- CSV
- Markdown
{
"Id": 40,
"IsHiddenInUI": false,
"LoginName": "Project leaders",
"Title": "Project leaders",
"PrincipalType": 8,
"AllowMembersEditMembership": false,
"AllowRequestToJoinLeave": false,
"AutoAcceptRequestToJoinLeave": false,
"Description": "This group contains all project leaders",
"OnlyAllowMembersViewMembership": true,
"OwnerTitle": "Jon Doe",
"RequestToJoinLeaveEmailSetting": null
}
AllowMembersEditMembership : false
AllowRequestToJoinLeave : false
AutoAcceptRequestToJoinLeave : false
Description : This group contains all project leaders
Id : 40
IsHiddenInUI : false
LoginName : Project leaders
OnlyAllowMembersViewMembership: true
OwnerTitle : Jon Doe
PrincipalType : 8
RequestToJoinLeaveEmailSetting: null
Title : Project leaders
Id,IsHiddenInUI,LoginName,Title,PrincipalType,AllowMembersEditMembership,AllowRequestToJoinLeave,AutoAcceptRequestToJoinLeave,Description,OnlyAllowMembersViewMembership,OwnerTitle
40,,Project leaders,Project leaders,8,,,,This group contains all project leaders,1,Jon Doe
# spo group get --webUrl "https://contoso.sharepoint.com/sites/project-x" --name "Project leaders"
Date: 10/3/2023
## Project leaders (40)
Property | Value
---------|-------
Id | 40
IsHiddenInUI | false
LoginName | Project leaders
Title | Project leaders
PrincipalType | 8
AllowMembersEditMembership | false
AllowRequestToJoinLeave | false
AutoAcceptRequestToJoinLeave | false
Description | This group contains all project leaders
OnlyAllowMembersViewMembership | true
OwnerTitle | Jon Doe