Usage
spo group remove [options]
Description
Removes site group from specific web
Options
| Option |
Description |
-u, --webUrl <webUrl> |
Url of the web to remove the group from |
--id [id] |
Id of the site group to remove |
--name [name] |
Name of the site group to remove |
-o, --output [output] |
Output type. json,text. Default text |
--verbose |
Runs command with verbose logging |
--debug |
Runs command with debug logging |
--confirm |
Confirm removal of user from site |
Remarks
Use either 'id' or 'name', but not both
Example
Removes group with id 5 for web https://contoso.sharepoint.com/sites/mysite
spo group remove --webUrl "https://contoso.sharepoint.com/sites/mysite" --id 5
Removes group with name Team Site Owners for web https://contoso.sharepoint.com/sites/mysite
spo group remove --webUrl "https://contoso.sharepoint.com/sites/mysite" --name "Team Site Owners"
Rest APIs reference
In the case of remove by id, just a single query will delete the group
POST https://contoso.sharepoint.com/_api/web/sitegroups/RemoveById(7)
In the case of remove by name, two queries have to be executed. The first query would find the group id from the group name and the second query will use the id to delete it
GET https://contoso.sharepoint.com/sites/mysite/_api/web/sitegroups/GetByName('Team Site Members')
POST https://contoso.sharepoint.com/_api/web/sitegroups/RemoveById(7)
Additional Information
Remove-PnPGroup -
https://docs.microsoft.com/en-us/powershell/module/sharepoint-pnp/remove-pnpgroup?view=sharepoint-ps
Usage
spo group remove [options]Description
Removes site group from specific web
Options
-u, --webUrl <webUrl>--id [id]--name [name]-o, --output [output]json,text. Defaulttext--verbose--debug--confirmRemarks
Use either 'id' or 'name', but not both
Example
Removes group with id 5 for web https://contoso.sharepoint.com/sites/mysite
Removes group with name Team Site Owners for web https://contoso.sharepoint.com/sites/mysite
Rest APIs reference
In the case of remove by id, just a single query will delete the group
In the case of remove by name, two queries have to be executed. The first query would find the group id from the group name and the second query will use the id to delete it
Additional Information
Remove-PnPGroup -
https://docs.microsoft.com/en-us/powershell/module/sharepoint-pnp/remove-pnpgroup?view=sharepoint-ps