---
updatedAt: 2026-05-27T05:24:21.000Z
agentTools:
  projectIndex: https://developers.toriihq.com/llms.txt
---

# List users

<p>Returns a list of users in the organization. Filtering is available via query parameters.</p>
<p><ul><li>Rate limit: 100 requests per minute</li></ul></p>

# OpenAPI definition

```json
{
  "servers": [
    {
      "url": "https://api.toriihq.com/v1.0"
    }
  ],
  "info": {
    "title": "Torii API Documentation",
    "version": "v1.0",
    "description": "The Torii API provides an easy way to integrate your data in Torii with any external system. The API closely follows REST semantics, uses JSON to encode objects, and relies on standard HTTP codes to signal operation outcomes. Torii APIs consist of both proprietary and SCIM 2.0 APIs."
  },
  "x-readme": {
    "explorer-enabled": true
  },
  "security": [
    {
      "ApiKeyAuth": []
    }
  ],
  "tags": [
    {
      "name": "Users",
      "description": "This is an object representing a user. Users include any user detected by Torii, including all admins in your account."
    }
  ],
  "openapi": "3.0.0",
  "components": {
    "securitySchemes": {
      "ApiKeyAuth": {
        "type": "apiKey",
        "in": "header",
        "name": "Authorization",
        "x-bearer-format": "bearer"
      }
    },
    "schemas": {
      "Model18": {
        "type": "string",
        "description": "Lifecycle status",
        "example": "active",
        "enum": [
          "active",
          "offboarding",
          "offboarded"
        ]
      },
      "AdditionalEmails": {
        "type": "array",
        "description": "List of additional emails",
        "items": {
          "type": "string",
          "description": "Email address",
          "example": "tony@stark.com",
          "nullable": true,
          "x-convert": {
            "case": "lower"
          }
        }
      },
      "User": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Unique user identifier",
            "example": 1000,
            "minimum": 1
          },
          "idOrg": {
            "type": "integer",
            "description": "Unique org identifier",
            "example": 1000,
            "minimum": 1
          },
          "firstName": {
            "type": "string",
            "example": "Tony",
            "nullable": true
          },
          "lastName": {
            "type": "string",
            "example": "Stark",
            "nullable": true
          },
          "email": {
            "type": "string",
            "description": "Email address",
            "example": "tony@stark.com",
            "nullable": true,
            "x-convert": {
              "case": "lower"
            }
          },
          "creationTime": {
            "type": "string",
            "format": "date-time",
            "description": "Creation time",
            "example": "2020-01-01T00:00:00.000Z"
          },
          "idRole": {
            "type": "number",
            "example": 1
          },
          "role": {
            "type": "string",
            "example": "Admin"
          },
          "lifecycleStatus": {
            "$ref": "#/components/schemas/Model18"
          },
          "isDeletedInIdentitySources": {
            "type": "boolean",
            "description": "true if the user has left the organization, false otherwise",
            "example": true
          },
          "isExternal": {
            "type": "boolean",
            "description": "true if the user is external, false otherwise",
            "example": true
          },
          "activeAppsCount": {
            "type": "integer",
            "example": 1
          },
          "additionalEmails": {
            "$ref": "#/components/schemas/AdditionalEmails"
          }
        }
      },
      "Users": {
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/User"
        }
      },
      "Model19": {
        "type": "object",
        "description": "Users",
        "properties": {
          "users": {
            "$ref": "#/components/schemas/Users"
          },
          "aggregations": {
            "x-meta": {
              "className": "aggregations"
            },
            "nullable": true,
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/AggregationBucket"
                }
              }
            ]
          },
          "count": {
            "type": "integer",
            "description": "The number of results returned in this response",
            "example": 100
          },
          "total": {
            "type": "integer",
            "description": "The total number of results",
            "example": 1000
          },
          "nextCursor": {
            "type": "string",
            "description": "A base64 string indicating the offset from which to start. <br>Pass the value of `nextCursor` returned from the previous call to get the next set of results",
            "example": "WzE0NjM1Mzg4NTcsIjY1NDMyMyJd"
          }
        }
      },
      "AggregationBucket": {
        "type": "object",
        "properties": {
          "key": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "number"
              }
            ]
          },
          "value": {
            "type": "number",
            "nullable": true
          },
          "groupCount": {
            "type": "integer"
          },
          "aggregations": {
            "type": "string",
            "description": "Nested aggregations with the same structure as the parent"
          }
        },
        "required": [
          "key"
        ]
      }
    }
  },
  "paths": {
    "/users": {
      "get": {
        "summary": "List users",
        "operationId": "getUsers",
        "description": "<p>Returns a list of users in the organization. Filtering is available via query parameters.</p>\n<p><ul><li>Rate limit: 100 requests per minute</li></ul></p>",
        "parameters": [
          {
            "name": "email",
            "in": "query",
            "schema": {
              "type": "string",
              "description": "Email address",
              "example": "tony@stark.com",
              "x-format": {
                "email": {
                  "minDomainSegments": 1,
                  "tlds": false
                }
              },
              "x-convert": {
                "case": "lower"
              }
            },
            "description": "Email address"
          },
          {
            "name": "lifecycleStatus",
            "in": "query",
            "schema": {
              "type": "string",
              "description": "Lifecycle status",
              "example": "active",
              "enum": [
                "active",
                "offboarding",
                "offboarded"
              ]
            },
            "description": "Lifecycle status"
          },
          {
            "name": "isDeletedInIdentitySources",
            "in": "query",
            "schema": {
              "type": "boolean",
              "description": "true if the user has left the organization, false otherwise",
              "example": true
            },
            "description": "true if the user has left the organization, false otherwise"
          },
          {
            "name": "isExternal",
            "in": "query",
            "schema": {
              "type": "boolean",
              "description": "true if the user is external, false otherwise",
              "example": true
            },
            "description": "true if the user is external, false otherwise"
          },
          {
            "name": "firstName",
            "in": "query",
            "schema": {
              "type": "string",
              "example": "Tony"
            }
          },
          {
            "name": "lastName",
            "in": "query",
            "schema": {
              "type": "string",
              "example": "Stark"
            }
          },
          {
            "name": "idUsers",
            "in": "query",
            "schema": {
              "type": "string",
              "description": "A comma separated list of idUser with a maximum of 50 IDs.",
              "example": "1,2,3,4,5,6",
              "maxLength": 50
            },
            "description": "A comma separated list of idUser with a maximum of 50 IDs."
          },
          {
            "name": "sort",
            "in": "query",
            "schema": {
              "type": "string",
              "description": "A comma-separated list of fields to sort by, with a postfix with either ':asc' or ':desc'. Fields can either be general, or custom to your organization",
              "example": "fullName:asc,role:desc"
            },
            "description": "A comma-separated list of fields to sort by, with a postfix with either ':asc' or ':desc'. Fields can either be general, or custom to your organization"
          },
          {
            "name": "size",
            "in": "query",
            "schema": {
              "type": "integer",
              "description": "The max amount of results to return",
              "example": 1000,
              "minimum": 1,
              "maximum": 1000
            },
            "description": "The max amount of results to return"
          },
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string",
              "description": "A base64 string indicating the offset from which to start. <br>Pass the value of `nextCursor` returned from the previous call to get the next set of results",
              "example": "WzE0NjM1Mzg4NTcsIjY1NDMyMyJd"
            },
            "description": "A base64 string indicating the offset from which to start. <br>Pass the value of `nextCursor` returned from the previous call to get the next set of results"
          },
          {
            "name": "aggs",
            "in": "query",
            "schema": {
              "type": "string",
              "description": "JSON string representing aggregation configuration. Structure: '{\"field\":\"string\",\"aggregationType\":\"metric|groupBy|date_range|date_histogram\",\"options\":{\"size\":\"integer\",\"sort\":{\"field\":\"string\",\"order\":\"desc|asc\",\"aggFunc\":\"total|sum|avg|max|min\"},\"metricFunction\":\"total|sum|avg|max|min\",\"dateHistogramOptions\":{\"datePeriod\":\"hourly|daily|weekly|monthly|quarterly|yearly\",\"hardBounds\":{\"min\":\"string\",\"max\":\"string\"},\"extendedBounds\":{\"min\":\"string\",\"max\":\"string\"},\"filterEmptyBuckets\":\"boolean\"}},\"aggs\":{\"field\":\"string\",\"aggregationType\":\"metric|groupBy|date_range|date_histogram\",\"options\":{\"metricFunction\":\"total|sum|avg|max|min\"}}}'. `metricFunction` is REQUIRED when aggregationType is \"metric\". For aggregationType \"date_histogram\", `options.dateHistogramOptions` is REQUIRED and `datePeriod`, `hardBounds`, `extendedBounds` and `filterEmptyBuckets` all live INSIDE it — putting them directly on `options` is rejected with 400 \"options.dateHistogramOptions\" is required. The nested \"aggs\" is OPTIONAL and, when present, must be a JSON OBJECT with this same structure — never a JSON-encoded string.",
              "example": "{\"field\":\"lifecycleStatus\",\"aggregationType\":\"groupBy\",\"options\":{\"sort\":{\"order\":\"desc\",\"aggFunc\":\"total\"},\"size\":5}}",
              "x-meta": {
                "className": "aggs"
              }
            },
            "description": "JSON string representing aggregation configuration. Structure: '{\"field\":\"string\",\"aggregationType\":\"metric|groupBy|date_range|date_histogram\",\"options\":{\"size\":\"integer\",\"sort\":{\"field\":\"string\",\"order\":\"desc|asc\",\"aggFunc\":\"total|sum|avg|max|min\"},\"metricFunction\":\"total|sum|avg|max|min\",\"dateHistogramOptions\":{\"datePeriod\":\"hourly|daily|weekly|monthly|quarterly|yearly\",\"hardBounds\":{\"min\":\"string\",\"max\":\"string\"},\"extendedBounds\":{\"min\":\"string\",\"max\":\"string\"},\"filterEmptyBuckets\":\"boolean\"}},\"aggs\":{\"field\":\"string\",\"aggregationType\":\"metric|groupBy|date_range|date_histogram\",\"options\":{\"metricFunction\":\"total|sum|avg|max|min\"}}}'. `metricFunction` is REQUIRED when aggregationType is \"metric\". For aggregationType \"date_histogram\", `options.dateHistogramOptions` is REQUIRED and `datePeriod`, `hardBounds`, `extendedBounds` and `filterEmptyBuckets` all live INSIDE it — putting them directly on `options` is rejected with 400 \"options.dateHistogramOptions\" is required. The nested \"aggs\" is OPTIONAL and, when present, must be a JSON OBJECT with this same structure — never a JSON-encoded string."
          },
          {
            "name": "fields",
            "in": "query",
            "schema": {
              "type": "string",
              "description": "List of fields to return for each user.<br>Allowed fields: `idOrg`, `firstName`, `lastName`, `email`, `creationTime`, `idRole`, `lifecycleStatus`, `isDeletedInIdentitySources`, `isExternal`, `activeAppsCount`, `role`, `additionalEmails` and all fields from `/users/fields`. id and additionalEmails are always returned.",
              "example": "firstName,lastName,email,lifecycleStatus,role",
              "default": "idOrg,firstName,lastName,email,creationTime,idRole,lifecycleStatus,isDeletedInIdentitySources,isExternal,activeAppsCount,role,additionalEmails"
            },
            "description": "List of fields to return for each user.<br>Allowed fields: `idOrg`, `firstName`, `lastName`, `email`, `creationTime`, `idRole`, `lifecycleStatus`, `isDeletedInIdentitySources`, `isExternal`, `activeAppsCount`, `role`, `additionalEmails` and all fields from `/users/fields`. id and additionalEmails are always returned."
          },
          {
            "name": "q",
            "in": "query",
            "schema": {
              "type": "string",
              "description": "The query to search"
            },
            "description": "The query to search"
          },
          {
            "name": "qFields",
            "in": "query",
            "schema": {
              "type": "string",
              "description": "A comma-separated list of fields the query to search applies to. Fields can either be general, or custom to your organization",
              "default": "fullName,email,additionalEmails"
            },
            "description": "A comma-separated list of fields the query to search applies to. Fields can either be general, or custom to your organization"
          },
          {
            "name": "view",
            "in": "query",
            "schema": {
              "type": "string",
              "description": "The view to use",
              "example": "currentEmployees",
              "enum": [
                "currentEmployees",
                "pastEmployees",
                "allEmployees",
                "currentUsers",
                "pastUsers",
                "allUsers",
                "currentNonHumanUsers",
                "pastNonHumanUsers",
                "allNonHumanUsers",
                "externalUsers"
              ]
            },
            "description": "The view to use"
          },
          {
            "name": "filters",
            "in": "query",
            "schema": {
              "type": "string",
              "description": "Filters expression — accepts either shape: (1) Flat array of filter objects, AND-combined. Each item is {key, op, value}. (2) Array of filter groups, OR-combined. Each item is {id, filters} where filters is a flat array. See *_fields_metadata for valid keys and per-filterType operators. Omit value for isSet/isNotSet/relativeDateToday/exists/notExists. Use an array value for anyOf/allOf/noneOf/isExactly. Sent on the wire as a JSON-encoded string.",
              "example": "[{\"key\":\"lifecycleStatus\",\"op\":\"equals\",\"value\":\"active\"}]"
            },
            "description": "Filters expression — accepts either shape: (1) Flat array of filter objects, AND-combined. Each item is {key, op, value}. (2) Array of filter groups, OR-combined. Each item is {id, filters} where filters is a flat array. See *_fields_metadata for valid keys and per-filterType operators. Omit value for isSet/isNotSet/relativeDateToday/exists/notExists. Use an array value for anyOf/allOf/noneOf/isExactly. Sent on the wire as a JSON-encoded string."
          }
        ],
        "tags": [
          "Users"
        ],
        "responses": {
          "200": {
            "description": "Users",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Model19"
                }
              }
            }
          }
        }
      }
    }
  }
}
```