You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/cli/ods.md
+13-11Lines changed: 13 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,31 +12,33 @@ These flags are available on all ODS commands:
12
12
13
13
## Authentication
14
14
15
-
ODS commands require an Account Manager API Client with appropriate roles.
15
+
ODS commands require an Account Manager API Client.
16
16
17
17
### Required Roles
18
18
19
-
| Auth Method | Role | Description |
20
-
|-------------|------|-------------|
21
-
| User Authentication |`Sandbox API User`| For interactive/browser-based authentication |
22
-
| Client Credentials |`Sandbox API User`| For automated/service authentication |
19
+
| Auth Method | Role | Configured On |
20
+
|-------------|------|---------------|
21
+
| User Authentication |`Sandbox API User`| Your user account |
22
+
| Client Credentials |`Sandbox API User`| The API client |
23
+
24
+
**User Authentication**: Used when only `--client-id` is provided. Opens a browser for login. The `Sandbox API User` role must be assigned to your user account in Account Manager.
25
+
26
+
**Client Credentials**: Used when both `--client-id` and `--client-secret` are provided. The `Sandbox API User` role must be assigned to the API client.
23
27
24
28
### Tenant Scope
25
29
26
-
The API client must have tenant scope configured for the realm(s) you wish to manage. This is configured in Account Manager when setting up the API client.
30
+
The API client must have tenant scope configured for the realm(s) you wish to manage. This is configured in Account Manager under the API client's **Organizations** section.
27
31
28
32
### Configuration
29
33
30
-
Provide credentials via flags or environment variables:
Copy file name to clipboardExpand all lines: docs/cli/slas.md
+13-11Lines changed: 13 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,31 +12,33 @@ These flags are available on all SLAS commands:
12
12
13
13
## Authentication
14
14
15
-
SLAS commands require an Account Manager API Client with appropriate roles.
15
+
SLAS commands require an Account Manager API Client.
16
16
17
17
### Required Roles
18
18
19
-
| Auth Method | Role | Description |
20
-
|-------------|------|-------------|
21
-
| User Authentication |`SLAS Organization Administrator`| For interactive/browser-based authentication |
22
-
| Client Credentials |`Sandbox API User`| For automated/service authentication |
19
+
| Auth Method | Role | Configured On |
20
+
|-------------|------|---------------|
21
+
| User Authentication |`SLAS Organization Administrator`| Your user account |
22
+
| Client Credentials |`Sandbox API User`| The API client |
23
+
24
+
**User Authentication**: Used when only `--client-id` is provided. Opens a browser for login. Roles must be assigned to your user account in Account Manager.
25
+
26
+
**Client Credentials**: Used when both `--client-id` and `--client-secret` are provided. Roles must be assigned to the API client.
23
27
24
28
### Tenant Scope
25
29
26
-
The API client must have tenant scope configured for the realm/organization you wish to manage. This is configured in Account Manager when setting up the API client.
30
+
The API client must have tenant scope configured for the organization you wish to manage. This is configured in Account Manager under the API client's **Organizations** section.
27
31
28
32
### Configuration
29
33
30
-
Provide credentials via flags or environment variables:
31
-
32
34
```bash
35
+
# User Authentication (opens browser)
36
+
b2c slas client list --tenant-id abcd_123 --client-id xxx
37
+
33
38
# Client Credentials
34
39
export SFCC_CLIENT_ID=my-client
35
40
export SFCC_CLIENT_SECRET=my-secret
36
41
b2c slas client list --tenant-id abcd_123
37
-
38
-
# Or via flags
39
-
b2c slas client list --tenant-id abcd_123 --client-id xxx --client-secret yyy
Copy file name to clipboardExpand all lines: docs/guide/authentication.md
+29-4Lines changed: 29 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,26 +18,51 @@ The CLI uses different authentication mechanisms depending on the operation:
18
18
19
19
Most CLI operations require an Account Manager API Client. This is configured in the Salesforce Commerce Cloud Account Manager.
20
20
21
+
### Authentication Methods
22
+
23
+
The CLI supports two authentication methods:
24
+
25
+
| Method | When Used | Role Configuration |
26
+
|--------|-----------|-------------------|
27
+
|**User Authentication**| When only `--client-id` is provided (no secret) | Roles configured on your **user account**|
28
+
|**Client Credentials**| When both `--client-id` and `--client-secret` are provided | Roles configured on the **API client**|
29
+
30
+
**User Authentication** opens a browser for interactive login and uses roles assigned to your user account. This is ideal for development and manual operations.
31
+
32
+
**Client Credentials** uses the API client's secret for non-interactive authentication. This is ideal for CI/CD pipelines and automation.
33
+
21
34
### Creating an API Client
22
35
23
36
1. Log in to [Account Manager](https://account.demandware.com)
24
37
2. Navigate to **API Client** in the left menu
25
38
3. Click **Add API Client**
26
39
4. Fill in the required fields:
27
40
-**Display Name**: A descriptive name (e.g., "B2C CLI")
28
-
-**Password**: A strong client secret (save this securely)
41
+
-**Password**: A strong client secret (save this securely for Client Credentials auth)
29
42
5. Configure the **Token Endpoint Auth Method**:
30
43
-`client_secret_post` for client credentials flow
31
44
6. Set **Access Token Format** to `JWT`
32
45
33
46
### Assigning Roles
34
47
35
-
Under the **Roles** section, add the appropriate roles based on what operations you need:
48
+
Roles grant permission to perform specific operations. Where you configure roles depends on your authentication method:
49
+
50
+
#### For Client Credentials (roles on API Client)
51
+
52
+
Under the API Client's **Roles** section, add:
53
+
54
+
| Role | Operations |
55
+
|------|------------|
56
+
|`Sandbox API User`| ODS management, SLAS client management |
57
+
58
+
#### For User Authentication (roles on User)
59
+
60
+
In Account Manager, navigate to your user account and add roles:
36
61
37
62
| Role | Operations |
38
63
|------|------------|
39
-
|`Sandbox API User`| ODS management, SLAS client management (client credentials)|
0 commit comments