How can i retrieve all the azure ad applications using graph api call?

Mohammed Siddiq Cheruvu 0 Reputation points

I am trying to retrieve azure ad apps using the below graph api call.$count=true&$select=displayname,appId,passwordCredentials

But it is returining only 100 results. But i need to return all the apps (i have more than 5000 apps in azure ad) in a single query.

How an i retrieve all azure ad apps at one go?

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
11,138 questions
Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
20,210 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Vasil Michev 98,681 Reputation points MVP

    You need to use pagination, as detailed here:

    You can use this as example on how to do pagination via PowerShell:

    $Apps = @()
    $uri = "`$top=999"
    do {
        $result = Invoke-WebRequest -Method Get -Uri $uri -Headers $authHeader
        $uri = ($result.Content | ConvertFrom-Json).'@odata.nextLink'
        $Apps += ($result.Content | ConvertFrom-Json).Value
    } while ($uri)