---
title: "GET /v1/service-accounts/{name}"
method: GET
path: "/v1/service-accounts/{name}"
tags: ["service-accounts"]
---

# GET /v1/service-accounts/{name}

`GET /v1/service-accounts/{name}`

Returns a specific ServiceAccount.

## Path parameters

- `name` string, required

## Response `200`

Happy response.

- ServiceAccount
  - `name` string, required
  - `display_name` string, required
  - `id` string, required
  - `lrn` string, required — Contains the resource identifier for use in access control policies.
  - `created_at` string, date-time, required
  - `description` string, required
  - `groups` CompactGroup[], required
    - `name` string, required
    - `display_name` string, required
    - `lrn` string, required — Contains the resource identifier for use in access control policies.
    - `id` string, required
    - `created_at` string, date-time, required
    - `description` string, required
    - `user_count` integer, required — Is set to the number of users in this group.
    - `sa_count` integer, required — Is set to the number of service accounts in this group.
    - `role_count` integer, required — Is set to the number of roles associated with this group.
    - `metadata` Metadata — Allows attaching custom string key/values to resources. The following maxima apply: - 50 keys/values; - 40 bytes key length; - 500 bytes value length.
  - `token_expires_at` string, date-time — If null, it won't expire.
  - `token_expired` boolean, required
  - `last_seen_at` string, date-time — Updates when this service account has interaction with the API.
  - `is_admin` boolean, required
  - `metadata` Metadata — Allows attaching custom string key/values to resources. The following maxima apply: - 50 keys/values; - 40 bytes key length; - 500 bytes value length.

## Other responses

- `default` — Error object.

---

[API](https://skmtc.net/lensesio/apis/lenses-hq-api.md) · [All operations](https://skmtc.net/lensesio/apis/lenses-hq-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/lensesio/lenses-hq-api/revisions/9db591647ff6/schema)
