---
title: "Fetch all saved service accounts"
method: GET
path: "/service-accounts"
tags: ["Service Accounts"]
---

# Fetch all saved service accounts

`GET /service-accounts`

## Request

- Base URL: `https://console.jumpcloud.com/api/v2`
- URL: `https://console.jumpcloud.com/api/v2/service-accounts`
- Auth: API key in header `x-api-key`
- TypeScript: <https://skmtc.dev/jumpcloud/apis/jumpcloud-api-2/docs/service-accounts/get.ts> (a function with typed inputs; its response is checked against the schema)

Retrieves a list of service accounts with support for filtering, sorting, and pagination. Auth config is not included in the service accounts. Filters use field:operator:value clauses, ANDed together. Pass comma-separated clauses in a single filter value and/or repeated filter query parameters. Supported fields: role_id (eq, in), auth_type (eq, in — CLIENT_SECRET, API_KEY), status (eq, in — ACTIVE, EXPIRING, EXPIRED), expires_at (ge, lt — RFC3339 on the latest auth config). For in, join values with |. Example: filter=status:eq:ACTIVE,auth_type:in:CLIENT_SECRET|API_KEY&filter=expires_at:ge:2026-01-01T00:00:00Z

## Query parameters

- `limit` integer
- `skip` integer
- `search.fields` string[]
- `search.searchTerm` string
- `sort` string
- `filter` string[]

## Headers

- `x-org-id` string

## Response `200`

Service accounts list successfully retrieved.

- JumpcloudServiceAccountsListServiceAccountsResponse
  - `results` JumpcloudServiceAccountsServiceAccount[]
    - `authConfigList` JumpcloudServiceAccountsAuthConfig[]
      - `apiKeyConfig` JumpcloudServiceAccountsApiKeyConfig: contains configuration for an API key auth config (prefix on read; full key once on create).
        - `apiKey` string
        - `apiKeyPrefix` string
        - `createdAt` string, date-time
        - `createdBy` JumpcloudServiceAccountsServiceAccountActor
          - `id` string, byte
          - `name` string
          - `type` 'ADMIN' | 'SERVICE_ACCOUNT': - ADMIN: the actor is admin - SERVICE_ACCOUNT: the actor is a service account
        - `expiresAt` string, date-time
        - `lifetime` string
        - `objectId` string, byte
        - `status` 'ACTIVE' | 'EXPIRED' | 'EXPIRING'
      - `authType` 'AUTH_TYPE_UNSPECIFIED' | 'CLIENT_SECRET' | 'API_KEY': - AUTH_TYPE_UNSPECIFIED: unspecified authentication type - CLIENT_SECRET: client secret authentication - API_KEY: API key authentication (jcs_* direct org)
      - `clientSecretConfig` JumpcloudServiceAccountsClientSecretConfig
        - `clientId` string
        - `clientSecret` string: client secret associated with the client ID. This field will hold the secret only at the time of creation and will be visible to users only once. The subsequent retrievals will not return the secret for security reasons.
        - `createdAt` string, date-time
        - `createdBy` JumpcloudServiceAccountsServiceAccountActor
          - `id` string, byte
          - `name` string
          - `type` 'ADMIN' | 'SERVICE_ACCOUNT': - ADMIN: the actor is admin - SERVICE_ACCOUNT: the actor is a service account
        - `expiresAt` string, date-time
        - `lifetime` string
        - `objectId` string, byte
        - `status` 'ACTIVE' | 'EXPIRED' | 'EXPIRING'
    - `authType` 'AUTH_TYPE_UNSPECIFIED' | 'CLIENT_SECRET' | 'API_KEY': - AUTH_TYPE_UNSPECIFIED: unspecified authentication type - CLIENT_SECRET: client secret authentication - API_KEY: API key authentication (jcs_* direct org)
    - `createdAt` string, date-time
    - `expiresAt` string, date-time
    - `name` string
    - `objectId` string, byte
    - `orgCount` integer
    - `orgId` string, byte
    - `providerId` string, byte
    - `roleId` string, byte
    - `roleName` string: DEPRECATED: Call roles API with the role_id to get the role name.
    - `status` 'ACTIVE' | 'EXPIRED' | 'EXPIRING'
  - `totalCount` integer

## Other responses

- `400`: Bad Request
- `401`: Unauthorized
- `403`: Forbidden
- `500`: Internal Server Error
- `503`: Service Unavailable

---

[API](https://skmtc.dev/jumpcloud/apis/jumpcloud-api-2.md) - [All operations](https://skmtc.dev/jumpcloud/apis/jumpcloud-api-2/llms.txt) - [OpenAPI document](https://skmtc.dev/jumpcloud/apis/jumpcloud-api-2/revisions/3f09fe63caaa?raw)
