Skip to content

Instantly share code, notes, and snippets.

@M1kep
Created February 5, 2022 23:40
Show Gist options
  • Save M1kep/3e373be74e65cc1f32edaa033532f353 to your computer and use it in GitHub Desktop.
Save M1kep/3e373be74e65cc1f32edaa033532f353 to your computer and use it in GitHub Desktop.
Example of retrieving a list of Azure AD Enterprise Applications
function Get-AzPortalEnterpriseApp {
[CmdletBinding(SupportsShouldProcess)]
param (
#Filter by display name or application ID
[String]$Filter,
#Set the result size. Default is first 50 results
[int]$ResultSize = 50
)
$InvokeApiRequestParams = @{
Target = "ManagedApplications"
Action = "List"
Method = "POST"
Body = ConvertTo-Json @{
appListQuery = 0
top = $resultSize
searchtext = $Filter
}
}
$result = Invoke-AzPortalRequest @InvokeApiRequestParams
$result.appList
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment