---
title: "Search service accounts with paging"
method: GET
path: "/serviceaccounts/search"
tags: ["service_accounts"]
---

# Search service accounts with paging

`GET /serviceaccounts/search`

Required permissions (See note in the [introduction](https://grafana.com/docs/grafana/latest/developers/http_api/serviceaccount/#service-account-api) for an explanation):
action: `serviceaccounts:read` scope: `serviceaccounts:*`

## Query parameters

- `Disabled` boolean
- `expiredTokens` boolean
- `query` string
- `perpage` integer
- `page` integer

## Response `200`

(empty)

- SearchOrgServiceAccountsResult — swagger: model
  - `page` integer
  - `perPage` integer
  - `serviceAccounts` ServiceAccountDTO[]
    - `accessControl` object
    - `avatarUrl` string
    - `id` integer
    - `isDisabled` boolean
    - `isExternal` boolean
    - `login` string
    - `name` string
    - `orgId` integer
    - `role` string
    - `tokens` integer
    - `uid` string
  - `totalCount` integer — It can be used for pagination of the user list E.g. if totalCount is equal to 100 users and the perpage parameter is set to 10 then there are 10 pages of users.

## Other responses

- `401` — UnauthorizedError is returned when the request is not authenticated.
- `403` — ForbiddenError is returned if the user/token has insufficient permissions to access the requested resource.
- `500` — InternalServerError is a general error indicating something went wrong internally.

---

[API](https://skmtc.net/grafana/apis/http-api.md) · [All operations](https://skmtc.net/grafana/apis/http-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/grafana/http-api/versions/df55ba1718ba/schema)
