---
title: Auth
description: 'Identity and access: who you are, and what you’re allowed to do.'
canonical: 'https://lightning.ai/docs/cli/stable/command-details/auth'
---
# Auth {#auth}

Identity and access: who you are, and what you’re allowed to do.

**Usage:**

```console
lightning auth [OPTIONS] COMMAND [ARGS]...
```

## Commands {#auth-commands}

| Command | Description |
| --- | --- |
| [`role`](#auth-role) | Describe what a role is allowed to do. |
| [`roles`](#auth-roles) | List the roles in a teamspace and mark which ones you hold. |
| [`status`](#auth-status) | Show the credential requests send, who it acts as, and what it reaches. |
| [`token`](#auth-token) | Print the credential requests send. |
| [`whoami`](#auth-whoami) | Show who you are authenticated as. |

## lightning auth role {#auth-role}

Describe what a role is allowed to do.

ROLE\_ID is the id of the role; run lightning auth roles to find it.

**Usage:**

```console
lightning auth role [OPTIONS] ROLE_ID
```

### Arguments {#auth-role-arguments}

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `ROLE_ID` | `text` | yes | No description provided. |

### Options {#auth-role-options}

| Option | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `--teamspace` | `TEXT` | no | `Sentinel.UNSET` | Teamspace the role belongs to, as ‘owner/teamspace’. Falls back to your default teamspace. |
| `--json` | — | no | — | Output the role as JSON. |

## lightning auth roles {#auth-roles}

List the roles in a teamspace and mark which ones you hold.

**Usage:**

```console
lightning auth roles [OPTIONS]
```

### Options {#auth-roles-options}

| Option | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `--teamspace` | `TEXT` | no | `Sentinel.UNSET` | Teamspace to list roles for, as ‘owner/teamspace’. Falls back to your default teamspace. |
| `--json` | — | no | — | Output roles as JSON. |

## lightning auth status {#auth-status}

Show the credential requests send, who it acts as, and what it reaches.

**Usage:**

```console
lightning auth status [OPTIONS]
```

## lightning auth token {#auth-token}

Print the credential requests send. A saved login has at least 30 minutes left.

**Usage:**

```console
lightning auth token [OPTIONS]
```

## lightning auth whoami {#auth-whoami}

Show who you are authenticated as.

Works for both a personal login and a scoped API key. For a scoped key it also reports the org, project and role the key is bound to.

**Usage:**

```console
lightning auth whoami [OPTIONS]
```

### Options {#auth-whoami-options}

| Option | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `--json` | — | no | — | Output identity as JSON. |

---

**Navigation**

- Parent: [Command details](/docs/cli/2026.11.20/command-details.md)
