Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

b2c-bm-users-roles

БесплатноБез исполняемых скриптовНе проверен

Manage Business Manager users, access roles, role permissions, and per-user access keys on a B2C Commerce instance using the b2c CLI. Use this skill whenever…

SalesforceCommerceCloudот SalesforceCommerceCloud★ 58 звёзд на GitHub

Об этом скилле

B2C Business Manager Users, Roles, and Access Keys

Use the b2c bm commands to administer instance-level Business Manager resources (users, roles, access keys) over SCAPI. These commands target a specific Commerce Cloud instance — pass --server/-s or set the active instance in dw.json first.

Tip: If b2c is not installed globally, use npx @salesforce/b2c-cli instead (e.g., npx @salesforce/b2c-cli bm whoami).

For Account Manager user/role/client management (cross-instance, scoped to tenants), see the b2c-cli:b2c-am skill instead.

API Backend

bm users (list, get, portable search, update, delete) and bm roles (all subcommands including permissions) run over the SCAPI Merchant Users / Merchant Roles APIs. Configure shortCode, tenantId, and the sfcc.users(.rw) / sfcc.roles(.rw) scopes to use SCAPI. Search is implemented by filtering the paginated SCAPI user listing.

OCAPI-only operations as of B2C Commerce release 26.8 (no current live SCAPI equivalent, unavailable on OCAPI-disabled instances): raw bm users search --query JSON, bm whoami, and bm access-key *. auto uses the temporary OCAPI compatibility path. Explicit SCAPI mode fails before contacting OCAPI and directs the user to --api-backend ocapi until support becomes available.

OCAPI is deprecated and disabled on newer instances. --api-backend auto (the default) falls back on safe SCAPI capability/auth/request rejections; force a backend with --api-backend scapi|ocapi if needed. SCAPI updates disabled by reading the current user and preserving its writable fields through PUT because PATCH omits that field.

Authentication

The CLI auto-discovers the target instance and credentials from SFCC_* environment variables (including project .env), the selected project-local or shared dw.json, and configuration plugins. package.json supplies only non-sensitive defaults. Flags like --server, --client-id, and --client-secret are usually unnecessary — only pass them to override what's auto-detected. Run b2c setup inspect to see the resolved configuration and which source provided each value. For precedence and troubleshooting, see the b2c-cli:b2c-config skill.

As of release 26.8, SCAPI Admin APIs require client credentials or JWT Bearer and do not support browser-based user auth. User auth continues to work through OCAPI and WebDAV, and auto selects OCAPI for that flow. Explicit SCAPI fails with actionable guidance. A handful of OCAPI endpoints require a real BM user identity and default to user auth.

Command group Default auth Why
b2c bm roles ... client-credentials → jwt → implicit OCAPI permissions for /roles
b2c bm users {list,get,search,update,delete} client-credentials → jwt → implicit OCAPI permissions for /users
b2c bm whoami implicit (browser) OCAPI /users/this requires the token to resolve to a BM user
b2c bm access-key {get,create,set,delete} implicit (browser) OCAPI access-key endpoints require "a valid user" plus Manage_Users_Access_Keys permission

Override the default with --auth-methods client-credentials (or --client-secret flags) when your service-client setup is configured to issue user-bearing tokens.

Business Manager Roles

BM roles are instance-level Business Manager access roles (e.g. Administrator, Support, plus any custom roles).

# list roles on the configured instance
b2c bm roles list

# target a different instance
b2c bm roles list --server my-sandbox.demandware.net

# get role details, including assigned users
b2c bm roles get Administrator --expand users

# create a custom role
b2c bm roles create MyEditor --description "Custom role for content editors"

# delete a custom role (system roles cannot be deleted)
b2c bm roles delete MyEditor

# assign / unassign a user
b2c bm roles grant [email protected] --role Administrator
b2c bm roles revoke [email protected] --role Administrator

# all commands accept --json for machine-readable output
b2c bm roles list --json

Role Permissions

Permissions use a file-based get/set workflow because the API replaces the entire permission set on each write.

# view a permission summary
b2c bm roles permissions get Administrator

# export to a JSON file for editing
b2c bm roles permissions get Administrator --output admin-perms.json

# edit the file, then ap
Полный SKILL.md на GitHub

Установить b2c-bm-users-roles в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

FAQ

Что делает скилл b2c-bm-users-roles?

Manage Business Manager users, access roles, role permissions, and per-user access keys on a B2C Commerce instance using the b2c CLI. Use this skill whenever the user needs to list or search BM users on a sandbox or production instance, identify which BM user an OAuth token resolves to ("whoami"), assign or revoke instance-level access roles, edit role permissions, look up a user's WebDAV / OCAPI / Storefront access key, or rotate access keys for SSO-managed users. Also use when the user asks "what's my BM login on sandbox X", "rotate my WebDAV password", "how do I make a custom BM role", "audit BM users on this instance", or "delete a stale BM user from a sandbox".

Как установить скилл b2c-bm-users-roles?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл b2c-bm-users-roles запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить b2c-bm-users-roles с