Uninstalling The Teamgage Microsoft Teams App

Uninstalling The Teamgage Microsoft Teams App

It may be necessary to uninstall the Teamgage app for a number of reasons, if you find yourself in this situation we provide a couple of useful Powershell scripts which can be used to bulk uninstall for either Teams or users.

Uninstall the app for all users in a Team/Channel:

  1. $appId = '61aa6197-4b01-4bb4-a7a6-6ecf477654a0'
  2. $teamId = 'TEAM ID HERE'

  3. Get-TeamUser -GroupId $teamId | ForEach-Object {
  4.     $appInstalled = Get-TeamsAppInstallation -UserId $_.UserId -AppId $appId
  5.     if ($appInstalled) {
  6.         Write-Host "Uninstalling from: $($_.Name)"
  7.         Remove-TeamsAppInstallation -UserId $_.UserId -AppId $appId
  8.     }
  9.     else {
  10.         Write-Host "Skipping user: $($_.Name)"
  11.     }
  12. }

Uninstall the app from all Teams/Channels:

  1. $appId = '61aa6197-4b01-4bb4-a7a6-6ecf477654a0'

  2. Get-Team -Archived $false | ForEach-Object {
  3.     $appInstalled = Get-TeamsAppInstallation -TeamId $_.GroupId -AppId $appId
  4.     if ($appInstalled) {
  5.         Write-Host "Uninstalling from: $($_.DisplayName)"
  6.         Remove-TeamsAppInstallation -TeamId $_.GroupId -AppId $appId
  7.     }
  8.     else {
  9.         Write-Host "Skipping team: $($_.DisplayName)"
  10.     }
  11. }