Hi All; I am facing a strange issue with Graph API.
While I have tried many different configurations (including the query params $filter, $top and header config),I keep getting the query's default 100 records.
"[https://graph.microsoft.com/v1.0/applications?$filter=startsWith(displayName](https://graph.microsoft.com/v1.0/applications?$filter=startsWith(displayName"https://graph.microsoft.com/v1.0/applications?$filter=startswith(displayname"), 'SearchText')"
Below are things I have already tried
But all the time, there is no change in the result.
Below is the code I'm using
$context = [Microsoft.Azure.Commands.Common.Authentication.Abstractions.AzureRmProfileProvider]::Instance.Profile.DefaultContext
$graphToken = [Microsoft.Azure.Commands.Common.Authentication.AzureSession]::Instance.AuthenticationFactory.Authenticate($context.Account, $context.Environment, $context.Tenant.Id.ToString(), $null, [Microsoft.Azure.Commands.Common.Authentication.ShowDialog]::Never, $null, "https://graph.microsoft.com").AccessToken
$pat = "Bearer $graphToken"
$headers = @{
"Authorization" = $pat
"ConsistencyLevel" = "eventual"
"Content-Type" = "application/json"
}
$applicationsURL = "https://graph.microsoft.com/v1.0/applications?$filter=startsWith(displayName, 'Text')&$top=999"
$applications = Invoke-RestMethod -Method GET -Uri $applicationsURL -Headers $headers
Also, I tried with $applicationsURL = "https://graph.microsoft.com/beta/applications?$incorrectParam=true&$fail=true", which, too, is returning the same result while it should fail.