anguage-TypeScript">import { graphfi, DefaultHeaders } from &quot;@pnp/graph&quot;;
import &quot;@pnp/graph/users&quot;;

const graph = graphfi().using(DefaultHeaders());

const allUsers = [];
let users = await graph.users.top(300).paged();

allUsers.push(...users.value);

while (users.hasNext) {
  users = await users.next();
  allUsers.push(...users.value);
}

console.log(`All users: ${JSON.stringify(allUsers)}`);
</code></pre>
<p>Beyond the basics other query operations are supported such as filter and se