Skip to content

Instantly share code, notes, and snippets.

@garrytrinder
Last active November 24, 2023 09:23
Show Gist options
  • Save garrytrinder/0b8bbd00d5e114279d009cf36b3dfd5a to your computer and use it in GitHub Desktop.
Save garrytrinder/0b8bbd00d5e114279d009cf36b3dfd5a to your computer and use it in GitHub Desktop.
Remove sideloaded Teams apps for the current user
# assumes you are logged into tenant using CLI for Microsoft 365 (https://aka.ms/cli-m365)
$apps = m365 teams user app list --userId "@meId" | ConvertFrom-Json
$apps | Where-Object { $_.teamsApp.distributionMethod -eq "sideloaded" } | ForEach-Object { m365 teams user app remove --id $_.id --userId "@meId" --force }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment