Skip to content

Instantly share code, notes, and snippets.

@joerodgers
Created March 31, 2025 15:57
Show Gist options
  • Save joerodgers/1e172df47953a1327e97bdd6f26160bb to your computer and use it in GitHub Desktop.
Save joerodgers/1e172df47953a1327e97bdd6f26160bb to your computer and use it in GitHub Desktop.
Uses the app export file from the TAC to block all Copilot specific 3rd party apps from the Teams app store.
Connect-MicrosoftTeams
$rows = Import-Csv -Path "C:\_temp\manageAppsPage_manageAppsList_3-31-2025.csv"
foreach( $row in $rows )
{
if( $row.'Supported on' -notmatch "Copilot" )
{
continue
}
if( $row.'App type' -match "Microsoft apps|Custom apps" )
{
Write-Host "Unblocking app: $($row.Name)"
$null = Update-M365TeamsApp -Id $row.'App ID' -IsBlocked $false # unblock Microsoft and custom apps
}
if( $row.'App type' -match "Third-party apps" )
{
Write-Host "Blocking 3rd party app: $($row.Name)"
$null = Update-M365TeamsApp -Id $row.'App ID' -IsBlocked $true # block non-Microsoft apps
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment