Skip to content

Commit 3424448

Browse files
author
Amit Kumar
committed
Updating doc for AM commands
1 parent 7497188 commit 3424448

File tree

13 files changed

+6
-53
lines changed

13 files changed

+6
-53
lines changed

docs/api-readme.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -449,7 +449,6 @@ const auditLogs = await client.getOrgAuditLogs('org-123');
449449
### Required Permissions
450450

451451
Account Manager operations require:
452-
- OAuth client with `sfcc.accountmanager.user.manage` scope
453452
- Account Manager hostname configuration
454453
- For implicit flow: roles configured on your **user account**
455454
- For client credentials flow: roles configured on the **API client**

docs/cli/account-manager.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ These flags are available on all Account Manager commands:
1616

1717
## Authentication
1818

19-
All Account Manager commands require an Account Manager API Client with OAuth authentication.
19+
Account Manager commands require an API client or can be executed through an implicit workflow that seamlessly handles user authentication and associated flows.
2020

2121
### Required Configuration
2222

@@ -27,8 +27,11 @@ All Account Manager commands require an Account Manager API Client with OAuth au
2727

2828
### Required Roles
2929

30-
The API client must have the following role:
31-
- `sfcc.accountmanager.user.manage` - Required for all Account Manager operations
30+
| Auth Method | Role | Configured On |
31+
|-------------|------|---------------|
32+
| Client Credentials | `User Administrator` or higher | The API client |
33+
34+
User authentication is handled via the implicit flow, utilizing the access rights granted to the user.
3235

3336
### Configuration
3437

packages/b2c-cli/test/commands/am/orgs/get.test.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,6 @@ describe('org get', () => {
100100
return HttpResponse.json({
101101
access_token: createMockJWT({sub: 'test-client'}),
102102
expires_in: 1800,
103-
scope: 'sfcc.accountmanager.user.manage',
104103
});
105104
}),
106105
http.get(`${BASE_URL}/organizations/org-123`, () => {
@@ -131,7 +130,6 @@ describe('org get', () => {
131130
return HttpResponse.json({
132131
access_token: createMockJWT({sub: 'test-client'}),
133132
expires_in: 1800,
134-
scope: 'sfcc.accountmanager.user.manage',
135133
});
136134
}),
137135
http.get(`${BASE_URL}/organizations/org-123`, () => {
@@ -160,7 +158,6 @@ describe('org get', () => {
160158
return HttpResponse.json({
161159
access_token: createMockJWT({sub: 'test-client'}),
162160
expires_in: 1800,
163-
scope: 'sfcc.accountmanager.user.manage',
164161
});
165162
}),
166163
http.get(`${BASE_URL}/organizations/Test%20Organization`, () => {
@@ -193,7 +190,6 @@ describe('org get', () => {
193190
return HttpResponse.json({
194191
access_token: createMockJWT({sub: 'test-client'}),
195192
expires_in: 1800,
196-
scope: 'sfcc.accountmanager.user.manage',
197193
});
198194
}),
199195
http.get(`${BASE_URL}/organizations/nonexistent-org`, () => {
@@ -236,7 +232,6 @@ describe('org get', () => {
236232
return HttpResponse.json({
237233
access_token: createMockJWT({sub: 'test-client'}),
238234
expires_in: 1800,
239-
scope: 'sfcc.accountmanager.user.manage',
240235
});
241236
}),
242237
http.get(`${BASE_URL}/organizations/org-123`, () => {
@@ -274,7 +269,6 @@ describe('org get', () => {
274269
return HttpResponse.json({
275270
access_token: createMockJWT({sub: 'test-client'}),
276271
expires_in: 1800,
277-
scope: 'sfcc.accountmanager.user.manage',
278272
});
279273
}),
280274
http.get(`${BASE_URL}/organizations/org-123`, () => {

packages/b2c-cli/test/commands/am/orgs/list.test.ts

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,6 @@ describe('org list', () => {
144144
return HttpResponse.json({
145145
access_token: createMockJWT({sub: 'test-client'}),
146146
expires_in: 1800,
147-
scope: 'sfcc.accountmanager.user.manage',
148147
});
149148
}),
150149
http.get(`${BASE_URL}/organizations`, () => {
@@ -172,7 +171,6 @@ describe('org list', () => {
172171
return HttpResponse.json({
173172
access_token: createMockJWT({sub: 'test-client'}),
174173
expires_in: 1800,
175-
scope: 'sfcc.accountmanager.user.manage',
176174
});
177175
}),
178176
http.get(`${BASE_URL}/organizations`, () => {
@@ -196,7 +194,6 @@ describe('org list', () => {
196194
return HttpResponse.json({
197195
access_token: createMockJWT({sub: 'test-client'}),
198196
expires_in: 1800,
199-
scope: 'sfcc.accountmanager.user.manage',
200197
});
201198
}),
202199
http.get(`${BASE_URL}/organizations`, () => {
@@ -224,7 +221,6 @@ describe('org list', () => {
224221
return HttpResponse.json({
225222
access_token: createMockJWT({sub: 'test-client'}),
226223
expires_in: 1800,
227-
scope: 'sfcc.accountmanager.user.manage',
228224
});
229225
}),
230226
http.get(`${BASE_URL}/organizations`, ({request}) => {
@@ -255,7 +251,6 @@ describe('org list', () => {
255251
return HttpResponse.json({
256252
access_token: createMockJWT({sub: 'test-client'}),
257253
expires_in: 1800,
258-
scope: 'sfcc.accountmanager.user.manage',
259254
});
260255
}),
261256
http.get(`${BASE_URL}/organizations`, ({request}) => {
@@ -285,7 +280,6 @@ describe('org list', () => {
285280
return HttpResponse.json({
286281
access_token: createMockJWT({sub: 'test-client'}),
287282
expires_in: 1800,
288-
scope: 'sfcc.accountmanager.user.manage',
289283
});
290284
}),
291285
http.get(`${BASE_URL}/organizations`, ({request}) => {
@@ -311,7 +305,6 @@ describe('org list', () => {
311305
return HttpResponse.json({
312306
access_token: createMockJWT({sub: 'test-client'}),
313307
expires_in: 1800,
314-
scope: 'sfcc.accountmanager.user.manage',
315308
});
316309
}),
317310
http.get(`${BASE_URL}/organizations`, () => {
@@ -336,7 +329,6 @@ describe('org list', () => {
336329
return HttpResponse.json({
337330
access_token: createMockJWT({sub: 'test-client'}),
338331
expires_in: 1800,
339-
scope: 'sfcc.accountmanager.user.manage',
340332
});
341333
}),
342334
http.get(`${BASE_URL}/organizations`, () => {

packages/b2c-cli/test/commands/am/roles/get.test.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,6 @@ describe('role get', () => {
9393
return HttpResponse.json({
9494
access_token: createMockJWT({sub: 'test-client'}),
9595
expires_in: 1800,
96-
scope: 'sfcc.accountmanager.user.manage',
9796
});
9897
}),
9998
http.get(`${BASE_URL}/roles/bm-admin`, () => {
@@ -133,7 +132,6 @@ describe('role get', () => {
133132
return HttpResponse.json({
134133
access_token: createMockJWT({sub: 'test-client'}),
135134
expires_in: 1800,
136-
scope: 'sfcc.accountmanager.user.manage',
137135
});
138136
}),
139137
http.get(`${BASE_URL}/roles/bm-admin`, () => {
@@ -162,7 +160,6 @@ describe('role get', () => {
162160
return HttpResponse.json({
163161
access_token: createMockJWT({sub: 'test-client'}),
164162
expires_in: 1800,
165-
scope: 'sfcc.accountmanager.user.manage',
166163
});
167164
}),
168165
http.get(`${BASE_URL}/roles/nonexistent`, () => {

packages/b2c-cli/test/commands/am/roles/grant.test.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,6 @@ describe('role grant', () => {
9595
return HttpResponse.json({
9696
access_token: createMockJWT({sub: 'test-client'}),
9797
expires_in: 1800,
98-
scope: 'sfcc.accountmanager.user.manage',
9998
});
10099
}),
101100
http.get(`${BASE_URL}/users`, () => {
@@ -147,7 +146,6 @@ describe('role grant', () => {
147146
return HttpResponse.json({
148147
access_token: createMockJWT({sub: 'test-client'}),
149148
expires_in: 1800,
150-
scope: 'sfcc.accountmanager.user.manage',
151149
});
152150
}),
153151
http.get(`${BASE_URL}/users`, () => {
@@ -205,7 +203,6 @@ describe('role grant', () => {
205203
return HttpResponse.json({
206204
access_token: createMockJWT({sub: 'test-client'}),
207205
expires_in: 1800,
208-
scope: 'sfcc.accountmanager.user.manage',
209206
});
210207
}),
211208
http.get(`${BASE_URL}/users`, () => {

packages/b2c-cli/test/commands/am/roles/list.test.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,6 @@ describe('role list', () => {
167167
return HttpResponse.json({
168168
access_token: createMockJWT({sub: 'test-client'}),
169169
expires_in: 1800,
170-
scope: 'sfcc.accountmanager.user.manage',
171170
});
172171
}),
173172
http.get(`${BASE_URL}/roles`, ({request}) => {
@@ -196,7 +195,6 @@ describe('role list', () => {
196195
return HttpResponse.json({
197196
access_token: createMockJWT({sub: 'test-client'}),
198197
expires_in: 1800,
199-
scope: 'sfcc.accountmanager.user.manage',
200198
});
201199
}),
202200
http.get(`${BASE_URL}/roles`, () => {
@@ -220,7 +218,6 @@ describe('role list', () => {
220218
return HttpResponse.json({
221219
access_token: createMockJWT({sub: 'test-client'}),
222220
expires_in: 1800,
223-
scope: 'sfcc.accountmanager.user.manage',
224221
});
225222
}),
226223
http.get(`${BASE_URL}/roles`, ({request}) => {

packages/b2c-cli/test/commands/am/roles/revoke.test.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,6 @@ describe('role revoke', () => {
9595
return HttpResponse.json({
9696
access_token: createMockJWT({sub: 'test-client'}),
9797
expires_in: 1800,
98-
scope: 'sfcc.accountmanager.user.manage',
9998
});
10099
}),
101100
http.get(`${BASE_URL}/users`, () => {
@@ -144,7 +143,6 @@ describe('role revoke', () => {
144143
return HttpResponse.json({
145144
access_token: createMockJWT({sub: 'test-client'}),
146145
expires_in: 1800,
147-
scope: 'sfcc.accountmanager.user.manage',
148146
});
149147
}),
150148
http.get(`${BASE_URL}/users`, () => {
@@ -201,7 +199,6 @@ describe('role revoke', () => {
201199
return HttpResponse.json({
202200
access_token: createMockJWT({sub: 'test-client'}),
203201
expires_in: 1800,
204-
scope: 'sfcc.accountmanager.user.manage',
205202
});
206203
}),
207204
http.get(`${BASE_URL}/users`, () => {

packages/b2c-cli/test/commands/am/users/create.test.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,6 @@ describe('user create', () => {
9999
return HttpResponse.json({
100100
access_token: createMockJWT({sub: 'test-client'}),
101101
expires_in: 1800,
102-
scope: 'sfcc.accountmanager.user.manage',
103102
});
104103
}),
105104
http.post(`${BASE_URL}/users`, async ({request}) => {
@@ -139,7 +138,6 @@ describe('user create', () => {
139138
return HttpResponse.json({
140139
access_token: createMockJWT({sub: 'test-client'}),
141140
expires_in: 1800,
142-
scope: 'sfcc.accountmanager.user.manage',
143141
});
144142
}),
145143
http.post(`${BASE_URL}/users`, () => {
@@ -169,7 +167,6 @@ describe('user create', () => {
169167
return HttpResponse.json({
170168
access_token: createMockJWT({sub: 'test-client'}),
171169
expires_in: 1800,
172-
scope: 'sfcc.accountmanager.user.manage',
173170
});
174171
}),
175172
http.post(`${BASE_URL}/users`, () => {

packages/b2c-cli/test/commands/am/users/delete.test.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,6 @@ describe('user delete', () => {
9090
return HttpResponse.json({
9191
access_token: createMockJWT({sub: 'test-client'}),
9292
expires_in: 1800,
93-
scope: 'sfcc.accountmanager.user.manage',
9493
});
9594
}),
9695
http.get(`${BASE_URL}/users`, () => {
@@ -134,7 +133,6 @@ describe('user delete', () => {
134133
return HttpResponse.json({
135134
access_token: createMockJWT({sub: 'test-client'}),
136135
expires_in: 1800,
137-
scope: 'sfcc.accountmanager.user.manage',
138136
});
139137
}),
140138
http.get(`${BASE_URL}/users`, () => {
@@ -177,7 +175,6 @@ describe('user delete', () => {
177175
return HttpResponse.json({
178176
access_token: createMockJWT({sub: 'test-client'}),
179177
expires_in: 1800,
180-
scope: 'sfcc.accountmanager.user.manage',
181178
});
182179
}),
183180
http.get(`${BASE_URL}/users`, () => {

0 commit comments

Comments
 (0)