title: Unable to fecth all user details using Microsoft Graph api graphServiceClient.Users.Request() C#
body: <p>I am running below code :</p>
  
  <pre><code>using Microsoft.Graph;
  using Microsoft.Identity.Client;
  using System;
  
  namespace MSGraphAPI
  {
      class Program
      {
  
  
          private static string clientId = "XXXXX";
  
  
          private static string tenantID = "XXXX";
  
  
          private static string objectId = "XXXX";
  
  
          private static string clientSecret = "XXXX";
  
          static async System.Threading.Tasks.Task Main(string[] args)
          {
  
  
  
  
              //     IConfidentialClientApplication confidentialClientApplication = ConfidentialClientApplicationBuilder
              //.Create(clientId)
              //.WithTenantId(tenantID)
              //.WithClientSecret(clientSecret)
              //.Build();
  
              //        ClientCredentialProvider authProvider = new ClientCredentialProvider(confidentialClientApplication);
  
              //        GraphServiceClient graphClient = new GraphServiceClient(authProvider);
  
              //        var users = await graphClient.Users
              //            .Request()
              //            .GetAsync();
  
  
              var tenantId = "XXXX.onmicrosoft.com";
  
              // The client ID of the app registered in Azure AD
              var clientId = "XXXX";
  
              // *Never* include client secrets in source code!
              var clientSecret = "XXXX"; // Or some other secure place.
  
              // The app registration should be configured to require access to permissions
              // sufficient for the Microsoft Graph API calls the app will be making, and
              // those permissions should be granted by a tenant administrator.
              var scopes = new string[] { "https://graph.microsoft.com/.default" };
  
              // Configure the MSAL client as a confidential client
              var confidentialClient = ConfidentialClientApplicationBuilder
                  .Create(clientId)
                  .WithAuthority($"https://login.microsoftonline.com/XXXXX.onmicrosoft.com/v2.0")
                  .WithClientSecret(clientSecret)
                  .Build();
  
              // Build the Microsoft Graph client. As the authentication provider, set an async lambda
              // which uses the MSAL client to obtain an app-only access token to Microsoft Graph,
              // and inserts this access token in the Authorization header of each API request. 
              GraphServiceClient graphServiceClient =
                  new GraphServiceClient(new DelegateAuthenticationProvider(async (requestMessage) =&gt; {
  
          // Retrieve an access token for Microsoft Graph (gets a fresh token if needed).
          var authResult = await confidentialClient
              .AcquireTokenForClient(scopes)
              .ExecuteAsync();
  
          // Add the access token in the Authorization header of the API request.
          requestMessage.Headers.Authorization =
              new System.Net.Http.Headers.AuthenticationHeaderValue("Bearer", authResult.AccessToken);
                  })
                  );
  
              // Make a Microsoft Graph API query
              var users = await graphServiceClient.Users.Request().GetAsync();
              Console.WriteLine(users.ToString());
  
              IGraphServiceUsersCollectionPage userss = graphServiceClient.Users.Request().GetAsync().Result;
              foreach (User user in userss)
              {
                  Console.WriteLine("Found user: " + user.DisplayName);
              }
          }
      }
  }
  </code></pre>
  
  <p>I am getting only 100 users ( when i use debug and check the count and also put a watch on this variable)  in the userss variable  , but total number of users is around 1000 . I want to fetch all user details and also want to fetch users based on specific criteria using select or any other api in the same code.</p>
  
  <p>Please help me.</p>