> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sabaothcloud.com/llms.txt
> Use this file to discover all available pages before exploring further.

# sabaoth org list

> List the organizations you can act in

Lists the organizations you can act in and marks the selected one.

```bash theme={null}
sabaoth org list [--json]
```

## Flags

**--json** `boolean` (default: false)

Print the result as JSON on stdout.

## Output

```text theme={null}
$ sabaoth org list
Registered Organizations:
  * org_abc  Acme
    org_xyz  Side Project
```

With `--json`:

```json theme={null}
{
  "source": "local",
  "organizations": [
    { "id": "org_abc", "display_name": "Acme", "selected": true },
    { "id": "org_xyz", "display_name": "Side Project", "selected": false }
  ]
}
```

`source` is `local` when the list comes from this machine and `environment` when it comes from `SABAOTH_API_KEY`.

## Behavior

The command works differently depending on where your credential comes from:

| Credential | Where the list comes from | Network call |
| - | - | - |
| Saved login (keychain) | The organizations stored on this machine | No |
| `SABAOTH_API_KEY` | The organizations the API confirms for that key. Saved state isn't read at all. | Yes |

With `SABAOTH_API_KEY` set, the heading reads `Organizations available to SABAOTH_API_KEY (saved selection ignored):`. Showing organizations from this machine that the key can't use would suggest access that isn't there.

If nothing is stored and `SABAOTH_API_KEY` isn't set, the command succeeds with an empty list and suggests running `sabaoth login`.

## Errors

With `SABAOTH_API_KEY` set, the API call can fail with `API_KEY_UNAUTHORIZED`, `NETWORK_UNAVAILABLE`, `RATE_LIMITED` or `API_UNAVAILABLE`. See [Error codes](https://docs.sabaothcloud.com/cli/errors.md).

## Related

* [`sabaoth org use`](https://docs.sabaothcloud.com/cli/commands/org-use)
* [Organizations and context](https://docs.sabaothcloud.com/cli/organizations.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.