Archive Microsoft Teams group - Custom action

  • Last update on January 25th, 2024

If you are looking for a way to Archive/Delete a Microsoft Teams group within CoreView as a Custom Action you can import the following script:

{
 "id": "45fca056-5c23-4728-a67f-096b270eb684",
 "title": "Teams - Archive Teams group",
 "description": "A custom action to archive a Teams group and set the SharePoint site read-only for Team members",
 "lastModified": "2021-05-10T07:29:10.4510000Z",
 "target": "Teams",
 "tags": [],
 "vars": [
 {
 "name": "Guid",
 "type": "string",
 "isRequired": false
 }
 ],
 "params": [
 {
 "name": "DisplayName",
 "type": "string",
 "isDefault": true
 }
 ],
 "columns": {
 "DisplayName": ""
 },
 "version": 5,
 "statement": "param ([string]$DisplayName, [string]$Guid)\r\n\r\nSet-TeamArchivedState -GroupId $Guid -Archived:$true -SetSpoSiteReadOnlyForMembers:$true"
}