Skip to main content

adt auth

Manage authenticated sessions with SAP systems. Sessions are cached in ~/.adt/auth.json and looked up automatically by every other command.

Subcommands

CommandDescription
adt auth loginLogin to ADT — supports Basic Auth and Browser-based SSO.
adt auth logoutLogout from ADT.
adt auth statusCheck authentication status.
adt auth list (alias ls)List all authenticated SAP systems.
adt auth set-default <sid>Set the default SAP system.
adt auth refreshRefresh an existing session (re-runs the plugin if credentials expired).

Options

login

FlagDescription
--service-key <path>Path to a BTP service key JSON file for service-key login.
--redirect-uri <uri>OAuth callback redirect URI (e.g. Codespaces/tunnel URL).
--insecureAllow insecure SSL connections (ignore certificate errors).
--sid <sid> (global)System ID — skips the interactive destination picker.

If no --sid is provided and the config file (adt.config.ts) declares destinations, adt shows an interactive list; otherwise it falls back to a fully manual URL + basic-auth prompt.

logout / status / refresh

FlagDescription
--sid <sid>System ID to operate on (defaults to current default).

set-default

ArgumentDescription
<sid>System ID to set as default (e.g. BHF, S0D).

list

No options.

Examples

# First-time login, interactive
adt auth login

# Login with a BTP service key
adt auth login --sid BHF --service-key ~/btp/bhf-key.json

# Check who I am
adt auth status
# ✅ DEV — user PPLENKOV — cookie session valid until 2025-11-21T09:12:03Z

# Switch the default system
adt auth set-default BHF

# Clean logout
adt auth logout --sid BHF

See also

  • @abapify/adt-auth — the underlying session/credential library
  • MCP server overview — how to expose the active session to AI clients