Get-MSTTeamsApp
Teams: Get app information from the Teams tenant app store
#Requires -Version 5.1
[CmdletBinding()]
Param(
[string]$AppId,
[string]$ExternalID,
[string]$DisplayName,
[ValidateSet('organization', 'global')]
[string]$DistributionMethod
)
Process {
try {
[hashtable]$cmdArgs = @{'ErrorAction' = 'Stop'}
if ($PSBoundParameters.ContainsKey('AppId')) {
$cmdArgs.Add('Id', $AppId)
}
if ($PSBoundParameters.ContainsKey('ExternalID')) {
$cmdArgs.Add('ExternalID', $ExternalID)
}
if ($PSBoundParameters.ContainsKey('DisplayName')) {
$cmdArgs.Add('DisplayName', $DisplayName)
}
if ($PSBoundParameters.ContainsKey('DistributionMethod')) {
$cmdArgs.Add('DistributionMethod', $DistributionMethod)
}
$result = Get-TeamsApp @cmdArgs | Select-Object * | Sort-Object -Property DisplayName
if ($null -eq $result -or $result.Count -eq 0) {
Write-Output "No Teams apps found"
return
}
foreach ($item in $result) {
$item | Add-Member -NotePropertyName Timestamp -NotePropertyValue (Get-Date -Format 'yyyy-MM-dd HH:mm:ss') -PassThru -Force
}
}
catch { throw }
}The app's ID generated by Teams (different from the external ID)
The external ID of the app, provided by the app developer and used by Azure Active Directory
Name of the app visible to users
The type of app in Teams. For LOB apps use "organization"