Method: projects.accounts.query

Stay organized with collections Save and categorize content based on your preferences.

Looks up user accounts within a project or a tenant based on conditions in the request.

HTTP request


The URL uses gRPC Transcoding syntax.

Path parameters



The ID of the project to which the result is scoped.

Authorization requires the following IAM permission on the specified resource targetProjectId:

  • firebaseauth.users.get

Request body

The request body contains data with the following structure:

JSON representation
  "returnUserInfo": boolean,
  "limit": string,
  "offset": string,
  "sortBy": enum (SortByField),
  "order": enum (Order),
  "tenantId": string,
  "expression": [
      object (SqlExpression)


If true, this request will return the accounts matching the query. If false, only the count of accounts matching the query will be returned. Defaults to true.


string (int64 format)

The maximum number of accounts to return with an upper limit of 500. Defaults to 500. Only valid when returnUserInfo is set to true.


string (int64 format)

The number of accounts to skip from the beginning of matching records. Only valid when returnUserInfo is set to true.


enum (SortByField)

The field to use for sorting user accounts. Defaults to USER_ID. Note: when phoneNumber is specified in expression, the result ignores the sorting. Only valid when returnUserInfo is set to true.


enum (Order)

The order for sorting query result. Defaults to ascending order. Only valid when returnUserInfo is set to true.



The ID of the tenant to which the result is scoped.


object (SqlExpression)

Query conditions used to filter results. If more than one is passed, only the first SqlExpression is evaluated.

Response body

If successful, the response body contains an instance of QueryUserInfoResponse.

Authorization Scopes

Requires one of the following OAuth scopes:


For more information, see the Authentication Overview.