|
| 1 | +--- |
| 2 | +description: Commands for managing Account Manager organizations including listing, viewing details, and accessing audit logs. |
| 3 | +--- |
| 4 | + |
| 5 | +# Organization Management Commands |
| 6 | + |
| 7 | +Commands for managing organizations in Account Manager. |
| 8 | + |
| 9 | +## Global Org Flags |
| 10 | + |
| 11 | +These flags are available on all org commands: |
| 12 | + |
| 13 | +| Flag | Environment Variable | Description | |
| 14 | +|------|---------------------|-------------| |
| 15 | +| `--account-manager-host` | `SFCC_ACCOUNT_MANAGER_HOST` | Account Manager hostname (e.g., `account.demandware.com`) | |
| 16 | + |
| 17 | +## Authentication |
| 18 | + |
| 19 | +Org commands require an Account Manager API Client with OAuth authentication. |
| 20 | + |
| 21 | +### Required Configuration |
| 22 | + |
| 23 | +| Flag | Environment Variable | Description | |
| 24 | +|------|---------------------|-------------| |
| 25 | +| `--client-id` | `SFCC_CLIENT_ID` | OAuth client ID for Account Manager | |
| 26 | +| `--client-secret` | `SFCC_CLIENT_SECRET` | OAuth client secret for Account Manager | |
| 27 | + |
| 28 | +### Required Roles |
| 29 | + |
| 30 | +The API client must have the following role: |
| 31 | +- `sfcc.accountmanager.user.manage` - Required for organization management operations |
| 32 | + |
| 33 | +### Configuration |
| 34 | + |
| 35 | +```bash |
| 36 | +# Set Account Manager host |
| 37 | +export SFCC_ACCOUNT_MANAGER_HOST=account.demandware.com |
| 38 | + |
| 39 | +# Set OAuth credentials |
| 40 | +export SFCC_CLIENT_ID=my-client-id |
| 41 | +export SFCC_CLIENT_SECRET=my-client-secret |
| 42 | + |
| 43 | +# List organizations |
| 44 | +b2c org list |
| 45 | +``` |
| 46 | + |
| 47 | +--- |
| 48 | + |
| 49 | +## b2c org list |
| 50 | + |
| 51 | +List organizations in Account Manager with pagination support. |
| 52 | + |
| 53 | +### Usage |
| 54 | + |
| 55 | +```bash |
| 56 | +b2c org list [FLAGS] |
| 57 | +``` |
| 58 | + |
| 59 | +### Flags |
| 60 | + |
| 61 | +| Flag | Description | Default | |
| 62 | +|------|-------------|---------| |
| 63 | +| `--page` | Page number (0-based) | `0` | |
| 64 | +| `--size`, `-s` | Number of results per page (1-5000) | `25` | |
| 65 | +| `--all`, `-a` | Return all organizations (uses max page size of 5000) | `false` | |
| 66 | +| `--columns` | Comma-separated list of columns to display | Default columns | |
| 67 | +| `--extended`, `-x` | Show all available columns | `false` | |
| 68 | +| `--json` | Output results as JSON | `false` | |
| 69 | + |
| 70 | +### Default Columns |
| 71 | + |
| 72 | +- ID |
| 73 | +- Name |
| 74 | +- Realms |
| 75 | +- Email Domains |
| 76 | +- 2FA Enabled |
| 77 | +- VaaS Enabled |
| 78 | +- SF Identity |
| 79 | +- Min Password Length |
| 80 | + |
| 81 | +### Extended Columns |
| 82 | + |
| 83 | +- 2FA Roles |
| 84 | +- Verifier Types |
| 85 | + |
| 86 | +### Examples |
| 87 | + |
| 88 | +```bash |
| 89 | +# List first page of organizations (default: 25 per page) |
| 90 | +b2c org list |
| 91 | + |
| 92 | +# List organizations with custom page size |
| 93 | +b2c org list --size 50 |
| 94 | + |
| 95 | +# Get second page of results |
| 96 | +b2c org list --page 1 --size 25 |
| 97 | + |
| 98 | +# Get all organizations (uses max page size of 5000) |
| 99 | +b2c org list --all |
| 100 | + |
| 101 | +# Show all columns |
| 102 | +b2c org list --extended |
| 103 | + |
| 104 | +# Show only specific columns |
| 105 | +b2c org list --columns id,name,twoFAEnabled |
| 106 | + |
| 107 | +# Output as JSON |
| 108 | +b2c org list --json |
| 109 | + |
| 110 | +# Using environment variables |
| 111 | +export SFCC_ACCOUNT_MANAGER_HOST=account.demandware.com |
| 112 | +export SFCC_CLIENT_ID=my-client-id |
| 113 | +export SFCC_CLIENT_SECRET=my-client-secret |
| 114 | +b2c org list |
| 115 | +``` |
| 116 | + |
| 117 | +### Output |
| 118 | + |
| 119 | +Displays a table of organizations with the selected columns. If more pages are available, an info message is displayed at the end. |
| 120 | + |
| 121 | +### Notes |
| 122 | + |
| 123 | +- Page size must be between 1 and 5000 |
| 124 | +- Page number must be a non-negative integer (0-based) |
| 125 | +- If the requested page exceeds available data, an error is returned |
| 126 | +- The `--all` flag uses a page size of 5000 to fetch all organizations in a single request |
| 127 | + |
| 128 | +--- |
| 129 | + |
| 130 | +## b2c org get |
| 131 | + |
| 132 | +Get detailed information about a specific organization. |
| 133 | + |
| 134 | +### Usage |
| 135 | + |
| 136 | +```bash |
| 137 | +b2c org get <ORG> |
| 138 | +``` |
| 139 | + |
| 140 | +### Arguments |
| 141 | + |
| 142 | +| Argument | Description | Required | |
| 143 | +|----------|-------------|----------| |
| 144 | +| `ORG` | Organization ID or name | Yes | |
| 145 | + |
| 146 | +### Flags |
| 147 | + |
| 148 | +| Flag | Description | |
| 149 | +|------|-------------| |
| 150 | +| `--json` | Output results as JSON | |
| 151 | + |
| 152 | +### Examples |
| 153 | + |
| 154 | +```bash |
| 155 | +# Get organization details by ID |
| 156 | +b2c org get org-123 |
| 157 | + |
| 158 | +# Get organization details by name |
| 159 | +b2c org get "My Organization" |
| 160 | + |
| 161 | +# Output as JSON |
| 162 | +b2c org get org-123 --json |
| 163 | +``` |
| 164 | + |
| 165 | +### Output |
| 166 | + |
| 167 | +When not using `--json`, displays formatted organization information including: |
| 168 | + |
| 169 | +- **Organization Details**: ID, Name, 2FA Enabled, VaaS Enabled, SF Identity |
| 170 | +- **Contact Users**: List of contact user IDs |
| 171 | +- **Allowed Verifier Types**: List of allowed verifier types |
| 172 | +- **Account Ids**: List of Salesforce account IDs |
| 173 | +- **Password Policy**: Minimum Password Length, Length of Password History, Days Until Password Expires |
| 174 | +- **Realms**: Comma-separated list of realm names |
| 175 | +- **Email Domains**: List of allowed email domains |
| 176 | +- **2FA Roles**: List of roles that require 2FA |
| 177 | + |
| 178 | +### Notes |
| 179 | + |
| 180 | +- Organization can be identified by ID or name |
| 181 | +- If organization is not found, an error is returned |
| 182 | +- Name matching is case-sensitive and requires an exact match |
| 183 | + |
| 184 | +--- |
| 185 | + |
| 186 | +## b2c org audit |
| 187 | + |
| 188 | +Get audit logs for an Account Manager organization. |
| 189 | + |
| 190 | +### Usage |
| 191 | + |
| 192 | +```bash |
| 193 | +b2c org audit <ORG> [FLAGS] |
| 194 | +``` |
| 195 | + |
| 196 | +### Arguments |
| 197 | + |
| 198 | +| Argument | Description | Required | |
| 199 | +|----------|-------------|----------| |
| 200 | +| `ORG` | Organization ID or name | Yes | |
| 201 | + |
| 202 | +### Flags |
| 203 | + |
| 204 | +| Flag | Description | |
| 205 | +|------|-------------| |
| 206 | +| `--columns` | Comma-separated list of columns to display | |
| 207 | +| `--extended`, `-x` | Show all available columns | |
| 208 | +| `--json` | Output results as JSON | |
| 209 | + |
| 210 | +### Default Columns |
| 211 | + |
| 212 | +- Timestamp |
| 213 | +- Author |
| 214 | +- Email |
| 215 | +- Event Type |
| 216 | +- Message |
| 217 | + |
| 218 | +### Examples |
| 219 | + |
| 220 | +```bash |
| 221 | +# Get audit logs for an organization by ID |
| 222 | +b2c org audit org-123 |
| 223 | + |
| 224 | +# Get audit logs for an organization by name |
| 225 | +b2c org audit "My Organization" |
| 226 | + |
| 227 | +# Show all columns |
| 228 | +b2c org audit org-123 --extended |
| 229 | + |
| 230 | +# Show only specific columns |
| 231 | +b2c org audit org-123 --columns timestamp,eventType,eventMessage |
| 232 | + |
| 233 | +# Output as JSON |
| 234 | +b2c org audit org-123 --json |
| 235 | +``` |
| 236 | + |
| 237 | +### Output |
| 238 | + |
| 239 | +Displays a table of audit log records with the selected columns. Timestamps are formatted as `MM/DD/YYYY HH:MM:SS` for readability. |
| 240 | + |
| 241 | +### Notes |
| 242 | + |
| 243 | +- Organization can be identified by ID or name |
| 244 | +- If organization is not found, an error is returned |
| 245 | +- If no audit records are found, a message is displayed |
| 246 | +- Timestamps are displayed in a human-readable format with zero-padding for consistent spacing |
0 commit comments