title: Microsoft Graph API fetch user collection from Group members using java
body: <p>I need to fetch the users from a group with certain ID. For this one there is a code snippet in the official documentation.</p>
  <p><a href="https://docs.microsoft.com/en-us/graph/api/group-list-members?view=graph-rest-1.0&amp;tabs=java" rel="nofollow noreferrer">https://docs.microsoft.com/en-us/graph/api/group-list-members?view=graph-rest-1.0&amp;tabs=java</a></p>
  <pre><code>    GraphServiceClient graphClient = GraphServiceClient.builder().authenticationProvider( authProvider ).buildClient();
  
  LinkedList&lt;Option&gt; requestOptions = new LinkedList&lt;Option&gt;();
  requestOptions.add(new HeaderOption(&quot;ConsistencyLevel&quot;, &quot;eventual&quot;));
  requestOptions.add(new QueryOption(&quot;$search&quot;, &quot;displayName:Pr&quot;));
  
  UserCollectionPage user = graphClient.groups(&quot;{id}&quot;).members().microsoft.graph.user()
      .buildRequest( requestOptions )
      .select(&quot;displayName,id&quot;)
      .orderBy(&quot;displayName&quot;)
      .get();
  </code></pre>
  <p>As can be seen from the above sample given, there is a chain call after members(). method, however although I use the latest version from maven central repository, .microsoft() method does not exist and isn't resolving to anything.
  If I use members().buildRequest().get() then it brings me an another directory instance but not the usercollectionpage list. How can i fix this problem?</p>