| name | manage-identity |
| description | Manage Webex identity and directory: SCIM user/group sync, SCIM bulk operations,
domain verification (DNS TXT records), org contact import, directory entries,
group membership, and directory cleanup.
Also covers org identity settings and login security (org rename, default language,
MFA, password policy, one-time passwords), org feature settings by key, admin role
lookup (resolve role name to role ID), bulk activation/invite email resend jobs,
archived (deleted) user lookup, and space classification labels.
Guides from prerequisites through execution and verification.
NOT for: Webex Calling user provisioning (use provision-calling skill) or
license assignment (use manage-licensing skill).
|
| allowed-tools | Read, Grep, Glob, Bash |
| argument-hint | ["operation — e.g. \"sync users\"","verify domain","bulk import","cleanup directory"] |
Manage Identity Workflow
Checkpoint — do NOT proceed until you can answer these:
- What is the critical difference between SCIM PUT and PATCH for user updates? (Answer: PUT replaces the entire user resource — any field omitted is deleted. PATCH modifies only specified fields. Always use PATCH for partial updates.)
- What must be completed before SCIM sync can work for a domain? (Answer: Domain verification — the domain must be verified and claimed in Control Hub before SCIM can provision users with that email domain.)
If you cannot answer both, you skipped reading this skill. Go back and read it.
Step 1: Load references
- Read
docs/reference/admin-identity-scim.md for SCIM users, groups, bulk, schemas, identity org, and People/Groups API patterns
- Read
docs/reference/admin-org-management.md for domains, org contacts, roles, and org settings
Mandatory --help verification: Before constructing any wxcli command, run wxcli <group> --help to verify the subcommand exists, then wxcli <group> <subcommand> --help to verify the exact flags. Do NOT rely on examples in this skill or reference docs — the CLI is auto-generated and flag names may differ from what documentation suggests.
Step 2: Verify auth token is working
Before any identity operation, confirm the token is valid and has appropriate scopes.
wxcli whoami
If this fails with 401/403, stop and troubleshoot auth before proceeding. Common causes:
- Token expired (personal access tokens last 12 hours)
- Token not configured -- run
wxcli configure or check ~/.wxcli/config.json
- Token lacks identity scopes -- SCIM endpoints require
identity:people_rw or identity:people_read, NOT the spark-admin:people_* scopes used by Calling APIs
Check the org ID (needed for all SCIM and domain commands):
wxcli organizations list
Step 3: Determine the operation
Ask the user which identity operation they need. The fourteen supported operations are:
| Need | Operation | CLI Group | Prerequisites |
|---|
| Sync users from IdP (Azure AD, Okta) | SCIM bulk import | scim-bulk, scim-users | Domain verified and claimed; identity:people_rw scope |
| Search/find users in directory | SCIM user search | scim-users | identity:people_read scope; org ID |
| Create/update/delete individual users | SCIM user CRUD | scim-users | identity:people_rw scope; org ID |
| Manage groups and membership | Group CRUD | scim-groups or groups | identity:people_rw (SCIM) or admin token (Webex Groups) |
| Import org contacts (directory listing) | Bulk contact import | org-contacts | identity:contacts_rw scope; org ID |
| Verify/claim a domain before sync | Domain verification | domains | identity:organizations_rw scope; DNS access |
| Clean up stale/inactive users | Directory cleanup | scim-users, scim-bulk | identity:people_rw scope; org ID |
| Check SCIM schema for field mapping | Schema introspection | scim-schemas | identity:people_read scope |
| Rename org, set default language, MFA, password policy, issue a one-time password | Org identity settings | identity-org | identity:organizations_rw scope (see gotcha — PAT returns 404) |
| Read/set an org-level feature setting by key | Org setting key/value | org-settings | identity:organizations_read (read) / identity:organizations_rw (write) |
| Find the role ID to grant a user admin rights | Admin role lookup | roles | Admin token |
| Resend activation/invite emails to users who never activated | Bulk activation email job | activation-email | spark-admin:people_write scope |
| Look up the record of a user who was deleted from the org | Archived user lookup | archive-users | spark-admin:people_read scope (see gotcha — PAT returns 401) |
| List DLP space classification labels | Space classifications | classifications | spark-admin:classifications_read; classification enabled for the org |
Confirm with the user before proceeding:
- Which operation from the table above
- Target details (user emails, group names, domain name, contact list, etc.)
- For bulk: CSV or list of users/contacts to provision
Step 4: Check prerequisites
Run these checks based on the operation. Stop and report if any prerequisite fails.
For all SCIM operations (scim-users, scim-groups, scim-bulk):
wxcli organizations list
For domain verification:
wxcli domains get-domain-verification $ORG_ID --domain "example.com"
DNS is outside the CLI's control. If the user has not added the TXT record, provide the token value and instruct them to:
- Add a TXT record at their domain root with the returned token value
- Wait for DNS propagation (typically 15-60 minutes, up to 48 hours)
- Return when ready to proceed with verification
For SCIM sync (bulk import):
wxcli domains verify-domain $ORG_ID --domain "example.com"
For user search/lookup:
wxcli scim-users list $ORG_ID --filter 'userName eq "target@example.com"'
wxcli people list --email "target@example.com"
For org contacts:
wxcli org-contacts list $ORG_ID
Step 5: Build plan -- [SHOW BEFORE EXECUTING]
Present the plan to the user and wait for approval. Never execute write operations without confirmation.
Format the plan as:
=== Identity Management Plan ===
Operation: [SCIM Bulk Import / Domain Verification / Directory Cleanup / etc.]
Target:
- [specific details -- domain, user list, group name, etc.]
Steps:
1. [First CLI command -- what it does]
2. [Second CLI command -- what it does]
3. Verify: [what we'll check after]
Prerequisites verified:
- Auth token valid (authenticated as [name])
- Org ID: [org_id]
- Domain verified: [domain] (if applicable)
- Scope confirmed: [identity:people_rw / identity:contacts_rw / etc.]
Proceed? [wait for user confirmation]
Step 6: Execute the identity operation
Operation A: Domain Verification
Complete end-to-end flow for adding a domain to the Webex org.
wxcli domains get-domain-verification $ORG_ID --domain "newdomain.com"
wxcli domains verify-domain $ORG_ID --domain "newdomain.com"
wxcli domains claim-domain $ORG_ID
wxcli domains verify-domain $ORG_ID --domain "newdomain.com" --claim-domain true
Operation B: SCIM User Search
wxcli scim-users list $ORG_ID --filter 'userName eq "jsmith@example.com"'
wxcli scim-users list $ORG_ID --filter 'displayName co "Smith"'
wxcli scim-users list $ORG_ID --filter 'userName co "@acme.com"'
wxcli scim-users list $ORG_ID --filter 'userName sw "j"' --attributes "userName,displayName,emails"
wxcli scim-users show $ORG_ID $USER_ID -o json
Operation C: SCIM User Create/Update/Delete
Create:
wxcli scim-users create $ORG_ID --user-name "newuser@example.com" --display-name "New User" --active
wxcli scim-users create $ORG_ID --json-body '{
"userName": "jdoe@example.com",
"displayName": "Jane Doe",
"name": {"givenName": "Jane", "familyName": "Doe"},
"emails": [{"value": "jdoe@example.com", "type": "work", "primary": true}],
"active": true
}'
Update (PATCH — always use this for modifications):
wxcli scim-users update-users $ORG_ID $USER_ID --json-body '{
"schemas": ["urn:ietf:params:scim:api:messages:2.0:PatchOp"],
"Operations": [
{"op": "replace", "path": "displayName", "value": "Jane M. Doe"}
]
}'
wxcli scim-users update-users $ORG_ID $USER_ID --json-body '{
"schemas": ["urn:ietf:params:scim:api:messages:2.0:PatchOp"],
"Operations": [
{"op": "replace", "path": "displayName", "value": "Jane M. Doe"},
{"op": "replace", "path": "title", "value": "Senior Engineer"}
]
}'
wxcli scim-users update-users $ORG_ID $USER_ID --json-body '{
"schemas": ["urn:ietf:params:scim:api:messages:2.0:PatchOp"],
"Operations": [{"op": "replace", "path": "active", "value": false}]
}'
wxcli scim-users update-users $ORG_ID $USER_ID --json-body '{
"schemas": ["urn:ietf:params:scim:api:messages:2.0:PatchOp"],
"Operations": [
{"op": "add", "path": "phoneNumbers", "value": [{"value": "+15551234567", "type": "work"}]}
]
}'
PATCH operations: add (append value), replace (change value), remove (delete value). The schemas field with PatchOp URN is required in every PATCH body.
Full replace (PUT — DANGEROUS, rarely needed):
WARNING: scim-users update uses HTTP PUT, which REPLACES the entire user resource. Any attribute not included in the body is DELETED. This means emails, phone numbers, addresses, group memberships, and active status are all removed if not explicitly included. Use PATCH (update-users) instead unless you have a specific reason to replace the full resource.
wxcli scim-users show $ORG_ID $USER_ID -o json > user.json
wxcli scim-users update $ORG_ID $USER_ID --json-body "$(cat user.json)"
When to use PUT vs PATCH:
- PATCH (99% of cases): Changing display name, title, active status, adding/removing phone numbers, updating addresses — any targeted field change
- PUT (rare): Replacing a user's entire profile from an external IdP sync, or resetting a corrupted user record to a known-good state
Delete:
wxcli scim-users delete $ORG_ID $USER_ID --force
The same PUT/PATCH distinction applies to groups: use scim-groups update-groups (PATCH) instead of scim-groups update (PUT).
Operation D: SCIM Bulk Import
wxcli scim-bulk create $ORG_ID --fail-on-errors 5 --json-body '{
"schemas": ["urn:ietf:params:scim:api:messages:2.0:BulkRequest"],
"failOnErrors": 5,
"Operations": [
{
"method": "POST",
"path": "/Users",
"data": {
"schemas": ["urn:ietf:params:scim:schemas:core:2.0:User"],
"userName": "alice@example.com",
"displayName": "Alice Smith",
"name": {"givenName": "Alice", "familyName": "Smith"},
"emails": [{"value": "alice@example.com", "type": "work", "primary": true}],
"active": true
}
},
{
"method": "POST",
"path": "/Users",
"data": {
"schemas": ["urn:ietf:params:scim:schemas:core:2.0:User"],
"userName": "bob@example.com",
"displayName": "Bob Jones",
"name": {"givenName": "Bob", "familyName": "Jones"},
"emails": [{"value": "bob@example.com", "type": "work", "primary": true}],
"active": true
}
}
]
}'
Check the response for per-operation status. Each operation returns its own status code (e.g., 201 for created, 409 for conflict/duplicate).
Bulk operation safety:
- Bulk requests can mix operations (POST create, PUT replace, PATCH update, DELETE remove)
- Never use PUT operations in bulk unless you have the full resource for every user
- Prefer PATCH operations in bulk for updates — same safety as individual PATCH
- The
--fail-on-errors parameter controls how many individual failures abort the entire batch
- Always check per-operation status in the response — a 200 response on the bulk endpoint does NOT mean all operations succeeded. Each operation has its own
status field (201 = created, 200 = updated, 409 = duplicate, 400 = validation error)
Operation E: Group Management
SCIM Groups (for IdP sync):
wxcli scim-groups list $ORG_ID
wxcli scim-groups create $ORG_ID --json-body '{
"displayName": "DevOps Team",
"members": [
{"value": "USER_ID_1", "type": "user"},
{"value": "USER_ID_2", "type": "user"}
]
}'
wxcli scim-groups update-groups $ORG_ID $GROUP_ID --json-body '{
"schemas": ["urn:ietf:params:scim:api:messages:2.0:PatchOp"],
"Operations": [
{"op": "add", "path": "members", "value": [{"value": "USER_ID", "type": "user"}]}
]
}'
wxcli scim-groups update-groups $ORG_ID $GROUP_ID --json-body '{
"schemas": ["urn:ietf:params:scim:api:messages:2.0:PatchOp"],
"Operations": [
{"op": "remove", "path": "members[value eq \"USER_ID\"]"}
]
}'
Webex Groups (native, no org ID needed):
wxcli groups list
wxcli groups create --json-body '{
"displayName": "Support Team",
"members": [
{"id": "PERSON_ID_1", "type": "user"},
{"id": "PERSON_ID_2", "type": "user"}
]
}'
wxcli groups update $GROUP_ID --json-body '{
"members": [
{"id": "PERSON_ID", "type": "user", "operation": "add"}
]
}'
wxcli groups list-members $GROUP_ID --count 100
Operation F: Org Contacts Import
wxcli org-contacts create $ORG_ID \
--schemas "urn:cisco:codev:identity:contact:core:1.0" \
--source CH \
--display-name "Jane Smith" \
--first-name "Jane" \
--last-name "Smith" \
--company-name "Acme Corp" \
--primary-contact-method EMAIL
wxcli org-contacts create-bulk $ORG_ID \
--schemas "urn:cisco:codev:identity:contact:core:1.0" \
--json-body '{
"schemas": "urn:cisco:codev:identity:contact:core:1.0",
"contacts": [
{
"displayName": "Alice Johnson",
"firstName": "Alice",
"lastName": "Johnson",
"source": "CH",
"primaryContactMethod": "EMAIL",
"emails": [{"value": "alice@example.com", "type": "work"}]
},
{
"displayName": "Bob Williams",
"firstName": "Bob",
"lastName": "Williams",
"source": "CH",
"primaryContactMethod": "PHONE",
"phoneNumbers": [{"value": "+14155551234", "type": "work"}]
}
]
}'
wxcli org-contacts create-delete $ORG_ID \
--schemas "urn:cisco:codev:identity:contact:core:1.0" \
--json-body '{
"schemas": "urn:cisco:codev:identity:contact:core:1.0",
"contactIds": ["contact-id-1", "contact-id-2"]
}'
Operation G: Directory Cleanup (Deactivate Stale Users)
wxcli scim-users list $ORG_ID --filter 'active eq true' -o json
wxcli scim-users update-users $ORG_ID $USER_ID --json-body '{
"schemas": ["urn:ietf:params:scim:api:messages:2.0:PatchOp"],
"Operations": [{"op": "replace", "path": "active", "value": false}]
}'
wxcli scim-bulk create $ORG_ID --fail-on-errors 10 --json-body '{
"schemas": ["urn:ietf:params:scim:api:messages:2.0:BulkRequest"],
"failOnErrors": 10,
"Operations": [
{"method": "PATCH", "path": "/Users/USER_ID_1", "data": {"schemas": ["urn:ietf:params:scim:api:messages:2.0:PatchOp"], "Operations": [{"op": "replace", "path": "active", "value": false}]}},
{"method": "PATCH", "path": "/Users/USER_ID_2", "data": {"schemas": ["urn:ietf:params:scim:api:messages:2.0:PatchOp"], "Operations": [{"op": "replace", "path": "active", "value": false}]}}
]
}'
wxcli scim-users delete $ORG_ID $USER_ID --force
Operation H: Schema Introspection
wxcli scim-schemas show-user -o json
wxcli scim-schemas show -o json
wxcli scim-schemas show-scim2 "urn:scim:schemas:extension:cisco:webexidentity:2.0:User" -o json
Operation I: Org Identity Settings, Login Security, and Password Policy
The identity-org group manages the org record itself plus the login-security controls that apply
to every user in the directory (MFA, "remember my login ID", password complexity). Use it when the
ask is "turn on MFA", "require 12-character passwords", "rename the org", or "get a user back in".
None of these commands take an org ID — the CLI resolves the org from the token and injects it.
wxcli identity-org show -o json
wxcli identity-org update --display-name "Acme Corp"
wxcli identity-org update --preferred-language "en_US"
wxcli identity-org update-authentication-config --mfa-enabled
wxcli identity-org update-authentication-config --no-mfa-enabled --no-remember-my-login-id
wxcli identity-org update-password-policy --minimum-length "12" --minimum-numeric "1" \
--minimum-cap-alpha "1" --minimum-special "1" --history-count "5" --max-password-age "90"
wxcli identity-org generate-otp "USER_UUID_HERE"
--minimum-length must be between 8 and 256. --max-password-age is in days. These are org-wide
login-security changes affecting every user — always show the plan and get approval first.
Operation J: Org Feature Settings (key/value)
The org-settings group reads and writes individual org-level feature toggles addressed by a
setting key. Use it only when you already know the key you need; there is no "list all keys"
command, and querying an unset key returns an error rather than a default.
wxcli org-settings show "SETTING_KEY" -o json
wxcli org-settings create --key "SETTING_KEY" --value
wxcli org-settings create --key "SETTING_KEY" --no-value
wxcli org-settings create --json-body '{"key": "SETTING_KEY", "value": "someString"}'
Operation K: Admin Role Lookup
The roles group is read-only. Its purpose is to resolve a role name to the role ID you
need when granting someone admin rights — the People API roles array takes IDs, not names.
wxcli roles list
wxcli roles list -o json
wxcli roles show "ROLE_ID"
Typical flow: roles list -o json to find the ID for e.g. "Read-only Administrator", then hand that
ID to the People API to assign it. Assigning the role is a people operation, not a roles one —
the roles group cannot grant anything.
Operation L: Resend Activation Emails (bulk async job)
After creating users (via SCIM, CSV, or people create), users who never clicked their invite stay
unactivated. activation-email create starts an org-wide job that re-sends the invite to all
pending users. It is an async job: initiate, poll, then check errors.
activation-email create takes no arguments and no body — you cannot target a subset of users
with it. It is all-or-nothing for the org. It sends real email to real people; always confirm with
the user before running it.
wxcli activation-email create
wxcli activation-email list "JOB_ID_HERE"
wxcli activation-email list-errors "JOB_ID_HERE"
Job status lives in latestExecutionStatus (e.g. STARTED) and latestExecutionExitCode. The
counts object reports userResendInviteSent, userResendInviteFailed, userResendInviteSkipped,
and totalUsers. There is no webhook for completion — you must poll.
Operation M: Archived User Lookup
archive-users show retrieves the retained record of a user who has been deleted from the org.
Use it after a directory cleanup (Operation G) when someone asks "what was this deleted account?" or
you need to confirm an offboarding actually removed a user.
wxcli archive-users show "USER_UUID_HERE" -o json
This is read-only; it cannot restore a user. To bring someone back, create them again (Operation C).
Operation N: Space Classification Labels
classifications list is a read-only listing of the DLP labels that can be applied to Webex spaces
(e.g. Public / Internal / Confidential). Use it to discover which labels exist before referencing
one, or to confirm whether classification is turned on at all.
wxcli classifications list
wxcli classifications list -o json
This lists labels only — it cannot create labels or apply one to a space. Space classification is an
opt-in feature; if it is not enabled for the org the command errors (see Error Handling).
Step 7: Verify results
Always read back the created/updated resources to confirm.
Verify SCIM users:
wxcli scim-users show $ORG_ID $USER_ID -o json
wxcli scim-users list $ORG_ID --filter 'userName co "@example.com"'
Verify groups:
wxcli scim-groups list $ORG_ID --filter 'displayName eq "DevOps Team"' --include-members true
wxcli groups show $GROUP_ID --include-members true -o json
Verify domain:
wxcli domains verify-domain $ORG_ID --domain "example.com"
Verify org contacts:
wxcli org-contacts list $ORG_ID --keyword "Smith"
Verify org identity / security policy changes:
wxcli identity-org show -o json
Verify an org setting:
wxcli org-settings show "SETTING_KEY" -o json
Verify an activation email job:
wxcli activation-email list "JOB_ID_HERE"
wxcli activation-email list-errors "JOB_ID_HERE"
Step 8: Report results
Summarize what was done:
=== Identity Management Complete ===
Operation: [what was done]
Results:
- [resource]: [status] ([id])
- [resource]: [status] ([id])
Verification:
- [what was confirmed]
Next steps:
- [any follow-up actions needed]
Critical Rules
-
ALWAYS test auth first -- Run wxcli whoami before any identity call. Do not proceed on auth failure.
-
ALWAYS show plan before executing -- Present the plan and wait for user confirmation. Never modify users, groups, or contacts without approval.
-
NEVER use scim-users update (PUT) for partial changes — PUT replaces the entire resource, deleting any attributes not included. Always use scim-users update-users (PATCH) for targeted changes. See Operation C for the full pattern and examples. Same applies to scim-groups update vs scim-groups update-groups.
-
SCIM PATCH is partial update -- safer for targeted changes -- Use scim-users update-users or scim-groups update-groups with SCIM patch operations (add, replace, remove) to change specific fields without risk of data loss.
-
Bulk operations can partially fail -- A scim-bulk create request can succeed for some operations and fail for others. The --fail-on-errors parameter controls the abort threshold. Always check the response body for per-operation status codes (e.g., 201 for created, 409 for duplicate).
-
/me endpoint requires user-level token, not admin -- scim-users show-me and people list-me return the identity of the authenticated user. These fail with admin service-app tokens because service apps do not represent a person. Use a user-level OAuth token.
-
Domain verification requires DNS TXT record -- this skill cannot verify DNS -- After providing the verification token, instruct the user to add the TXT record and wait for propagation (typically 15-60 minutes, up to 48 hours). Do not call verify-domain until the user confirms the TXT record is in place.
-
Org contacts bulk import/delete are async jobs -- poll for completion -- The create-bulk and create-delete commands may return before all items are processed. Verify results after completion.
-
ALWAYS show plan before executing write operations -- Never create, update, or delete users, groups, contacts, or domains without presenting the plan and getting user confirmation.
-
The CLI injects the org ID for you — do NOT pass it as a positional argument. Verified 2026-07-14 against the live CLI: identity-org, org-settings, roles, archive-users, classifications, and activation-email take no org ID. The CLI resolves the org from the token (GET /v1/people/me) and injects it into the request URL. Passing one anyway fails with Got unexpected extra argument. Always run wxcli <group> <command> --help and pass only the arguments it lists.
Known stale content — do not copy blindly. Many $ORG_ID examples elsewhere in this skill (scim-users, scim-groups, scim-bulk, org-contacts, domains) predate org-ID auto-injection and will error with Got unexpected extra argument if run as written. --help is the source of truth; drop the $ORG_ID argument. This is a known gap pending a separate cleanup pass.
-
Identity scopes are separate from Calling scopes -- SCIM endpoints require identity:people_rw / identity:people_read. Webex REST endpoints (people, groups) require spark-admin:people_write / spark-admin:people_read. Mixing them up produces 403 errors.
-
People API emails must use --json-body -- The people create command does not have a --emails CLI option. Pass emails via --json-body '{"emails": ["user@example.com"], ...}'.
-
If users need Webex Calling after identity provisioning, switch to the provision-calling skill to assign calling licenses and configure locations. SCIM user creation does not assign calling licenses — that's a separate workflow.
-
If bulk-creating 20+ users with calling licenses, consider using provision-calling skill directly instead of SCIM → license assignment as two separate steps. The provisioning skill can handle the full user+license workflow.
Error Handling
When a wxcli command fails:
A. Fix and retry -- Missing required field, wrong ID, format issue:
- Read the full error message
- Run
wxcli <group> <command> --help to check required flags
- Fix the command and retry
B. Skip and continue -- Resource already exists or already configured:
- Verify current state:
wxcli scim-users show $ORG_ID $USER_ID or wxcli people show $PERSON_ID
- If state is correct, skip to next operation
C. Escalate -- Unclear or persistent error:
- Run with
--debug for raw HTTP details
- Invoke
the wxc-calling-debug skill for systematic diagnosis
Identity-specific errors:
- 403 on SCIM endpoints: Token lacks
identity:people_rw or identity:people_read scope. These are separate from spark-admin:people_* scopes. Verify your integration/service-app has identity scopes granted.
- 403 on domain commands: Token lacks
identity:organizations_rw scope. Domain management uses org-level identity scopes.
- 403 on org-contacts: Token lacks
identity:contacts_rw scope.
- 404 on
show-me / list-me: Using an admin/service-app token. Switch to a user-level OAuth token.
- 409 on SCIM create: User or group already exists. GET the existing resource and decide whether to update or skip.
- 400 on SCIM filter: Invalid SCIM filter syntax. Valid operators:
eq, ne, co (contains), sw (starts with), pr (present), gt, ge, lt, le. Attribute names are case-sensitive.
- 400 on bulk operations: Check per-operation status in the response. Individual operations may fail while others succeed.
- Domain verification failure: DNS TXT record not yet propagated. Wait and retry after confirming TXT record is in place.
- 400 on
org-contacts create: Missing --schemas or --source. Both are required. Schema value is always "urn:cisco:codev:identity:contact:core:1.0". Source must be CH or Webex4Broadworks.
- 404 on
identity-org show/update: Verified against a live org with a full-admin personal access token — the request URL and org ID were correct and the API still returned 404. Personal access tokens do not carry identity:organizations_read/_rw, and these endpoints answer missing identity scope with 404 rather than 403. Use an OAuth integration or service app with identity scopes granted. Do not chase this as a wrong-org-ID bug.
- 401 on
archive-users show: Same root cause pattern as above — the token is not accepted for the identity API path this command uses. Needs spark-admin:people_read on a token that carries it (OAuth integration/service app), not a PAT.
- "Target item with key: X does not exist" on
org-settings show: The setting key is not set for this org, or the key name is wrong. There is no command to list valid keys — confirm the exact key with the user. An unset key errors rather than returning a default.
- "The space classification is not enabled for the org" on
classifications list: Not a permissions or CLI problem. Space classification is opt-in and is off for this org; it must be enabled in Control Hub first. Report this to the user rather than retrying.
activation-email sends real email: There is no dry-run and no way to scope it to a subset of users. If run by mistake, the job cannot be recalled — let it finish and report the counts.
SCIM update errors:
- Accidental PUT data loss: If
scim-users update (PUT) was run with incomplete data and attributes were deleted, recover immediately:
- Check if the user still exists:
wxcli scim-users show $ORG_ID $USER_ID -o json
- If the user exists but is missing attributes, use PATCH to restore them:
wxcli scim-users update-users $ORG_ID $USER_ID --json-body '{
"schemas": ["urn:ietf:params:scim:api:messages:2.0:PatchOp"],
"Operations": [
{"op": "add", "path": "emails", "value": [{"value": "user@example.com", "type": "work", "primary": true}]},
{"op": "replace", "path": "active", "value": true}
]
}'
- If group memberships were lost, re-add via
scim-groups update-groups
- 400 on PATCH (invalid operation): Check the
Operations array format. Each operation needs op (add/replace/remove), path (attribute name), and value (for add/replace). The schemas array with the PatchOp URN is required.
- 409 on create (user exists): The user already exists in this org. Use
scim-users list with a filter to find the existing record: wxcli scim-users list $ORG_ID --filter 'userName eq "user@example.com"' -o json
Required Scopes Reference
| Operation | Scope(s) |
|---|
| List/search SCIM users | identity:people_read |
| Create/update/delete SCIM users | identity:people_rw |
| List/search SCIM groups | identity:people_read |
| Create/update/delete SCIM groups | identity:people_rw |
| SCIM bulk operations | identity:people_rw |
| SCIM schema introspection | identity:people_read |
| Identity org settings (read) | identity:organizations_read |
| Identity org settings (write) | identity:organizations_rw |
| Generate OTP for a user | Identity:one_time_password |
| List/view people (Webex API) | spark-admin:people_read |
| Create/update/delete people (Webex API) | spark-admin:people_write + spark-admin:people_read |
| Domain verification/claiming | identity:organizations_rw |
| Org contacts (read) | identity:contacts_read |
| Org contacts (write) | identity:contacts_rw |
| List roles | Admin token (no additional scope documented) |
SCIM vs Webex API Quick Reference
Use this to decide which CLI group to use:
| Use Case | SCIM (scim-users, scim-groups) | Webex REST (people, groups) |
|---|
| IdP integration (Okta, Azure AD) | Yes | No |
| Automated bulk provisioning | Yes (via scim-bulk) | Loop with people create |
| Need calling-specific data | No | Yes (--calling-data true) |
| Partial update (PATCH) | Yes (update-users) | No (PUT only on people update) |
| Requires org ID argument | Yes | No (uses token's org) |
| Scopes needed | identity:people_rw | spark-admin:people_write |
Context Compaction Recovery
If context compacts mid-execution, recover by:
- Read the deployment plan from
docs/plans/ to recover what was planned
- Check what's already been done: run the relevant
list commands
- Resume from the first incomplete step