Users: list

Retrieves a paginated list of either deleted users or all users in a domain. Try it now.


HTTP request



Parameter name Value Description
Optional query parameters
customFieldMask string A comma-separated list of schema names. All fields from these schemas are fetched. This should only be set when projection=custom.
customer string The unique ID for the customer's G Suite account. In case of a multi-domain account, to fetch all groups for a customer, fill this field instead of domain. You can also use the my_customer alias to represent your account's customerId. The customerId is also returned as part of the Users resource. Either the customer or the domain parameter must be provided.
domain string The domain name. Use this field to get fields from only one domain. To return all domains for a customer account, use the customer query parameter instead. Either the customer or the domain parameter must be provided.
maxResults integer Maximum number of results to return. Acceptable values are 1 to 500, inclusive. (Default: 100)
orderBy string Property to use for sorting results.

Acceptable values are:
  • "email": Primary email of the user.
  • "familyName": User's family name.
  • "givenName": User's given name.
pageToken string Token to specify next page in the list
projection string What subset of fields to fetch for this user.

Acceptable values are:
  • "basic": Do not include any custom fields for the user. (default)
  • "custom": Include custom fields from schemas requested in customFieldMask.
  • "full": Include all fields associated with this user.
query string Query string for searching user fields. For more information on constructing user queries, see Search for Users.
showDeleted string If set to true, retrieves the list of deleted users. (Default: false)
sortOrder string Whether to return results in ascending or descending order.

Acceptable values are:
  • "ASCENDING": Ascending order.
  • "DESCENDING": Descending order.
viewType string Whether to fetch the administrator-only or domain-wide public view of the user. For more information, see Retrieve a user as a non-administrator.

Acceptable values are:
  • "admin_view": Results include both administrator-only and domain-public fields for the user. (default)
  • "domain_public": Results only include fields for the user that are publicly visible to other users in the domain. Contact sharing must be enabled for the domain.


This request requires authorization with at least one of the following scopes:


For more information, see the authentication and authorization page.

Request body

Do not supply a request body with this method.


If successful, this method returns a response body with the following structure:

  "kind": "admin#directory#users",
  "etag": etag,
  "users": [
    users Resource
  "nextPageToken": string
Property name Value Description Notes
kind string The type of the API resource. For Users resources, the value is admin#directory#users.
users[] list List of user objects.
nextPageToken string Token used to access next page of this result.
etag etag ETag of the resource.

Try it!

Use the APIs Explorer below to call this method on live data and see the response.