---
name: gog-admin
description: "Google Workspace Admin (Directory API) via the gog CLI: list/get users, create/suspend/delete users, manage groups and group members, and manage org units. Workspace-only, requires domain-wide delegation. Use for tenant administration with JSON output."
---

# gog admin

Workspace Directory administration with parseable output. **Workspace-only** and
requires a service account with **domain-wide delegation** (see
`gog auth service-account --help`). Pick the admin account with `--account <email>`.

## Reads

```bash
gog --account admin@domain.com admin users list --json --wrap-untrusted
gog --account admin@domain.com admin users get user@domain.com --json
gog --account admin@domain.com admin groups list --json
gog --account admin@domain.com admin groups members list <groupKey> --json
gog --account admin@domain.com admin orgunits list --json
```

## Writes (high impact)

```bash
gog --account admin@domain.com admin users create --email new@domain.com --first ... --last ... --dry-run
gog --account admin@domain.com admin users suspend user@domain.com --force
gog --account admin@domain.com admin users delete user@domain.com --force
gog --account admin@domain.com admin groups members add <groupKey> --email user@domain.com
gog --account admin@domain.com admin orgunits create --name "Sales" --parent /
```

## Safety

- These commands change a whole tenant. `delete`/`suspend`/`orgunits delete` are
  high-impact and irreversible — `--dry-run` first, then `--force` **only** for
  the exact, user-requested change. Deleting a user removes their data.
- Confirm you are acting as the right admin account and against the right domain.
- stdout is data (`--json`/`--plain`); hints go to stderr. `--no-input` in automation.

## Discovery

`gog admin --help` · `gog admin <cmd> --help` · `gog schema admin <cmd> --json`
Reference: <https://gogcli.sh/>
