---
title: "List all accounts"
method: GET
path: "/authorization/accounts"
tags: ["Authorization"]
---

# List all accounts

`GET /authorization/accounts`

## Request

- Base URL: `https://example.itential.io`
- URL: `https://example.itential.io/authorization/accounts`
- Auth: none declared

Returns all accounts.

## Query parameters

- `multiContains` IapAuthorizationCommonAccountsQuery
  - `username` string
  - `firstname` string
  - `email` string
  - `provenance` string
- `multiEquals` IapAuthorizationCommonAccountsQuery
  - `username` string
  - `firstname` string
  - `email` string
  - `provenance` string
- `multiStartsWith` IapAuthorizationCommonAccountsQuery
  - `username` string
  - `firstname` string
  - `email` string
  - `provenance` string
- `inactive` boolean: Setting for whether account is active or not
- `isServiceAccount` boolean: Value denoting if an account does not reflect a human user
- `groupId` string: String representation of a MongoDB ObjectId
- `skip` integer: Number of results to skip. Used for pagination.
- `limit` integer: Number of results to return. Used for pagination.
- `sort` 'name': Field to sort by. Default is name.
- `order` '-1' | '1': The sort direction: 1 for ascending or -1 for descending.
- `loggedIn` boolean: Property used in the getAccounts API to indicate a user is currently logged in

## Response `200`

The accounts matching the specified query.

- AuthorizationGetAccountsResponse200
  - `results` IapAccountsSchema: This is the schema for an IAP account stored in Mongo
    - `provenance` string, required: AAA provider where account originated
    - `username` string, required: Username for account
    - `firstname` string, required: The user's first name
    - `memberOf` IapAccountsSchemaMemberOfItems[], required: Groups which this account is a part of
      - `aaaManaged` boolean: Whether group comes from an external AAA or not
      - `groupId` string: String representation of a MongoDB ObjectId
    - `assignedRoles` IapAccountsSchemaAssignedRolesItems[], required: Roles assigned to this account
      - `roleId` string: String representation of a MongoDB ObjectId
    - `inactive` boolean, required: Setting for whether account is active or not
    - `lastLogin` string: Date and time when the user last logged in
    - `sso` boolean: Whether this is an SSO user
    - `nameID` string: DEPRECATED: Identifier for SSO account.
    - `_meta` IapAccountsSchemaMeta
      - `created` string: When the account was created
      - `updated` string: When the account was last updated
    - `email` string: Email for user
    - `isServiceAccount` boolean: Value denoting if an account does not reflect a human user
    - `loggedIn` boolean: Property used in the getAccounts API to indicate a user is currently logged in
    - `gitTokens` IapAccountsSchemaGitTokens, required: Tokens used when interacting with Git APIs and features
      - `GitHub` string: Personal access token for GitHub
      - `GitLab` string: Personal access token for GitLab
  - `total` integer: The total number of documents

## Other responses

- `500`: Error response from API

---

[API](https://skmtc.dev/itential/apis/itential-2.md) - [All operations](https://skmtc.dev/itential/apis/itential-2/llms.txt) - [OpenAPI document](https://skmtc.dev/itential/apis/itential-2/revisions/2095cc90e583?raw)
