---
metadata:
  - name: generator
    content: Diplodoc Platform v5.52.0
alternate:
  - https://ydb.tech/docs/en/reference/ydb-cli/commands/discovery-whoami.md?version=v26.1
  - https://ydb.tech/docs/ru/reference/ydb-cli/commands/discovery-whoami.md?version=v26.1
  - href: en/reference/ydb-cli/commands/discovery-whoami.md
    type: text/markdown
    title: Markdown version
  - href: ../../../llms.txt
    type: text/markdown
    title: llms.txt
sourcePath: en/core/reference/ydb-cli/commands/discovery-whoami.md
---
> **Documentation Index:** Fetch the complete configuration index at https://ydb.tech/docs/en/llms.txt

<!-- source: en/reference/ydb-cli/commands/_includes/discovery-whoami.md -->
# Authentication

The `discovery whoami` information command lets you check the account on behalf of which the server actually accepts requests:

```bash
ydb [connection options] discovery whoami [-g]
```

<!-- source: en/reference/ydb-cli/commands/_includes/conn_options_ref.md -->
where [connection options] are [database connection options](https://ydb.tech/docs/en/reference/ydb-cli/connect.md?version=v26.1#command-line-pars)
<!-- endsource: en/reference/ydb-cli/commands/_includes/conn_options_ref.md -->

The response includes the account name (User SID) and, if the `-g` option is specified, the information whether the account belongs to groups.

If authentication is not enabled on the YDB server (for example, in the case of an independent local deployment), the command will fail with an error.

Support for the `-g` option depends on the server configuration. If disabled, you'll receive `User has no groups` in response, regardless of the actual inclusion of your account in any groups.

## Example

```bash
$ ydb -p quickstart discovery whoami -g
User SID: aje5kkjdgs0puc18976co@as

User has no groups
```
<!-- endsource: en/reference/ydb-cli/commands/_includes/discovery-whoami.md -->