Skip to main content
Version: v5.7.0

opschain admin sessions list

Included from Basic tier

opschain admin sessions list [user]

Lists live sessions from the v2 AuthService (ListSessions), newest first — your own with no argument, or any user's when [user] names them by user id or username (admin session visibility). Naming another user needs the /admin updatable determination; a denied caller — and an unknown user — reads not-found, so other users' session state stays unknowable.

Rows render as a table (ID METHOD STRENGTH SOURCE LAST ADDRESS AGENT CREATED LAST SEEN EXPIRES). METHOD is how the session authenticated (password, ldap, oidc:<key>, github:<key>); STRENGTH is the recorded authn strength (none, idp_asserted, totp, webauthn); SOURCE is the client address the session was established from and LAST ADDRESS the client address of its latest refresh (both resolved behind any trusted reverse proxy — server.trusted_proxies); AGENT is the User-Agent the session was established with — the device signal a user recognises their own sessions by; EXPIRES is the refresh expiry — the point the session dies without activity. With no live sessions it prints no sessions. -o json|yaml emits the same rows structured (user id, absolute expiry, last_client_address and user_agent included), with current: true marking the session this very call rode.

The ID column is what opschain admin sessions revoke takes.

A server target is required (--server <url>, OPSCHAIN_SERVER or the active context) and you must be logged in (opschain login).

Flags​

FlagMeaning
--filter <column>[!]=<value>Keep only rows matching the term (repeatable; terms AND). Columns are the printed table headers lowercased (spaces/dashes fold to _); * wildcards match the whole cell case-insensitively, != negates, commas mean any-of. Applied client-side. Grammar: opschain docs cli.

Exit codes​

CodeMeaning
0Sessions listed (none is still 0).
1The server refused or failed the request (a denied or unknown user reads not-found).
2Usage error (no server target, or not logged in).

Examples​

opschain admin sessions list
opschain admin sessions list goran
opschain admin sessions list 01999a7e-2b61-7c3e-9f00-3c1f6a1be001 -o json
opschain admin sessions list goran --filter method=password

See also​

  • opschain docs cli/admin-sessions-revoke — ending a session by id.
  • opschain docs cli/tokens-list — your own sessions and API keys.
  • opschain docs identity — the session lane end to end.