Archive Microsoft Teams group

  • Last update on September 26th, 2024

Table of Contents

Custom actions are not available in the Essentials solution.

 

If you need to archive/delete a Microsoft Teams group using a CoreView custom action, you can import the script below.

Custom action 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"
}