Last active
June 6, 2020 09:02
-
-
Save thomyg/1ec1c47eb5bbcf1acaabfa2124a49c32 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Using the Office365CLI to list all Teams apps in all Microsoft Teams teams of your tenant | |
o365 login -t password -u "%USER_NAME%" -p "%PASSWORD" | |
$availableTeams = o365 teams team list -o json | ConvertFrom-Json | |
if($availableTeams.count -gt 15) | |
{ | |
$duration = [math]::Round(($availableTeams.count/60),1); | |
Write-Host "Start iterating through" $availableTeams.count "teams. This probably will take around" $duration" minutes to finish." | |
} | |
foreach ($team in $availableTeams) { | |
$apps = o365 teams app list -i $team.Id -a | |
Write-Output "All apps in team: " $team.displayName " " $team.id | |
Write-Output $apps | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment