We are receiving only 100 users from below code (Asp.Net Core Api). We want to receive all users from Azure AD.
var token = await _tokenAcquisition.GetAccessTokenForUserAsync("User.Read.All");
var client = _clientFactory.CreateClient();
client.BaseAddress = new Uri("https://graph.microsoft.com/v1.0");
client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
var graphClient = new GraphServiceClient(client)
{
AuthenticationProvider = new DelegateAuthenticationProvider((requestMessage) =>
{
requestMessage.Headers.Authorization = new AuthenticationHeaderValue("bearer", token);
return Task.CompletedTask;
}),
BaseUrl = "https://graph.microsoft.com/v1.0"
};
return graphClient.Users.Request().GetAsync();