Created
February 5, 2022 23:40
-
-
Save M1kep/3e373be74e65cc1f32edaa033532f353 to your computer and use it in GitHub Desktop.
Example of retrieving a list of Azure AD Enterprise Applications
This file contains hidden or 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
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