@pnp/cli-microsoft365 10.0.0-beta.977d78b → 10.0.0-beta.a0367997

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (64) hide show
  1. package/allCommands.json +1 -1
  2. package/allCommandsFull.json +1 -1
  3. package/dist/Auth.js +3 -3
  4. package/dist/AuthServer.js +7 -7
  5. package/dist/api.js +1 -1
  6. package/dist/config.js +1 -0
  7. package/dist/m365/cli/commands/cli-doctor.js +2 -2
  8. package/dist/m365/cli/commands.js +1 -2
  9. package/dist/m365/entra/commands/m365group/m365group-set.js +24 -16
  10. package/dist/m365/entra/commands/m365group/m365group-user-add.js +5 -12
  11. package/dist/m365/entra/commands/oauth2grant/oauth2grant-list.js +3 -12
  12. package/dist/m365/external/commands/item/item-add.js +2 -5
  13. package/dist/m365/flow/commands/environment/environment-list.js +1 -1
  14. package/dist/m365/pa/commands/app/app-list.js +1 -6
  15. package/dist/m365/pa/commands/connector/connector-list.js +1 -6
  16. package/dist/m365/pa/commands/environment/environment-list.js +1 -1
  17. package/dist/m365/pp/commands/environment/environment-list.js +1 -1
  18. package/dist/m365/spfx/commands/project/project-doctor/{doctor-1.20.0-rc.1.js → doctor-1.20.0.js} +4 -2
  19. package/dist/m365/spfx/commands/project/project-doctor/rules/FN002021_DEVDEP_rushstack_eslint_config.js +10 -0
  20. package/dist/m365/spfx/commands/project/project-doctor.js +1 -1
  21. package/dist/m365/spfx/commands/project/project-upgrade/{upgrade-1.20.0-rc.1.js → upgrade-1.20.0.js} +28 -26
  22. package/dist/m365/spfx/commands/project/project-upgrade.js +13 -15
  23. package/dist/m365/spfx/commands/spfx-doctor.js +1 -1
  24. package/dist/m365/spo/commands/app/app-instance-list.js +3 -18
  25. package/dist/m365/spo/commands/app/app-list.js +1 -8
  26. package/dist/m365/spo/commands/feature/feature-list.js +1 -8
  27. package/dist/m365/spo/commands/file/file-copy.js +5 -1
  28. package/dist/m365/spo/commands/file/file-move.js +55 -33
  29. package/dist/m365/spo/commands/list/list-webhook-list.js +1 -6
  30. package/dist/m365/spo/commands/listitem/listitem-attachment-list.js +1 -8
  31. package/dist/m365/spo/commands/page/page-list.js +1 -1
  32. package/dist/m365/spo/commands/page/page-remove.js +37 -16
  33. package/dist/m365/spo/commands/page/page-template-list.js +1 -3
  34. package/dist/m365/spo/commands/site/site-admin-list.js +8 -9
  35. package/dist/m365/spo/commands/site/site-admin-remove.js +5 -4
  36. package/dist/m365/spo/commands/site/site-sharingpermission-set.js +68 -0
  37. package/dist/m365/spo/commands/sitescript/sitescript-list.js +1 -3
  38. package/dist/m365/spo/commands/{site/site-rename.js → tenant/tenant-site-rename.js} +29 -32
  39. package/dist/m365/spo/commands/theme/theme-list.js +1 -1
  40. package/dist/m365/spo/commands/web/web-clientsidewebpart-list.js +1 -6
  41. package/dist/m365/spo/commands.js +2 -1
  42. package/dist/m365/teams/commands/tab/tab-list.js +5 -3
  43. package/dist/m365/viva/commands/engage/Community.js +2 -0
  44. package/dist/m365/viva/commands/engage/engage-community-list.js +28 -0
  45. package/dist/m365/viva/commands.js +1 -0
  46. package/dist/request.js +46 -61
  47. package/dist/utils/spo.js +8 -8
  48. package/dist/utils/timersUtil.js +12 -0
  49. package/dist/utils/urlUtil.js +8 -0
  50. package/docs/docs/cmd/cli/cli-doctor.mdx +24 -23
  51. package/docs/docs/cmd/entra/m365group/m365group-set.mdx +9 -6
  52. package/docs/docs/cmd/entra/m365group/m365group-user-add.mdx +0 -3
  53. package/docs/docs/cmd/external/item/item-add.mdx +3 -3
  54. package/docs/docs/cmd/spfx/project/project-upgrade.mdx +1 -1
  55. package/docs/docs/cmd/spo/file/file-move.mdx +116 -9
  56. package/docs/docs/cmd/spo/page/page-remove.mdx +30 -12
  57. package/docs/docs/cmd/spo/site/site-admin-list.mdx +64 -12
  58. package/docs/docs/cmd/spo/site/site-sharingpermission-set.mdx +58 -0
  59. package/docs/docs/cmd/spo/{site/site-rename.mdx → tenant/tenant-site-rename.mdx} +7 -7
  60. package/docs/docs/cmd/teams/tab/tab-list.mdx +1 -2
  61. package/docs/docs/cmd/viva/engage/engage-community-list.mdx +81 -0
  62. package/package.json +1 -1
  63. package/dist/m365/cli/commands/cli-reconsent.js +0 -29
  64. package/docs/docs/cmd/cli/cli-reconsent.mdx +0 -62
@@ -26,7 +26,7 @@ class SpoThemeListCommand extends SpoCommand {
26
26
  responseType: 'json'
27
27
  };
28
28
  const rawRes = await request.post(requestOptions);
29
- await logger.log(rawRes.themePreviews);
29
+ await logger.log(rawRes.themePreviews || []);
30
30
  }
31
31
  catch (err) {
32
32
  this.handleRejectedODataJsonPromise(err);
@@ -41,12 +41,7 @@ class SpoWebClientSideWebPartListCommand extends SpoCommand {
41
41
  });
42
42
  }
43
43
  });
44
- if (clientSideWebParts.length === 0 && this.verbose) {
45
- await logger.logToStderr("No client-side web parts available for this site");
46
- }
47
- if (clientSideWebParts.length > 0) {
48
- await logger.log(clientSideWebParts);
49
- }
44
+ await logger.log(clientSideWebParts);
50
45
  }
51
46
  catch (err) {
52
47
  this.handleRejectedODataJsonPromise(err);
@@ -270,8 +270,8 @@ export default {
270
270
  SITE_RECYCLEBINITEM_REMOVE: `${prefix} site recyclebinitem remove`,
271
271
  SITE_RECYCLEBINITEM_RESTORE: `${prefix} site recyclebinitem restore`,
272
272
  SITE_REMOVE: `${prefix} site remove`,
273
- SITE_RENAME: `${prefix} site rename`,
274
273
  SITE_SET: `${prefix} site set`,
274
+ SITE_SHARINGPERMISSION_SET: `${prefix} site sharingpermission set`,
275
275
  SITE_CHROME_SET: `${prefix} site chrome set`,
276
276
  SITEDESIGN_ADD: `${prefix} sitedesign add`,
277
277
  SITEDESIGN_APPLY: `${prefix} sitedesign apply`,
@@ -321,6 +321,7 @@ export default {
321
321
  TENANT_SETTINGS_LIST: `${prefix} tenant settings list`,
322
322
  TENANT_SETTINGS_SET: `${prefix} tenant settings set`,
323
323
  TENANT_SITE_ARCHIVE: `${prefix} tenant site archive`,
324
+ TENANT_SITE_RENAME: `${prefix} tenant site rename`,
324
325
  TENANT_SITE_UNARCHIVE: `${prefix} tenant site unarchive`,
325
326
  TERM_ADD: `${prefix} term add`,
326
327
  TERM_GET: `${prefix} term get`,
@@ -29,9 +29,11 @@ class TeamsTabListCommand extends GraphCommand {
29
29
  const endpoint = `${this.resource}/v1.0/teams/${args.options.teamId}/channels/${formatting.encodeQueryParameter(args.options.channelId)}/tabs?$expand=teamsApp`;
30
30
  try {
31
31
  const items = await odata.getAllItems(endpoint);
32
- items.forEach(i => {
33
- i.teamsAppTabId = i.teamsApp.id;
34
- });
32
+ if (args.options.output !== 'json') {
33
+ items.forEach(i => {
34
+ i.teamsAppTabId = i.teamsApp.id;
35
+ });
36
+ }
35
37
  await logger.log(items);
36
38
  }
37
39
  catch (err) {
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=Community.js.map
@@ -0,0 +1,28 @@
1
+ import { odata } from '../../../../utils/odata.js';
2
+ import GraphCommand from '../../../base/GraphCommand.js';
3
+ import commands from '../../commands.js';
4
+ class VivaEngageCommunityListCommand extends GraphCommand {
5
+ get name() {
6
+ return commands.ENGAGE_COMMUNITY_LIST;
7
+ }
8
+ get description() {
9
+ return 'Lists all Viva Engage communities';
10
+ }
11
+ defaultProperties() {
12
+ return ['id', 'displayName', 'privacy'];
13
+ }
14
+ async commandAction(logger) {
15
+ if (this.verbose) {
16
+ await logger.logToStderr('Getting all Viva Engage communities...');
17
+ }
18
+ try {
19
+ const results = await odata.getAllItems(`${this.resource}/v1.0/employeeExperience/communities`);
20
+ await logger.log(results);
21
+ }
22
+ catch (err) {
23
+ this.handleRejectedODataJsonPromise(err);
24
+ }
25
+ }
26
+ }
27
+ export default new VivaEngageCommunityListCommand();
28
+ //# sourceMappingURL=engage-community-list.js.map
@@ -3,6 +3,7 @@ export default {
3
3
  CONNECTIONS_APP_CREATE: `${prefix} connections app create`,
4
4
  ENGAGE_COMMUNITY_ADD: `${prefix} engage community add`,
5
5
  ENGAGE_COMMUNITY_GET: `${prefix} engage community get`,
6
+ ENGAGE_COMMUNITY_LIST: `${prefix} engage community list`,
6
7
  ENGAGE_GROUP_LIST: `${prefix} engage group list`,
7
8
  ENGAGE_GROUP_USER_ADD: `${prefix} engage group user add`,
8
9
  ENGAGE_GROUP_USER_REMOVE: `${prefix} engage group user remove`,
package/dist/request.js CHANGED
@@ -4,6 +4,7 @@ import auth, { Auth } from './Auth.js';
4
4
  import { app } from './utils/app.js';
5
5
  import { formatting } from './utils/formatting.js';
6
6
  import { timings } from './cli/timings.js';
7
+ import { timersUtil } from './utils/timersUtil.js';
7
8
  class Request {
8
9
  set debug(debug) {
9
10
  // if the value to set is the same as current value return early to avoid
@@ -125,76 +126,60 @@ class Request {
125
126
  options.method = 'HEAD';
126
127
  return this.execute(options);
127
128
  }
128
- execute(options, resolve, reject) {
129
+ async execute(options) {
129
130
  const start = process.hrtime.bigint();
130
131
  if (!this._logger) {
131
- return Promise.reject('Logger not set on the request object');
132
+ throw 'Logger not set on the request object';
132
133
  }
133
134
  this.updateRequestForCloudType(options, auth.connection.cloudType);
134
- return new Promise((_resolve, _reject) => {
135
- (() => {
136
- if (options.headers && options.headers['x-anonymous']) {
137
- return Promise.resolve('');
138
- }
139
- else {
140
- const url = options.headers && options.headers['x-resource'] ? options.headers['x-resource'] : options.url;
141
- const resource = Auth.getResourceFromUrl(url);
142
- return auth.ensureAccessToken(resource, this._logger, this._debug);
143
- }
144
- })()
145
- .then((accessToken) => {
146
- if (options.headers) {
147
- if (options.headers['x-anonymous']) {
148
- delete options.headers['x-anonymous'];
149
- }
150
- if (options.headers['x-resource']) {
151
- delete options.headers['x-resource'];
152
- }
153
- if (accessToken !== '') {
154
- options.headers.authorization = `Bearer ${accessToken}`;
155
- }
156
- }
157
- const proxyUrl = process.env.HTTP_PROXY || process.env.HTTPS_PROXY;
158
- if (proxyUrl) {
159
- options.proxy = this.createProxyConfigFromUrl(proxyUrl);
135
+ try {
136
+ let accessToken = '';
137
+ if (options.headers && options.headers['x-anonymous']) {
138
+ accessToken = '';
139
+ }
140
+ else {
141
+ const url = options.headers && options.headers['x-resource'] ? options.headers['x-resource'] : options.url;
142
+ const resource = Auth.getResourceFromUrl(url);
143
+ accessToken = await auth.ensureAccessToken(resource, this._logger, this._debug);
144
+ }
145
+ if (options.headers) {
146
+ if (options.headers['x-anonymous']) {
147
+ delete options.headers['x-anonymous'];
160
148
  }
161
- return this.req(options);
162
- })
163
- .then((res) => {
164
- if (resolve) {
165
- resolve((options.responseType === 'stream' || options.fullResponse) ? res : res.data);
149
+ if (options.headers['x-resource']) {
150
+ delete options.headers['x-resource'];
166
151
  }
167
- else {
168
- const end = process.hrtime.bigint();
169
- timings.api.push(Number(end - start));
170
- _resolve((options.responseType === 'stream' || options.fullResponse) ? res : res.data);
152
+ if (accessToken !== '') {
153
+ options.headers.authorization = `Bearer ${accessToken}`;
171
154
  }
172
- }, async (error) => {
173
- if (error && error.response &&
174
- (error.response.status === 429 ||
175
- error.response.status === 503)) {
176
- let retryAfter = parseInt(error.response.headers['retry-after'] || '10');
177
- if (isNaN(retryAfter)) {
178
- retryAfter = 10;
179
- }
180
- if (this._debug) {
181
- await this._logger.log(`Request throttled. Waiting ${retryAfter}sec before retrying...`);
182
- }
183
- // eslint-disable-next-line @typescript-eslint/no-floating-promises
184
- setTimeout(async () => { this.execute(options, resolve || _resolve, reject || _reject); }, retryAfter * 1000);
155
+ }
156
+ const proxyUrl = process.env.HTTP_PROXY || process.env.HTTPS_PROXY;
157
+ if (proxyUrl) {
158
+ options.proxy = this.createProxyConfigFromUrl(proxyUrl);
159
+ }
160
+ const res = await this.req(options);
161
+ const end = process.hrtime.bigint();
162
+ timings.api.push(Number(end - start));
163
+ return options.responseType === 'stream' || options.fullResponse ?
164
+ res :
165
+ res.data;
166
+ }
167
+ catch (error) {
168
+ const end = process.hrtime.bigint();
169
+ timings.api.push(Number(end - start));
170
+ if (error && error.response && (error.response.status === 429 || error.response.status === 503)) {
171
+ let retryAfter = parseInt(error.response.headers['retry-after'] || '10');
172
+ if (isNaN(retryAfter)) {
173
+ retryAfter = 10;
185
174
  }
186
- else {
187
- if (reject) {
188
- reject(error);
189
- }
190
- else {
191
- const end = process.hrtime.bigint();
192
- timings.api.push(Number(end - start));
193
- _reject(error);
194
- }
175
+ if (this._debug) {
176
+ await this._logger.log(`Request throttled. Waiting ${retryAfter} sec before retrying...`);
195
177
  }
196
- });
197
- });
178
+ await timersUtil.setTimeout(retryAfter * 1000);
179
+ return this.execute(options);
180
+ }
181
+ throw error;
182
+ }
198
183
  }
199
184
  updateRequestForCloudType(options, cloudType) {
200
185
  const url = new URL(options.url);
package/dist/utils/spo.js CHANGED
@@ -1573,8 +1573,10 @@ export const spo = {
1573
1573
  AllowSchemaMismatch: true,
1574
1574
  BypassSharedLock: !!options?.bypassSharedLock,
1575
1575
  IgnoreVersionHistory: !!options?.ignoreVersionHistory,
1576
+ IncludeItemPermissions: !!options?.includeItemPermissions,
1576
1577
  CustomizedItemName: options?.newName ? [options.newName] : undefined,
1577
- SameWebCopyMoveOptimization: true
1578
+ SameWebCopyMoveOptimization: true,
1579
+ IsMoveMode: options?.operation === 'move'
1578
1580
  }
1579
1581
  }
1580
1582
  };
@@ -1615,7 +1617,7 @@ export const spo = {
1615
1617
  return objectInfo;
1616
1618
  },
1617
1619
  /**
1618
- * Gets the site collection URL for a given web URL using SP Admin site.
1620
+ * Gets the primary owner login from a site as admin.
1619
1621
  * @param adminUrl The SharePoint admin URL
1620
1622
  * @param siteId The site ID
1621
1623
  * @param logger The logger object
@@ -1629,13 +1631,12 @@ export const spo = {
1629
1631
  const requestOptions = {
1630
1632
  url: `${adminUrl}/_api/SPO.Tenant/sites('${siteId}')?$select=OwnerLoginName`,
1631
1633
  headers: {
1632
- accept: 'application/json;odata=nometadata',
1633
- 'content-type': 'application/json;charset=utf-8'
1634
- }
1634
+ accept: 'application/json;odata=nometadata'
1635
+ },
1636
+ responseType: 'json'
1635
1637
  };
1636
1638
  const response = await request.get(requestOptions);
1637
- const responseContent = JSON.parse(response);
1638
- return responseContent.OwnerLoginName;
1639
+ return response.OwnerLoginName;
1639
1640
  },
1640
1641
  /**
1641
1642
  * Gets the primary owner login from a site.
@@ -1650,7 +1651,6 @@ export const spo = {
1650
1651
  }
1651
1652
  const requestOptions = {
1652
1653
  url: `${siteUrl}/_api/site/owner`,
1653
- method: 'GET',
1654
1654
  headers: {
1655
1655
  'accept': 'application/json;odata=nometadata'
1656
1656
  },
@@ -0,0 +1,12 @@
1
+ import { setTimeout } from "timers/promises";
2
+ export const timersUtil = {
3
+ /**
4
+ * Timeout for a specific duration.
5
+ * @param duration Duration in milliseconds.
6
+ */
7
+ /* c8 ignore next 3 */
8
+ async setTimeout(duration) {
9
+ return setTimeout(duration);
10
+ }
11
+ };
12
+ //# sourceMappingURL=timersUtil.js.map
@@ -198,6 +198,14 @@ export const urlUtil = {
198
198
  return rootUrl.origin;
199
199
  }
200
200
  },
201
+ /**
202
+ * Removes leading slashes from the URL.
203
+ * @param url The URL to process.
204
+ * @returns The URL without leading slashes.
205
+ */
206
+ removeLeadingSlashes(url) {
207
+ return url.replace(/^\/+/, '');
208
+ },
201
209
  /**
202
210
  * Removes trailing slashes from the URL.
203
211
  * @param url The URL to process.
@@ -22,7 +22,7 @@ This command gets all the necessary diagnostic information needed to triage and
22
22
 
23
23
  ## Examples
24
24
 
25
- Retrieve diagnostic information
25
+ Retrieve diagnostic information.
26
26
 
27
27
  ```sh
28
28
  m365 cli doctor
@@ -42,18 +42,20 @@ m365 cli doctor
42
42
  },
43
43
  "cliVersion": "6.1.0",
44
44
  "nodeVersion": "v16.13.0",
45
- "cliAadAppId": "31359c7f-bd7e-475c-86db-fdb8c937548e",
46
- "cliAadAppTenant": "common",
47
- "authMode": "DeviceCode",
45
+ "cliEntraAppId": "31359c7f-bd7e-475c-86db-fdb8c937548e",
46
+ "cliEntraAppTenant": "common",
47
+ "authMode": "deviceCode",
48
48
  "cliEnvironment": "",
49
49
  "cliConfig": {
50
50
  "output": "json",
51
51
  "showHelpOnFailure": false
52
52
  },
53
53
  "roles": [],
54
- "scopes": [
55
- "AllSites.FullControl"
56
- ]
54
+ "scopes": {
55
+ "https://graph.microsoft.com": [
56
+ "AllSites.FullControl"
57
+ ]
58
+ }
57
59
  }
58
60
  ```
59
61
 
@@ -61,24 +63,24 @@ m365 cli doctor
61
63
  <TabItem value="Text">
62
64
 
63
65
  ```text
64
- authMode : DeviceCode
65
- cliAadAppId : 31359c7f-bd7e-475c-86db-fdb8c937548e
66
- cliAadAppTenant: common
67
- cliConfig : {"output":"json","showHelpOnFailure":false}
68
- cliEnvironment :
69
- cliVersion : 6.1.0
70
- nodeVersion : v16.13.0
71
- os : {"platform":"win32","version":"Windows 10 Pro","release":"10.0.19045"}
72
- roles : []
73
- scopes : ["AllSites.FullControl"]
66
+ authMode : deviceCode
67
+ cliConfig : {"output":"json","showHelpOnFailure":false}
68
+ cliEntraAppId : 31359c7f-bd7e-475c-86db-fdb8c937548e
69
+ cliEntraAppTenant: common
70
+ cliEnvironment :
71
+ cliVersion : 6.1.0
72
+ nodeVersion : v16.13.0
73
+ os : {"platform":"win32","version":"Windows 10 Pro","release":"10.0.19045"}
74
+ roles : []
75
+ scopes : {"https://graph.microsoft.com":["AllSites.FullControl"]}
74
76
  ```
75
77
 
76
78
  </TabItem>
77
79
  <TabItem value="CSV">
78
80
 
79
81
  ```csv
80
- os,cliVersion,nodeVersion,cliAadAppId,cliAadAppTenant,authMode,cliEnvironment,cliConfig,roles,scopes
81
- "{""platform"":""win32"",""version"":""Windows 10 Pro"",""release"":""10.0.19045""}",6.1.0,v16.13.0,31359c7f-bd7e-475c-86db-fdb8c937548e,common,DeviceCode,,"{""output"":""json"",""showHelpOnFailure"":false}",[],"[""AllSites.FullControl""]"
82
+ os,cliVersion,nodeVersion,cliEntraAppId,cliEntraAppTenant,authMode,cliEnvironment,cliConfig,roles,scopes
83
+ "{""platform"":""win32"",""version"":""Windows 10 Pro"",""release"":""10.0.19045""}",6.1.0,v16.13.0,31359c7f-bd7e-475c-86db-fdb8c937548e,common,deviceCode,,"{""output"":""json"",""showHelpOnFailure"":false}",[],"{""https://graph.microsoft.com"":[""AllSites.FullControl""]}"
82
84
  ```
83
85
 
84
86
  </TabItem>
@@ -93,12 +95,11 @@ m365 cli doctor
93
95
  ---------|-------
94
96
  cliVersion | 6.1.0
95
97
  nodeVersion | v16.13.0
96
- cliAadAppId | 31359c7f-bd7e-475c-86db-fdb8c937548e
97
- cliAadAppTenant | common
98
- authMode | DeviceCode
98
+ cliEntraAppId | 31359c7f-bd7e-475c-86db-fdb8c937548e
99
+ cliEntraAppTenant | common
100
+ authMode | deviceCode
99
101
  cliEnvironment |
100
102
  ```
101
103
 
102
104
  </TabItem>
103
105
  </Tabs>
104
-
@@ -19,11 +19,14 @@ m365 aad m365group set [options]
19
19
  ## Options
20
20
 
21
21
  ```md definition-list
22
- `-i, --id <id>`
22
+ `-i, --id [id]`
23
23
  : The ID of the Microsoft 365 Group to update
24
24
 
25
25
  `-n, --displayName [displayName]`
26
- : Display name for the Microsoft 365 Group
26
+ : Display name of the Microsoft 365 Group to update
27
+
28
+ `--newDisplayName [newDisplayName]`
29
+ : New display name for the Microsoft 365 Group
27
30
 
28
31
  `-d, --description [description]`
29
32
  : Description for the Microsoft 365 Group
@@ -72,7 +75,7 @@ Options `allowExternalSenders` and `autoSubscribeNewMembers` can only be set usi
72
75
  Update Microsoft 365 Group display name.
73
76
 
74
77
  ```sh
75
- m365 entra m365group set --id 28beab62-7540-4db1-a23f-29a6018a3848 --displayName Finance
78
+ m365 entra m365group set --id 28beab62-7540-4db1-a23f-29a6018a3848 --newDisplayName Finance
76
79
  ```
77
80
 
78
81
  Change Microsoft 365 Group visibility to public.
@@ -81,16 +84,16 @@ Change Microsoft 365 Group visibility to public.
81
84
  m365 entra m365group set --id 28beab62-7540-4db1-a23f-29a6018a3848 --isPrivate `false`
82
85
  ```
83
86
 
84
- Add new Microsoft 365 Group owners.
87
+ Add new Microsoft 365 Group owners of group.
85
88
 
86
89
  ```sh
87
- m365 entra m365group set --id 28beab62-7540-4db1-a23f-29a6018a3848 --owners "DebraB@contoso.onmicrosoft.com,DiegoS@contoso.onmicrosoft.com"
90
+ m365 entra m365group set --displayName 'Project Team' --owners "DebraB@contoso.onmicrosoft.com,DiegoS@contoso.onmicrosoft.com"
88
91
  ```
89
92
 
90
93
  Add new Microsoft 365 Group members.
91
94
 
92
95
  ```sh
93
- m365 entra m365group set --id 28beab62-7540-4db1-a23f-29a6018a3848 --members "DebraB@contoso.onmicrosoft.com,DiegoS@contoso.onmicrosoft.com"
96
+ m365 entra m365group set --displayName 'Project Team' --members "DebraB@contoso.onmicrosoft.com,DiegoS@contoso.onmicrosoft.com"
94
97
  ```
95
98
 
96
99
  Update Microsoft 365 Group logo.
@@ -37,9 +37,6 @@ m365 teams user add
37
37
  `--teamName [teamName]`
38
38
  : The display name of the Microsoft Teams team. Specify only one of the following: `groupId`, `groupName`, `teamId`, or `teamName`.
39
39
 
40
- `-n, --userName [userName]`
41
- : (deprecated) User's UPN (User Principal Name), e.g. johndoe@example.com.
42
-
43
40
  `--ids [ids]`
44
41
  : Microsoft Entra IDs of users. You can also pass a comma-separated list of IDs. Specify either `ids` or `userNames` but not both.
45
42
 
@@ -63,13 +63,13 @@ For more information about using these options, see the Microsoft Graph API docu
63
63
  Creates an external item with simple properties that everyone is allowed to access
64
64
 
65
65
  ```sh
66
- m365 external item add --id "pnp-ensure-siteassets-library" --connectionId "samplesolutiongallery" --content "Ensure that the Site Assets library is created." --title "Ensure the Site Assets Library is created" --description "Ensure that the Site Assets library is created." --authors "Phil Harding" --acls "grant,everyone,everyone"
66
+ m365 external item add --id "pnp-ensure-siteassets-library" --externalConnectionId "samplesolutiongallery" --content "Ensure that the Site Assets library is created." --title "Ensure the Site Assets Library is created" --description "Ensure that the Site Assets library is created." --authors "Phil Harding" --acls "grant,everyone,everyone"
67
67
  ```
68
68
 
69
69
  Creates an external item with multi-value properties accessible only to users from the specified Entra group
70
70
 
71
71
  ```sh
72
- m365 external item add --id "pnp-ensure-siteassets-library" --connectionId "samplesolutiongallery" --content "Ensure that the Site Assets library is created." --title "Ensure the Site Assets Library is created" --description "Ensure that the Site Assets library is created." --authors@odata.type "Collection(String)" --authors "Phil Harding;#Steve Smith" --acls "grant,group,Super users"
72
+ m365 external item add --id "pnp-ensure-siteassets-library" --externalConnectionId "samplesolutiongallery" --content "Ensure that the Site Assets library is created." --title "Ensure the Site Assets Library is created" --description "Ensure that the Site Assets library is created." --authors@odata.type "Collection(String)" --authors "Phil Harding;#Steve Smith" --acls "grant,group,Super users"
73
73
  ```
74
74
 
75
75
  ## Response
@@ -123,7 +123,7 @@ m365 external item add --id "pnp-ensure-siteassets-library" --connectionId "samp
123
123
  <TabItem value="Markdown">
124
124
 
125
125
  ```md
126
- # m365 external item add --id "pnp-ensure-siteassets-library" --connectionId "samplesolutiongallery" --content "Ensure that the Site Assets library is created." --title "Ensure the Site Assets Library is created" --description "Ensure that the Site Assets library is created." --authors "Phil Harding" --acls "grant,everyone,everyone"
126
+ # m365 external item add --id "pnp-ensure-siteassets-library" --externalConnectionId "samplesolutiongallery" --content "Ensure that the Site Assets library is created." --title "Ensure the Site Assets Library is created" --description "Ensure that the Site Assets library is created." --authors "Phil Harding" --acls "grant,everyone,everyone"
127
127
 
128
128
  Date: 2023-10-28
129
129
 
@@ -35,7 +35,7 @@ m365 spfx project upgrade [options]
35
35
 
36
36
  ## Remarks
37
37
 
38
- The `spfx project upgrade` command helps you upgrade your SharePoint Framework project to the specified version. If no version is specified, the command will upgrade to the latest version of the SharePoint Framework it supports (v1.19.0).
38
+ The `spfx project upgrade` command helps you upgrade your SharePoint Framework project to the specified version. If no version is specified, the command will upgrade to the latest version of the SharePoint Framework it supports (v1.20.0).
39
39
 
40
40
  This command doesn't change your project files. Instead, it gives you a report with all steps necessary to upgrade your project to the specified version of the SharePoint Framework. Changing project files is error-prone, especially when it comes to updating your solution's code. This is why at this moment, this command produces a report that you can use yourself to perform the necessary updates and verify that everything is working as expected.
41
41
 
@@ -1,4 +1,6 @@
1
1
  import Global from '/docs/cmd/_global.mdx';
2
+ import Tabs from '@theme/Tabs';
3
+ import TabItem from '@theme/TabItem';
2
4
 
3
5
  # spo file move
4
6
 
@@ -31,11 +33,14 @@ m365 spo file move [options]
31
33
  `--nameConflictBehavior [nameConflictBehavior]`
32
34
  : Behavior when a file or folder with the same name is already present at the destination. Allowed values: `fail`, `replace`, `rename`. Defaults to `fail`.
33
35
 
34
- `--retainEditorAndModified`
35
- : Use this option to retain the editor and modified date. When not specified, these values are reset when moving to another library.
36
+ `--includeItemPermissions`
37
+ : Ensure that item-level permissions are preserved during the move.
36
38
 
37
39
  `--bypassSharedLock`
38
40
  : This indicates whether a file with a share lock can still be moved. Use this option to move a file that is locked.
41
+
42
+ `--skipWait`
43
+ : Don't wait for the copy operation to complete.
39
44
  ```
40
45
 
41
46
  <Global />
@@ -45,7 +50,6 @@ m365 spo file move [options]
45
50
  All file versions are retained while moving a file.
46
51
 
47
52
  When you specify a value for `nameConflictBehavior`, consider the following:
48
-
49
53
  - `fail` will throw an error when the destination file already exists.
50
54
  - `replace` will replace the destination file if it already exists.
51
55
  - `rename` will add a suffix (e.g. Document1.pdf) when the destination file already exists.
@@ -70,16 +74,119 @@ Move a file to another document library and replace a file with the same name.
70
74
  m365 spo file move --webUrl https://contoso.sharepoint.com/sites/project-x --sourceUrl "/Shared Documents/Report project-x.pdf" --targetUrl "/sites/project-x/My Documents" --newName Report.pdf --nameConflictBehavior replace
71
75
  ```
72
76
 
73
- Move a file referenced by its ID to another document library and retain editor and modified date.
77
+ Move a file referenced by its ID to another document library and retain item-level permissions.
74
78
 
75
79
  ```sh
76
- m365 spo file move --webUrl https://contoso.sharepoint.com/sites/project-x --sourceId b8cc341b-9c11-4f2d-aa2b-0ce9c18bcba2 --targetUrl "/sites/project-x/My Documents" --retainEditorAndModified
80
+ m365 spo file move --webUrl https://contoso.sharepoint.com/sites/project-x --sourceId b8cc341b-9c11-4f2d-aa2b-0ce9c18bcba2 --targetUrl "/sites/project-x/My Documents" --includeItemPermissions
77
81
  ```
78
82
 
79
83
  ## Response
80
84
 
81
- The command won't return a response on success.
85
+ ### Standard Response
86
+
87
+ <Tabs>
88
+ <TabItem value="JSON">
89
+
90
+ ```json
91
+ {
92
+ "CheckInComment": "",
93
+ "CheckOutType": 2,
94
+ "ContentTag": "{03E171B6-9DF2-46D9-A7A1-D5FA0BD23E4B},1,1",
95
+ "CustomizedPageStatus": 0,
96
+ "ETag": "\"{03E171B6-9DF2-46D9-A7A1-D5FA0BD23E4B},1\"",
97
+ "Exists": true,
98
+ "IrmEnabled": false,
99
+ "Length": "5987",
100
+ "Level": 1,
101
+ "LinkingUri": null,
102
+ "LinkingUrl": "",
103
+ "MajorVersion": 1,
104
+ "MinorVersion": 0,
105
+ "Name": "Test1.docx",
106
+ "ServerRelativeUrl": "/sites/project-x/documents/Test1.docx",
107
+ "TimeCreated": "2022-10-30T10:16:18Z",
108
+ "TimeLastModified": "2022-10-30T10:16:18Z",
109
+ "Title": null,
110
+ "UIVersion": 512,
111
+ "UIVersionLabel": "1.0",
112
+ "UniqueId": "b2307a39-e878-458b-bc90-03bc578531d6"
113
+ }
114
+ ```
115
+
116
+ </TabItem>
117
+ <TabItem value="Text">
118
+
119
+ ```text
120
+ CheckInComment :
121
+ CheckOutType : 2
122
+ ContentTag : {03E171B6-9DF2-46D9-A7A1-D5FA0BD23E4B},1,1
123
+ CustomizedPageStatus: 0
124
+ ETag : "{03E171B6-9DF2-46D9-A7A1-D5FA0BD23E4B},1"
125
+ Exists : true
126
+ IrmEnabled : false
127
+ Length : 5987
128
+ Level : 1
129
+ LinkingUri : null
130
+ LinkingUrl :
131
+ MajorVersion : 1
132
+ MinorVersion : 0
133
+ Name : Test1.docx
134
+ ServerRelativeUrl : /sites/project-x/documents/Test1.docx
135
+ TimeCreated : 2022-10-30T10:16:18Z
136
+ TimeLastModified : 2022-10-30T10:16:18Z
137
+ Title : null
138
+ UIVersion : 512
139
+ UIVersionLabel : 1.0
140
+ UniqueId : b2307a39-e878-458b-bc90-03bc578531d6
141
+ ```
142
+
143
+ </TabItem>
144
+ <TabItem value="CSV">
145
+
146
+ ```csv
147
+ CheckInComment,CheckOutType,ContentTag,CustomizedPageStatus,ETag,Exists,IrmEnabled,Length,Level,LinkingUri,LinkingUrl,MajorVersion,MinorVersion,Name,ServerRelativeUrl,TimeCreated,TimeLastModified,Title,UIVersion,UIVersionLabel,UniqueId
148
+ ,2,"{03E171B6-9DF2-46D9-A7A1-D5FA0BD23E4B},1,1",0,"""{03E171B6-9DF2-46D9-A7A1-D5FA0BD23E4B},1""",1,,5987,1,,,1,0,Test1.docx,/sites/project-x/documents/Test1.docx,2022-10-30T10:16:18Z,2022-10-30T10:16:18Z,,512,1.0,b2307a39-e878-458b-bc90-03bc578531d6
149
+ ```
150
+
151
+ </TabItem>
152
+ <TabItem value="Markdown">
153
+
154
+ ```md
155
+ # spo file move --webUrl "https://contoso.sharepoint.com/sites/IT" --sourceUrl "/Shared Documents/Document.docx" --targetUrl "/sites/project-x/Shared Documents"
156
+
157
+ Date: 10/3/2023
158
+
159
+ ## b2307a39-e878-458b-bc90-03bc578531d6
160
+
161
+ Property | Value
162
+ ---------|-------
163
+ CheckInComment |
164
+ CheckOutType | 2
165
+ ContentTag | {03E171B6-9DF2-46D9-A7A1-D5FA0BD23E4B},1,1
166
+ CustomizedPageStatus | 0
167
+ ETag | "{03E171B6-9DF2-46D9-A7A1-D5FA0BD23E4B},1"
168
+ Exists | true
169
+ ExistsAllowThrowForPolicyFailures | true
170
+ IrmEnabled | false
171
+ Length | 5987
172
+ Level | 1
173
+ LinkingUri | https://contoso.sharepoint.com/sites/project-x/shared%20documents/Document.docx?d=w59d4e6fcf6f94ce78bea0273cedb1a19
174
+ LinkingUrl | https://contoso.sharepoint.com/sites/project-x/shared documents/Document.docx?d=w59d4e6fcf6f94ce78bea0273cedb1a19
175
+ MajorVersion | 1
176
+ MinorVersion | 0
177
+ Name | Document.docx
178
+ ServerRelativeUrl | /sites/project-x/shared documents/Document.docx
179
+ TimeCreated | 2023-05-23T09:51:34Z
180
+ TimeLastModified | 2023-05-23T10:13:01Z
181
+ Title |
182
+ UIVersion | 1536
183
+ UIVersionLabel | 1.0
184
+ UniqueId | b2307a39-e878-458b-bc90-03bc578531d6
185
+ ```
186
+
187
+ </TabItem>
188
+ </Tabs>
189
+
190
+ ### `skipWait` response
82
191
 
83
- ## More information
84
-
85
- - Move items from a SharePoint document library: [https://support.office.com/en-us/article/move-or-copy-items-from-a-sharepoint-document-library-00e2f483-4df3-46be-a861-1f5f0c1a87bc](https://support.office.com/en-us/article/move-or-copy-items-from-a-sharepoint-document-library-00e2f483-4df3-46be-a861-1f5f0c1a87bc)
192
+ The command won't return a response on success.