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?

Azure Active Directory
Azure Active Directory
An Azure enterprise identity service that provides single sign-on and multi-factor authentication.
14,846 questions
Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
1,361 questions
Microsoft Graph Azure AD API
Microsoft Graph Azure AD API
A Microsoft API that queries the user's profile, finds other users, manages organizational relationships, tracks assignments, or creates original solutions that incorporate existing organizational data.
256 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Vasil Michev 71,296 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)