I have the below code which returns all users based on a filter. The problem is it only returns 100 users but I know there are a lot more.
private List<User> GetUsersFromGraph()
{
if (_graphAPIConnectionDetails == null) ReadParametersFromXML();
if (graphServiceClient == null) graphServiceClient = CreateGraphServiceClient();
var users = graphServiceClient
.Users
.Request()
.Filter(_graphAPIConnectionDetails.UserFilter)
.Select(_graphAPIConnectionDetails.UserAttributes)
.GetAsync()
.Result
.ToList<User>();
return users;
}
the method returns only 100 user objects. My Azure portal admin reports there should be closer to 60,000.