---
title: whoami
description: Check the authenticated account and selected Workspace.
canonical_url: https://orchestor.io/docs/en/cli/whoami
markdown_url: https://orchestor.io/docs/en/cli/whoami.md
contentType: reference
---

# whoami

`orc whoami` displays the account associated with the CLI credentials and the selected Workspace. You can check the authentication method, user information, the source of the Workspace selection, and whether it matches the credentials.

Valid credentials are required. To sign in with a different account, use [`orc auth login`](https://orchestor.io/docs/cli/auth.md).

## Usage

```bash title="terminal"
orc whoami
```

*Check the account and Workspace used by the CLI.*

Compatibility aliases: `orc account whoami`, `orc auth whoami`, `orc auth me`.

## Examples

### Retrieve account and Workspace information as JSON.

The output data includes `authenticated`, `auth`, `user`, and `workspace`. Use `auth` to check the authentication method and credential source, and `user` to check account information.

```bash title="terminal"
orc whoami --json
```

*Retrieve account and Workspace information as JSON.*

### Compare the specified Workspace with the Workspace in the credentials.

`workspace.configured_id` is the value specified in the CLI, and `workspace.authenticated_id` is the Workspace returned by the server. When both exist, `workspace.matches` is `true` if they match and `false` if they differ. It is `null` when either is missing.

```bash title="terminal"
orc whoami --workspace 123e4567-e89b-42d3-a456-426614174000 --json
```

*Compare the specified Workspace with the Workspace in the credentials.*

## Workspace selection

The Workspace is selected in this order: `--workspace`, `ORCHESTOR_WORKSPACE_ID`, `.orchestor/workspace.json` in the current directory, then the global configuration. If none is configured, the Workspace returned by the server is used. Check `workspace.source` to see where the selection came from.

When `workspace.matches` is `false`, the specified Workspace differs from the Workspace in the credentials. This command displays that state. Check the account and selection settings before operating in the intended Workspace.

## Authentication errors

If authentication validation returns an invalid result, the command displays `Authentication is invalid.` and exits with an authentication error. Sign in with [`orc auth login`](https://orchestor.io/docs/cli/auth.md), or check the configured API key, then run the command again.

## Global Options

The following [global options](https://orchestor.io/docs/cli/global-flags.md) can be used with `orc whoami`:

- [`--help`](https://orchestor.io/docs/cli/global-flags.md#help)
- [`--workspace`](https://orchestor.io/docs/cli/global-flags.md#workspace)
- [`--json`](https://orchestor.io/docs/cli/global-flags.md#json-output)
- [`--pretty`](https://orchestor.io/docs/cli/global-flags.md#json-output)
- [`--format`](https://orchestor.io/docs/cli/global-flags.md#output-format)
- [`--field`](https://orchestor.io/docs/cli/global-flags.md#field-selection)
- [`--fields`](https://orchestor.io/docs/cli/global-flags.md#field-selection)
- [`--raw`](https://orchestor.io/docs/cli/global-flags.md#raw-output)
- [`--output`](https://orchestor.io/docs/cli/global-flags.md#file-output)
- [`--no-pager`](https://orchestor.io/docs/cli/global-flags.md#pager)
- [`--dry-run`](https://orchestor.io/docs/cli/global-flags.md#dry-run)
- [`--yes`](https://orchestor.io/docs/cli/global-flags.md#confirmation)
- [`--stdin`](https://orchestor.io/docs/cli/global-flags.md#standard-input)
- [`--from-stdin`](https://orchestor.io/docs/cli/global-flags.md#standard-input)
- [`--page-all`](https://orchestor.io/docs/cli/global-flags.md#all-pages)
- [`--timing`](https://orchestor.io/docs/cli/global-flags.md#request-timing)
- [`--readonly`](https://orchestor.io/docs/cli/global-flags.md#read-only-mode)
- [`--wrap-untrusted`](https://orchestor.io/docs/cli/global-flags.md#untrusted-content-wrapping)

For details and examples, see [global options](https://orchestor.io/docs/cli/global-flags.md).

---

[Documentation index](https://orchestor.io/docs/llms.txt)
