From b2c-cli
Manage Account Manager resources: API clients, users, roles, and organizations. Supports authentication via browser login or client credentials for CI/CD.
How this skill is triggered — by the user, by Claude, or both
Slash command
/b2c-cli:b2c-amThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Use the `b2c am` commands to manage Account Manager resources: API clients, users, roles, and organizations.
Use the b2c am commands to manage Account Manager resources: API clients, users, roles, and organizations.
Tip: If
b2cis not installed globally, usenpx @salesforce/b2c-cliinstead (e.g.,npx @salesforce/b2c-cli am clients list).
Account Manager commands work out of the box with no configuration. The CLI uses a built-in public client and opens a browser for login.
clientId/clientSecret from SFCC_* env vars, dw.json (in the current or a parent directory), package.json, or configuration plugins — passing --client-id/--client-secret flags is usually unnecessary.--user-auth): When client credentials are configured but you need browser-based login (required for org and client management).Run
b2c setup inspectto confirm which credentials the CLI sees and where they came from. For precedence and troubleshooting, see theb2c-cli:b2c-configskill.
| Operations | Client Credentials (roles on API client) | User Auth (roles on user account) |
|---|---|---|
| AM Users & Roles | User Administrator | Account Administrator or User Administrator |
| AM Organizations | Not supported -- use --user-auth | Account Administrator |
| AM API Clients | Not supported -- use --user-auth | Account Administrator or API Administrator |
Organization and API client management are only available with user authentication. For Business Manager administration (BM roles, users, access keys, whoami), see the b2c-cli:b2c-bm-users-roles skill.
b2c am clients list
# with pagination
b2c am clients list --size 50 --page 2
# JSON output
b2c am clients list --json
# by UUID
b2c am clients get <api-client-id>
# with expanded organizations and roles
b2c am clients get <api-client-id> --expand organizations,roles
Clients are created inactive by default. Requires user auth.
b2c am clients create \
--name "My API Client" \
--orgs <org-id> \
--password "securePassword123"
# with roles, role tenant filter, and redirect URLs
b2c am clients create \
--name "CI/CD Pipeline" \
--orgs <org-id> \
--password "securePassword123" \
--roles SALESFORCE_COMMERCE_API \
--role-tenant-filter "SALESFORCE_COMMERCE_API:zzxy_prd" \
--redirect-urls "https://example.com/callback" \
--active
Partial update -- only specified fields are changed.
b2c am clients update <api-client-id> --name "New Name"
b2c am clients update <api-client-id> --active
b2c am clients password <api-client-id> --current "oldPass" --new "newSecurePass123"
Client must be disabled for 7+ days before deletion. Destructive operation (safe mode check).
b2c am clients delete <api-client-id>
b2c am users list
# with extended columns (roles, organizations)
b2c am users list --extended
# JSON output with pagination
b2c am users list --size 100 --json
b2c am users get [email protected]
# with expanded roles and organizations
b2c am users get [email protected] --expand-all
b2c am users create \
--org "My Organization" \
--mail [email protected] \
--first-name Jane \
--last-name Doe
The --org flag accepts either an org ID or org name. Users are created in INITIAL state with no roles.
b2c am users update [email protected] --first-name Janet --last-name Smith
Soft-deletes by default. Use --purge for hard delete (user must already be in DELETED state).
# soft delete
b2c am users delete [email protected]
# hard delete (purge)
b2c am users delete [email protected] --purge
Resets password to INITIAL state, clearing expiration. Destructive operation (safe mode check).
b2c am users reset [email protected]
b2c am roles list
# filter by target type
b2c am roles list --target-type User
b2c am roles list --target-type ApiClient
b2c am roles get bm-admin
b2c am roles get SLAS_ORGANIZATION_ADMIN
b2c am roles grant [email protected] --role bm-admin
# with tenant scope
b2c am roles grant [email protected] --role bm-admin --scope zzzz_001,zzzz_002
# revoke entire role
b2c am roles revoke [email protected] --role bm-admin
# revoke specific tenant scopes only
b2c am roles revoke [email protected] --role bm-admin --scope zzzz_001
b2c am orgs list
# all organizations (max page size)
b2c am orgs list --all
# extended columns
b2c am orgs list --extended
Accepts org ID or name.
b2c am orgs get <org-id>
b2c am orgs get "My Organization"
BM-side resources (instance roles, instance users, access keys, whoami) live in the b2c-cli:b2c-bm-users-roles skill. Use it for:
b2c bm roles — list/get/create/delete instance access roles, grant/revoke users, manage permissionsb2c bm users — list, get, search, update, and delete instance users via the OCAPI /users resourceb2c bm whoami — show the BM user the current OAuth token resolves tob2c bm access-key — provision and rotate WebDAV/OCAPI/Storefront access keys for SSO-managed usersDefer to that skill for BM examples and patterns. AM-side onboarding flows (creating an AM user, granting AM roles scoped to tenants) stay here.
# Create the user
b2c am users create --org $ORG_ID --mail [email protected] \
--first-name Alex --last-name Developer
# Grant Business Manager Admin role scoped to a specific tenant
b2c am roles grant [email protected] --role bm-admin --scope zzxy_prd
# Revoke roles
b2c am roles revoke [email protected] --role bm-admin
# Soft delete the user
b2c am users delete [email protected]
# Permanent deletion (user must be in DELETED state first)
b2c am users delete [email protected] --purge
# Export all users as JSON
b2c am users list --size 4000 --json
# Pipe to jq for filtering
b2c am users list --json | jq '.[] | select(.userState == "ACTIVE")'
All am commands support --json for programmatic output. List commands support --columns, --extended, --size, and --page for pagination and column control.
Destructive operations (user delete, user reset, client delete) check safe mode. Only delete or purge users when explicitly requested.
See b2c am --help for a full list of available commands and options.
npx claudepluginhub salesforcecommercecloud/b2c-developer-tooling --plugin b2c-cliManage Business Manager users, roles, permissions, and access keys on a B2C Commerce instance using the b2c CLI. Use for listing users, whoami, role assignments, key rotation, and auditing.
Explores and executes Clerk Backend REST API endpoints. Browse tags, inspect schemas, and call API operations like listing users or managing organizations.
Build backend integrations syncing data between B2C Commerce and ERPs, OMS, WMS, or CRMs using SCAPI Admin APIs with OAuth client credentials.