Things had been working fine since January until about two weeks ago when I noticed that a particular user was missing from the list returned by the request:
get https://graph.microsoft.com/v1.0/users
I can reproduce the problem by login in to Microsoft Graph Explorer at
https://developer.microsoft.com/en-us/graph/graph-explorer#
and entering the same request.
I asked our site administrator if he had changed anything about that user. He replied no. The only thing that I am aware of that changed is that new users have been added.
I find interesting that the number of users returned is exactly 100.
How can I get all the users?
Data returned from Graph is paged and the default page size for Graph results is 100 records. In order to return all of the users, you will need to make requests for each page.
One of the properties returned by https://graph.microsoft.com/v1.0/users is be @odata.nextLink. This is a link to the "next page" of data.
For example:
"@odata.context": "https://graph.microsoft.com/v1.0/$metadata#users",
"@odata.nextLink": "https://graph.microsoft.com/v1.0/users?$skiptoken=AVeryLongTokenString",
"value": [
{
"id": "...",
"displayName": "Some Name",
"mail": "[email protected]",
"mobilePhone": "...",
"officeLocation": "...",
"surname": "Name",
"userPrincipalName": "[email protected]"
},
For complete details, please see Paging Microsoft Graph data in your app.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With