Hey guys,
I am trying to retrieve all users in an organization but when that tenant has over 1000 users the Graph API needs more info.
By default its returning 100 results in each GET action. There is the $top action that can be set to 999 which from what I've read will return the maximum number of results for each GET action.
This was my initial GET request:
https://graph.microsoft.com/v1.0/users?$filter=assignedLicenses/$count%20ne%200&$count=true&$select=displayName,mail,userType
I then tried to add the $top but it never returns a valid run. Things like
Parsing OData Select and Expand failed: Term 'displayName,mail,userType$top=999' is not valid in a $select or $expand expression.
In addition I am specifying some headers:

The returned value:
"@odata.count": 1389
Is there a better way to get more results or do I need to loop with all the "@odata.nextLink" values?
Thanks,
David