opschain users show
Included from Basic tier
opschain users show <username-or-id> [--provider <provider>]
Shows one user account over the v2 UserService.GetUser RPC. The
argument is a username or a user id. The server applies the self-or-admin
gate: a caller holding the /admin updatable determination reads anyone;
every other caller reads exactly their own row (the v1 visibility rule —
superusers see everyone, others see themselves), and any other target reads
as absent. The plain rendering prints username, id, provider, groups
(the effective set — provider snapshot plus local memberships), email,
superuser and created_at; -o json|yaml emits the v1-shaped JSON:API
resource (id, type, attributes, links, meta.superuser)
reconstructed from the v2 row.
A server target is required (--server <url>, OPSCHAIN_SERVER or the
active context); in local mode it fails with users need a server target — pass --server <url> or 'opschain context use <name>' (local mode has no users) (exit 2).
Flags
| Flag | Meaning |
|---|---|
--provider <provider> | Select the provider instance's row when the username is held by more than one (e.g. local, ldap, oidc:<code>). |
Exit codes
| Code | Meaning |
|---|---|
| 0 | User shown. |
| 1 | The server request failed, or no matching user is visible. |
| 2 | Usage error (no server target, wrong argument count). |
Named errors
no user "<arg>" is visible to you— the argument matched neither a visible username nor id; exits 1.username "<arg>" matches more than one identity (providers: ...)— an admin read of an ambiguous username; pass--providerto select one; exits 1.
Examples
opschain users show alice
opschain users show alice --provider local
opschain users show 0199a0c1-7c3e-7a10-bb6e-54d1d1c0ffee -o json
See also
opschain docs cli/users-list— the visibility rules this show resolves through.opschain docs cli/tokens-list— the caller's own token inventory.