The usersPage() GraphQL query returns a page of all users in an organization. It requires either root access, organization owner access or permission to manage users in at least one repository or view.

For information on organization settings, see the Organization Settings documentation page. For information on user authorization, see the Managing Users & Permissions documentation page.

This field is not yet available. It's described here as a preview and is used for getting a new pagination pattern.

Syntax

Below is the syntax for the usersPage() query field:

graphql
usersPage(
      orderBy: OrderByUserFieldInput
      search: string
      pageNumber: integer!
      pageSize: integer!
   ): UsersPage!

Given Datatypes

For the given datatype, OrderByUserFieldInput, there are several parameters that may be given. Below is a list of them along with their datatypes and a description of each:

Table: OrderByUserFieldInput

ParameterTypeRequired[a]DefaultDescription
userFieldOrderByUserFieldyes The user field by which to sort users. The datatype is an enumerated list of chocies: FULLNAME, USERNAME, or DISPLAYNAME.
orderOrderByDirectionyes Whether to sort users in descending or ascending order. The datatype is an enumerated list: DESC, or ASC.

[a] Some arguments may be required, as indicated in this column. For some fields, this column indicates that a result will always be returned for it.


Returned Datatypes

The returned datatype usersPage() has its own parameters. Below is a list of them along with their datatypes and a description of each:

Table: UsersPage

ParameterTypeRequired[a]DefaultDescription
pageInfoPageTypeyes The page settings (see PageType Table).
page[User]yes The users included in the page (see User Table).

[a] Some arguments may be required, as indicated in this column. For some fields, this column indicates that a result will always be returned for it.