> For the complete documentation index, see [llms.txt](https://docs.apolo.us/index/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.apolo.us/index/apolo-cli/commands/service-account.md).

# service-account

Operations with service accounts

## Usage

```bash
apolo service-account [OPTIONS] COMMAND [ARGS]...
```

Operations with service accounts.

**Commands:**

| Usage               | Description                             |
| ------------------- | --------------------------------------- |
| [*create*](#create) | Create a service account                |
| [*get*](#get)       | Get service account SERVICE\_ACCOUNT    |
| [*ls*](#ls)         | List service accounts                   |
| [*rm*](#rm)         | Remove service account SERVICE\_ACCOUNT |

### create

Create a service account

#### Usage

```bash
apolo service-account create [OPTIONS]
```

Create a service account.

The `create` command returns the service account object and the token during creation. The token is only shown at creation time. Store it securely. If you need to hand the token to an external client, use a secure channel.

The `CLI` exposes two token forms:

* a full passed- config token, which can be used as `APOLO_PASSED_CONFIG`
* a raw auth token, which can be used with `apolo config login-with-token`

#### Options

| Name                        | Description                                                                     |
| --------------------------- | ------------------------------------------------------------------------------- |
| *--help*                    | Show this message and exit.                                                     |
| *--default-cluster CLUSTER* | Service account default cluster. Current cluster will be used if not specified  |
| *--default-org ORG*         | Service account default organization. Current org will be used if not specified |
| *--default-project PROJECT* | Service account default project. Current project will be used if not specified  |
| *--name NAME*               | Optional service account name                                                   |

### get

Get service account SERVICE\_ACCOUNT

#### Usage

```bash
apolo service-account get [OPTIONS] SERVICE_ACCOUNT
```

Get service account `SERVICE_ACCOUNT`.

The output includes the backing role used for `ACL` grants.

#### Options

| Name     | Description                 |
| -------- | --------------------------- |
| *--help* | Show this message and exit. |

### ls

List service accounts

#### Usage

```bash
apolo service-account ls [OPTIONS]
```

List service accounts.

Service accounts are non-human identities for automation, integrations, `API` clients, and external collaborators.

Service account access is managed in Apolo. The token is created by Apolo and must be stored securely.

#### Options

| Name     | Description                 |
| -------- | --------------------------- |
| *--help* | Show this message and exit. |

### rm

Remove service account SERVICE\_ACCOUNT

#### Usage

```bash
apolo service-account rm [OPTIONS] SERVICE_ACCOUNTS...
```

Remove service account `SERVICE_ACCOUNT`.

#### Options

| Name     | Description                 |
| -------- | --------------------------- |
| *--help* | Show this message and exit. |
