---
title: "Get service accounts from the database"
method: GET
path: "/oauth/serviceAccounts"
tags: ["OAuth"]
---

# Get service accounts from the database

`GET /oauth/serviceAccounts`

## Request

- Base URL: `https://example.itential.io`
- URL: `https://example.itential.io/oauth/serviceAccounts`
- Auth: none declared

Returns service accounts from the database.

## Query parameters

- `multiContains` OauthServiceAccountsGetParametersMultiContains
  - `name` string: The name associated with the service account
  - `description` string: The description of the service account
- `multiEquals` OauthServiceAccountsGetParametersMultiEquals
  - `name` string: The name associated with the service account
  - `description` string: The description of the service account
- `multiStartsWith` OauthServiceAccountsGetParametersMultiStartsWith
  - `name` string: The name associated with the service account
  - `description` string: The description of the service account
- `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.

## Response `200`

The service accounts matching the specified query.

- OauthGetServiceAccountsResponse200
  - `results` OauthServiceAccountsGetResponsesContentApplicationJsonSchemaResultsItems[]
    - `name` string: The name associated with the service account
    - `description` string: The description of the service account
    - `client_id` string: String representation of a MongoDB ObjectId
    - `_meta` OauthServiceAccountsGetResponsesContentApplicationJsonSchemaResultsItemsMeta
      - `created` string
      - `createdBy` IapServiceAccountsSchemaModifiedByDereferenced
        - `_id` string: String representation of a MongoDB ObjectId
        - `username` string
      - `updated` string
      - `updatedBy` IapServiceAccountsSchemaModifiedByDereferenced
        - `_id` string: String representation of a MongoDB ObjectId
        - `username` string
      - `secretUpdated` string
  - `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)
