@pnp/cli-microsoft365 6.8.0-beta.62006d7 → 6.8.0-beta.9f8a015

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 (107) hide show
  1. package/.mocharc.json +1 -0
  2. package/README.md +6 -1
  3. package/dist/m365/spo/commands/file/file-checkin.js +8 -3
  4. package/dist/m365/spo/commands/file/file-checkout.js +8 -3
  5. package/dist/m365/spo/commands/file/file-copy.js +4 -4
  6. package/dist/m365/spo/commands/file/file-get.js +3 -1
  7. package/dist/m365/spo/commands/file/file-list.js +2 -2
  8. package/dist/m365/spo/commands/file/file-move.js +6 -7
  9. package/dist/m365/spo/commands/file/file-remove.js +3 -12
  10. package/dist/m365/spo/commands/file/file-rename.js +3 -3
  11. package/dist/m365/spo/commands/file/file-roleassignment-add.js +2 -1
  12. package/dist/m365/spo/commands/file/file-roleassignment-remove.js +3 -3
  13. package/dist/m365/spo/commands/file/file-roleinheritance-break.js +2 -1
  14. package/dist/m365/spo/commands/file/file-roleinheritance-reset.js +2 -1
  15. package/dist/m365/spo/commands/file/file-sharinginfo-get.js +4 -2
  16. package/dist/m365/spo/commands/file/file-version-clear.js +3 -1
  17. package/dist/m365/spo/commands/file/file-version-get.js +3 -1
  18. package/dist/m365/spo/commands/file/file-version-remove.js +3 -1
  19. package/dist/m365/spo/commands/file/file-version-restore.js +3 -1
  20. package/dist/m365/spo/commands/folder/folder-copy.js +4 -4
  21. package/dist/m365/spo/commands/folder/folder-get.js +5 -2
  22. package/dist/m365/spo/commands/folder/folder-move.js +3 -2
  23. package/dist/m365/spo/commands/folder/folder-rename.js +5 -2
  24. package/dist/m365/spo/commands/serviceprincipal/serviceprincipal-permissionrequest-list.js +46 -1
  25. package/dist/m365/spo/commands/site/site-recyclebinitem-move.js +119 -0
  26. package/dist/m365/spo/commands/site/site-recyclebinitem-remove.js +106 -0
  27. package/dist/m365/spo/commands.js +2 -0
  28. package/dist/utils/spo.js +1 -1
  29. package/docs/docs/cmd/cli/cli-consent.md +6 -0
  30. package/docs/docs/cmd/cli/cli-doctor.md +17 -0
  31. package/docs/docs/cmd/cli/cli-issue.md +6 -0
  32. package/docs/docs/cmd/cli/cli-reconsent.md +6 -0
  33. package/docs/docs/cmd/cli/completion/completion-sh-setup.md +6 -0
  34. package/docs/docs/cmd/cli/config/config-get.md +6 -0
  35. package/docs/docs/cmd/login.md +1 -1
  36. package/docs/docs/cmd/search/externalconnection/externalconnection-get.md +17 -0
  37. package/docs/docs/cmd/search/externalconnection/externalconnection-list.md +17 -0
  38. package/docs/docs/cmd/spo/file/file-add.md +1 -1
  39. package/docs/docs/cmd/spo/file/file-checkin.md +1 -1
  40. package/docs/docs/cmd/spo/file/file-checkout.md +1 -1
  41. package/docs/docs/cmd/spo/file/file-copy.md +1 -1
  42. package/docs/docs/cmd/spo/file/file-get.md +1 -1
  43. package/docs/docs/cmd/spo/file/file-move.md +3 -3
  44. package/docs/docs/cmd/spo/file/file-rename.md +1 -1
  45. package/docs/docs/cmd/spo/file/file-retentionlabel-ensure.md +3 -3
  46. package/docs/docs/cmd/spo/file/file-retentionlabel-remove.md +2 -2
  47. package/docs/docs/cmd/spo/file/file-roleassignment-add.md +1 -1
  48. package/docs/docs/cmd/spo/file/file-roleassignment-remove.md +1 -1
  49. package/docs/docs/cmd/spo/file/file-roleinheritance-break.md +1 -1
  50. package/docs/docs/cmd/spo/file/file-roleinheritance-reset.md +1 -1
  51. package/docs/docs/cmd/spo/file/file-sharinginfo-get.md +1 -1
  52. package/docs/docs/cmd/spo/file/file-sharinglink-add.md +1 -1
  53. package/docs/docs/cmd/spo/file/file-sharinglink-clear.md +1 -1
  54. package/docs/docs/cmd/spo/file/file-sharinglink-get.md +1 -1
  55. package/docs/docs/cmd/spo/file/file-sharinglink-list.md +1 -1
  56. package/docs/docs/cmd/spo/file/file-sharinglink-remove.md +1 -1
  57. package/docs/docs/cmd/spo/file/file-sharinglink-set.md +1 -1
  58. package/docs/docs/cmd/spo/file/file-version-clear.md +2 -2
  59. package/docs/docs/cmd/spo/file/file-version-get.md +1 -1
  60. package/docs/docs/cmd/spo/file/file-version-list.md +1 -1
  61. package/docs/docs/cmd/spo/file/file-version-remove.md +1 -1
  62. package/docs/docs/cmd/spo/file/file-version-restore.md +1 -1
  63. package/docs/docs/cmd/spo/folder/folder-add.md +9 -3
  64. package/docs/docs/cmd/spo/folder/folder-copy.md +1 -1
  65. package/docs/docs/cmd/spo/folder/folder-get.md +7 -7
  66. package/docs/docs/cmd/spo/folder/folder-list.md +11 -11
  67. package/docs/docs/cmd/spo/folder/folder-move.md +1 -1
  68. package/docs/docs/cmd/spo/folder/folder-remove.md +7 -7
  69. package/docs/docs/cmd/spo/folder/folder-rename.md +11 -5
  70. package/docs/docs/cmd/spo/folder/folder-retentionlabel-ensure.md +3 -3
  71. package/docs/docs/cmd/spo/folder/folder-retentionlabel-remove.md +1 -1
  72. package/docs/docs/cmd/spo/folder/folder-roleinheritance-break.md +1 -1
  73. package/docs/docs/cmd/spo/folder/folder-roleinheritance-reset.md +4 -4
  74. package/docs/docs/cmd/spo/orgassetslibrary/orgassetslibrary-list.md +19 -0
  75. package/docs/docs/cmd/spo/orgassetslibrary/orgassetslibrary-remove.md +12 -0
  76. package/docs/docs/cmd/spo/orgnewssite/orgnewssite-list.md +6 -0
  77. package/docs/docs/cmd/spo/page/page-column-get.md +15 -0
  78. package/docs/docs/cmd/spo/page/page-column-list.md +16 -0
  79. package/docs/docs/cmd/spo/page/page-control-get.md +18 -0
  80. package/docs/docs/cmd/spo/page/page-control-list.md +18 -0
  81. package/docs/docs/cmd/spo/page/page-copy.md +35 -0
  82. package/docs/docs/cmd/spo/page/page-get.md +39 -0
  83. package/docs/docs/cmd/spo/page/page-list.md +53 -0
  84. package/docs/docs/cmd/spo/page/page-section-get.md +12 -0
  85. package/docs/docs/cmd/spo/page/page-section-list.md +13 -0
  86. package/docs/docs/cmd/spo/page/page-template-list.md +31 -0
  87. package/docs/docs/cmd/spo/propertybag/propertybag-get.md +6 -0
  88. package/docs/docs/cmd/spo/propertybag/propertybag-list.md +13 -0
  89. package/docs/docs/cmd/spo/report/report-activityfilecounts.md +7 -0
  90. package/docs/docs/cmd/spo/report/report-activitypages.md +7 -0
  91. package/docs/docs/cmd/spo/report/report-activityusercounts.md +7 -0
  92. package/docs/docs/cmd/spo/report/report-activityuserdetail.md +7 -0
  93. package/docs/docs/cmd/spo/report/report-siteusagedetail.md +7 -0
  94. package/docs/docs/cmd/spo/report/report-siteusagefilecounts.md +7 -0
  95. package/docs/docs/cmd/spo/report/report-siteusagepages.md +7 -0
  96. package/docs/docs/cmd/spo/report/report-siteusagesitecounts.md +7 -0
  97. package/docs/docs/cmd/spo/report/report-siteusagestorage.md +7 -0
  98. package/docs/docs/cmd/spo/roledefinition/roledefinition-get.md +20 -0
  99. package/docs/docs/cmd/spo/roledefinition/roledefinition-list.md +20 -0
  100. package/docs/docs/cmd/spo/serviceprincipal/serviceprincipal-grant-add.md +20 -0
  101. package/docs/docs/cmd/spo/serviceprincipal/serviceprincipal-grant-list.md +18 -0
  102. package/docs/docs/cmd/spo/serviceprincipal/serviceprincipal-permissionrequest-approve.md +20 -0
  103. package/docs/docs/cmd/spo/serviceprincipal/serviceprincipal-permissionrequest-list.md +17 -0
  104. package/docs/docs/cmd/spo/serviceprincipal/serviceprincipal-set.md +13 -0
  105. package/docs/docs/cmd/spo/site/site-recyclebinitem-move.md +43 -0
  106. package/docs/docs/cmd/spo/site/site-recyclebinitem-remove.md +45 -0
  107. package/package.json +1 -1
@@ -0,0 +1,119 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
12
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
13
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
14
+ return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
15
+ };
16
+ var _SpoSiteRecycleBinItemMoveCommand_instances, _SpoSiteRecycleBinItemMoveCommand_initTelemetry, _SpoSiteRecycleBinItemMoveCommand_initOptions, _SpoSiteRecycleBinItemMoveCommand_initOptionSets, _SpoSiteRecycleBinItemMoveCommand_initValidators;
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ const Cli_1 = require("../../../../cli/Cli");
19
+ const request_1 = require("../../../../request");
20
+ const validation_1 = require("../../../../utils/validation");
21
+ const SpoCommand_1 = require("../../../base/SpoCommand");
22
+ const commands_1 = require("../../commands");
23
+ class SpoSiteRecycleBinItemMoveCommand extends SpoCommand_1.default {
24
+ get name() {
25
+ return commands_1.default.SITE_RECYCLEBINITEM_MOVE;
26
+ }
27
+ get description() {
28
+ return 'Moves items from the first-stage recycle bin to the second-stage recycle bin';
29
+ }
30
+ constructor() {
31
+ super();
32
+ _SpoSiteRecycleBinItemMoveCommand_instances.add(this);
33
+ __classPrivateFieldGet(this, _SpoSiteRecycleBinItemMoveCommand_instances, "m", _SpoSiteRecycleBinItemMoveCommand_initTelemetry).call(this);
34
+ __classPrivateFieldGet(this, _SpoSiteRecycleBinItemMoveCommand_instances, "m", _SpoSiteRecycleBinItemMoveCommand_initOptions).call(this);
35
+ __classPrivateFieldGet(this, _SpoSiteRecycleBinItemMoveCommand_instances, "m", _SpoSiteRecycleBinItemMoveCommand_initOptionSets).call(this);
36
+ __classPrivateFieldGet(this, _SpoSiteRecycleBinItemMoveCommand_instances, "m", _SpoSiteRecycleBinItemMoveCommand_initValidators).call(this);
37
+ }
38
+ commandAction(logger, args) {
39
+ return __awaiter(this, void 0, void 0, function* () {
40
+ if (args.options.confirm) {
41
+ yield this.moveRecycleBinItem(args, logger);
42
+ }
43
+ else {
44
+ const result = yield Cli_1.Cli.prompt({
45
+ type: 'confirm',
46
+ name: 'continue',
47
+ default: false,
48
+ message: 'Are you sure you want to move these items to the second-stage recycle bin?'
49
+ });
50
+ if (result.continue) {
51
+ yield this.moveRecycleBinItem(args, logger);
52
+ }
53
+ }
54
+ });
55
+ }
56
+ moveRecycleBinItem(args, logger) {
57
+ return __awaiter(this, void 0, void 0, function* () {
58
+ try {
59
+ const requestOptions = {
60
+ url: `${args.options.siteUrl}/_api/web/recycleBin/MoveAllToSecondStage`,
61
+ headers: {
62
+ 'accept': 'application/json;odata=nometadata'
63
+ },
64
+ responseType: 'json'
65
+ };
66
+ if (args.options.ids !== undefined) {
67
+ const ids = args.options.ids.split(',');
68
+ if (this.verbose) {
69
+ logger.logToStderr(`Moving ${ids.length} items to the second-stage recycle bin.`);
70
+ }
71
+ requestOptions.data = {
72
+ ids: ids
73
+ };
74
+ }
75
+ else if (this.verbose) {
76
+ logger.logToStderr('Moving all items to the second-stage recycle bin.');
77
+ }
78
+ yield request_1.default.post(requestOptions);
79
+ }
80
+ catch (err) {
81
+ this.handleRejectedODataJsonPromise(err);
82
+ }
83
+ });
84
+ }
85
+ }
86
+ _SpoSiteRecycleBinItemMoveCommand_instances = new WeakSet(), _SpoSiteRecycleBinItemMoveCommand_initTelemetry = function _SpoSiteRecycleBinItemMoveCommand_initTelemetry() {
87
+ this.telemetry.push((args) => {
88
+ Object.assign(this.telemetryProperties, {
89
+ ids: typeof args.options.ids !== 'undefined',
90
+ all: !!args.options.all,
91
+ confirm: !!args.options.confirm
92
+ });
93
+ });
94
+ }, _SpoSiteRecycleBinItemMoveCommand_initOptions = function _SpoSiteRecycleBinItemMoveCommand_initOptions() {
95
+ this.options.unshift({
96
+ option: '-u, --siteUrl <siteUrl>'
97
+ }, {
98
+ option: '-i, --ids [ids]'
99
+ }, {
100
+ option: '--all'
101
+ }, {
102
+ option: '--confirm'
103
+ });
104
+ }, _SpoSiteRecycleBinItemMoveCommand_initOptionSets = function _SpoSiteRecycleBinItemMoveCommand_initOptionSets() {
105
+ this.optionSets.push({ options: ['ids', 'all'] });
106
+ }, _SpoSiteRecycleBinItemMoveCommand_initValidators = function _SpoSiteRecycleBinItemMoveCommand_initValidators() {
107
+ this.validators.push((args) => __awaiter(this, void 0, void 0, function* () {
108
+ const isValidSharePointUrl = validation_1.validation.isValidSharePointUrl(args.options.siteUrl);
109
+ if (isValidSharePointUrl !== true) {
110
+ return isValidSharePointUrl;
111
+ }
112
+ if (args.options.ids && !validation_1.validation.isValidGuidArray(args.options.ids.split(','))) {
113
+ return 'The option ids contains one or more invalid GUIDs';
114
+ }
115
+ return true;
116
+ }));
117
+ };
118
+ module.exports = new SpoSiteRecycleBinItemMoveCommand();
119
+ //# sourceMappingURL=site-recyclebinitem-move.js.map
@@ -0,0 +1,106 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
12
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
13
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
14
+ return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
15
+ };
16
+ var _SpoSiteRecycleBinItemRemoveCommand_instances, _SpoSiteRecycleBinItemRemoveCommand_initTelemetry, _SpoSiteRecycleBinItemRemoveCommand_initOptions, _SpoSiteRecycleBinItemRemoveCommand_initValidators;
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ const Cli_1 = require("../../../../cli/Cli");
19
+ const request_1 = require("../../../../request");
20
+ const validation_1 = require("../../../../utils/validation");
21
+ const SpoCommand_1 = require("../../../base/SpoCommand");
22
+ const commands_1 = require("../../commands");
23
+ class SpoSiteRecycleBinItemRemoveCommand extends SpoCommand_1.default {
24
+ get name() {
25
+ return commands_1.default.SITE_RECYCLEBINITEM_REMOVE;
26
+ }
27
+ get description() {
28
+ return 'Permanently deletes specific items from the site recycle bin';
29
+ }
30
+ constructor() {
31
+ super();
32
+ _SpoSiteRecycleBinItemRemoveCommand_instances.add(this);
33
+ __classPrivateFieldGet(this, _SpoSiteRecycleBinItemRemoveCommand_instances, "m", _SpoSiteRecycleBinItemRemoveCommand_initTelemetry).call(this);
34
+ __classPrivateFieldGet(this, _SpoSiteRecycleBinItemRemoveCommand_instances, "m", _SpoSiteRecycleBinItemRemoveCommand_initOptions).call(this);
35
+ __classPrivateFieldGet(this, _SpoSiteRecycleBinItemRemoveCommand_instances, "m", _SpoSiteRecycleBinItemRemoveCommand_initValidators).call(this);
36
+ }
37
+ commandAction(logger, args) {
38
+ return __awaiter(this, void 0, void 0, function* () {
39
+ if (args.options.confirm) {
40
+ yield this.removeRecycleBinItem(args, logger);
41
+ }
42
+ else {
43
+ const result = yield Cli_1.Cli.prompt({
44
+ type: 'confirm',
45
+ name: 'continue',
46
+ default: false,
47
+ message: `Are you sure you want to permanently delete ${args.options.ids.split(',').length} item(s) from the site recycle bin?`
48
+ });
49
+ if (result.continue) {
50
+ yield this.removeRecycleBinItem(args, logger);
51
+ }
52
+ }
53
+ });
54
+ }
55
+ removeRecycleBinItem(args, logger) {
56
+ return __awaiter(this, void 0, void 0, function* () {
57
+ if (this.verbose) {
58
+ logger.logToStderr(`Permanently deleting items from the site recycle bin at site ${args.options.siteUrl}...`);
59
+ }
60
+ try {
61
+ const requestOptions = {
62
+ url: `${args.options.siteUrl}/_api/site/RecycleBin/DeleteByIds`,
63
+ headers: {
64
+ accept: 'application/json;odata=nometadata'
65
+ },
66
+ responseType: 'json',
67
+ data: {
68
+ ids: args.options.ids.split(',')
69
+ }
70
+ };
71
+ yield request_1.default.post(requestOptions);
72
+ }
73
+ catch (err) {
74
+ this.handleRejectedODataJsonPromise(err);
75
+ }
76
+ });
77
+ }
78
+ }
79
+ _SpoSiteRecycleBinItemRemoveCommand_instances = new WeakSet(), _SpoSiteRecycleBinItemRemoveCommand_initTelemetry = function _SpoSiteRecycleBinItemRemoveCommand_initTelemetry() {
80
+ this.telemetry.push((args) => {
81
+ Object.assign(this.telemetryProperties, {
82
+ confirm: !!args.options.confirm
83
+ });
84
+ });
85
+ }, _SpoSiteRecycleBinItemRemoveCommand_initOptions = function _SpoSiteRecycleBinItemRemoveCommand_initOptions() {
86
+ this.options.unshift({
87
+ option: '-u, --siteUrl <siteUrl>'
88
+ }, {
89
+ option: '-i, --ids <ids>'
90
+ }, {
91
+ option: '--confirm'
92
+ });
93
+ }, _SpoSiteRecycleBinItemRemoveCommand_initValidators = function _SpoSiteRecycleBinItemRemoveCommand_initValidators() {
94
+ this.validators.push((args) => __awaiter(this, void 0, void 0, function* () {
95
+ const isValidSharePointUrl = validation_1.validation.isValidSharePointUrl(args.options.siteUrl);
96
+ if (isValidSharePointUrl !== true) {
97
+ return isValidSharePointUrl;
98
+ }
99
+ if (!validation_1.validation.isValidGuidArray(args.options.ids.split(','))) {
100
+ return 'The option ids contains one or more invalid GUIDs.';
101
+ }
102
+ return true;
103
+ }));
104
+ };
105
+ module.exports = new SpoSiteRecycleBinItemRemoveCommand();
106
+ //# sourceMappingURL=site-recyclebinitem-remove.js.map
@@ -249,6 +249,8 @@ exports.default = {
249
249
  SITE_INPLACERECORDSMANAGEMENT_SET: `${prefix} site inplacerecordsmanagement set`,
250
250
  SITE_RECYCLEBINITEM_CLEAR: `${prefix} site recyclebinitem clear`,
251
251
  SITE_RECYCLEBINITEM_LIST: `${prefix} site recyclebinitem list`,
252
+ SITE_RECYCLEBINITEM_MOVE: `${prefix} site recyclebinitem move`,
253
+ SITE_RECYCLEBINITEM_REMOVE: `${prefix} site recyclebinitem remove`,
252
254
  SITE_RECYCLEBINITEM_RESTORE: `${prefix} site recyclebinitem restore`,
253
255
  SITE_REMOVE: `${prefix} site remove`,
254
256
  SITE_RENAME: `${prefix} site rename`,
package/dist/utils/spo.js CHANGED
@@ -453,7 +453,7 @@ exports.spo = {
453
453
  * Retrieves the SiteId, VroomItemId and VroomDriveId from a specific file.
454
454
  * @param webUrl Web url
455
455
  * @param fileId GUID ID of the file
456
- * @param fileUrl Decoded URL of the file
456
+ * @param fileUrl Decoded site-relative or server-relative URL of the file
457
457
  */
458
458
  getVroomFileDetails(webUrl, fileId, fileUrl) {
459
459
  return __awaiter(this, void 0, void 0, function* () {
@@ -50,3 +50,9 @@ m365 cli consent --service yammer
50
50
  ```csv
51
51
  To consent permissions for executing yammer commands, navigate in your web browser to https://login.microsoftonline.com/common/oauth2/v2.0/authorize?client_id=31359c7f-bd7e-475c-86db-fdb8c937548e&response_type=code&scope=https%3A%2F%2Fapi.yammer.com%2Fuser_impersonation
52
52
  ```
53
+
54
+ === "Markdown"
55
+
56
+ ```md
57
+ To consent permissions for executing yammer commands, navigate in your web browser to https://login.microsoftonline.com/common/oauth2/v2.0/authorize?client_id=31359c7f-bd7e-475c-86db-fdb8c937548e&response_type=code&scope=https%3A%2F%2Fapi.yammer.com%2Fuser_impersonation
58
+ ```
@@ -73,3 +73,20 @@ m365 cli doctor
73
73
  os,cliVersion,nodeVersion,cliAadAppId,cliAadAppTenant,authMode,cliEnvironment,cliConfig,roles,scopes
74
74
  "{""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""]"
75
75
  ```
76
+
77
+ === "Markdown"
78
+
79
+ ```md
80
+ # cli doctor
81
+
82
+ Date: 2022-09-05
83
+
84
+ Property | Value
85
+ ---------|-------
86
+ cliVersion | 6.1.0
87
+ nodeVersion | v16.13.0
88
+ cliAadAppId | 31359c7f-bd7e-475c-86db-fdb8c937548e
89
+ cliAadAppTenant | common
90
+ authMode | DeviceCode
91
+ cliEnvironment |
92
+ ```
@@ -52,3 +52,9 @@ m365 cli issue --type command
52
52
  ```csv
53
53
  https://aka.ms/cli-m365/new-command
54
54
  ```
55
+
56
+ === "Markdown"
57
+
58
+ ```md
59
+ https://aka.ms/cli-m365/new-command
60
+ ```
@@ -40,6 +40,12 @@ m365 cli reconsent
40
40
  To re-consent the PnP Microsoft 365 Management Shell Azure AD application navigate in your web browser to https://login.microsoftonline.com/common/oauth2/authorize?client_id=31359c7f-bd7e-475c-86db-fdb8c937548e&response_type=code&prompt=admin_consent
41
41
  ```
42
42
 
43
+ === "Markdown"
44
+
45
+ ```md
46
+ To re-consent the PnP Microsoft 365 Management Shell Azure AD application navigate in your web browser to https://login.microsoftonline.com/common/oauth2/authorize?client_id=31359c7f-bd7e-475c-86db-fdb8c937548e&response_type=code&prompt=admin_consent
47
+ ```
48
+
43
49
  ## More information
44
50
 
45
51
  - Re-consent the PnP Microsoft 365 Management Shell Azure AD application: [https://pnp.github.io/cli-microsoft365/user-guide/connecting-office-365/#re-consent-the-pnp-office-365-management-shell-azure-ad-application](https://pnp.github.io/cli-microsoft365/user-guide/connecting-office-365/#re-consent-the-pnp-office-365-management-shell-azure-ad-application)
@@ -40,6 +40,12 @@ m365 cli completion sh setup
40
40
  Command completion successfully registered. Restart your shell to load the completion
41
41
  ```
42
42
 
43
+ === "Markdown"
44
+
45
+ ```md
46
+ Command completion successfully registered. Restart your shell to load the completion
47
+ ```
48
+
43
49
  ## More information
44
50
 
45
51
  - Command completion: [https://pnp.github.io/cli-microsoft365/user-guide/completion/](https://pnp.github.io/cli-microsoft365/user-guide/completion/)
@@ -51,6 +51,12 @@ When retrieving the `output` key, responses will look like this:
51
51
  json
52
52
  ```
53
53
 
54
+ === "Markdown"
55
+
56
+ ```md
57
+ json
58
+ ```
59
+
54
60
  ## More information
55
61
 
56
62
  - [Configuring the CLI for Microsoft 365](../../../user-guide/configuring-cli.md)
@@ -46,7 +46,7 @@ m365 login [options]
46
46
 
47
47
  Using the `login` command you can log in to Microsoft 365.
48
48
 
49
- By default, the `login` command uses device code OAuth flow to log in to Microsoft 365. Alternatively, you can authenticate using a user name and password or certificate, which are convenient for CI/CD scenarios, but which come with their own [limitations](../user-guide/connecting-office-365.md).
49
+ By default, the `login` command uses device code OAuth flow to log in to Microsoft 365. Alternatively, you can authenticate using a user name and password or certificate, which are convenient for CI/CD scenarios, but which come with their own [limitations](../user-guide/connecting-microsoft-365.md).
50
50
 
51
51
  When logging in to Microsoft 365 using the user name and password, next to the access and refresh token, the CLI for Microsoft 365 will store the user credentials so that it can automatically re-authenticate if necessary. Similarly to the tokens, the credentials are removed by re-authenticating using the device code or by calling the [logout](logout.md) command.
52
52
 
@@ -69,3 +69,20 @@ m365 search externalconnection get --name "Test"
69
69
  id,name,description,state,configuration
70
70
  CLITest,CLI-Test,CLI Test,draft,"{""authorizedApps"":[""31359c7f-bd7e-475c-86db-fdb8c937548e""],""authorizedAppIds"":[""31359c7f-bd7e-475c-86db-fdb8c937548e""]}"
71
71
  ```
72
+
73
+ === "Markdown"
74
+
75
+ ```md
76
+ # search externalconnection get --id "CLITest"
77
+
78
+ Date: 2022-11-05
79
+
80
+ ## CLI-Test (CLITest)
81
+
82
+ Property | Value
83
+ ---------|-------
84
+ id | CLITest
85
+ name | CLI-Test
86
+ description | CLI Test
87
+ state | draft
88
+ ```
@@ -57,3 +57,20 @@ m365 search externalconnection list
57
57
  id,name,state
58
58
  CLITest,CLI-Test,draft
59
59
  ```
60
+
61
+ === "Markdown"
62
+
63
+ ```md
64
+ # search externalconnection list
65
+
66
+ Date: 2022-09-05
67
+
68
+ ## CLI-Test (CLITest)
69
+
70
+ Property | Value
71
+ ---------|-------
72
+ id | CLITest
73
+ name | CLI-Test
74
+ description | CLI Test
75
+ state | draft
76
+ ```
@@ -14,7 +14,7 @@ m365 spo file add [options]
14
14
  : The URL of the site where the file should be uploaded to
15
15
 
16
16
  `-f, --folder <folder>`
17
- : Site-relative or server-relative URL to the folder where the file should be uploaded
17
+ : The server- or site-relative URL to the folder where the file should be uploaded
18
18
 
19
19
  `-p, --path <path>`
20
20
  : Local path to the file to upload
@@ -14,7 +14,7 @@ m365 spo file checkin [options]
14
14
  : The URL of the site where the file is located
15
15
 
16
16
  `-f, --url [url]`
17
- : The server-relative URL of the file to retrieve. Specify either `url` or `id` but not both
17
+ : The server- or site-relative URL of the file to retrieve. Specify either `url` or `id` but not both
18
18
 
19
19
  `-i, --id [id]`
20
20
  : The UniqueId (GUID) of the file to retrieve. Specify either `url` or `id` but not both
@@ -14,7 +14,7 @@ m365 spo file checkout [options]
14
14
  : The URL of the site where the file is located
15
15
 
16
16
  `-f, --url [url]`
17
- : The server-relative URL of the file to retrieve. Specify either `url` or `id` but not both
17
+ : The server- or site-relative URL of the file to retrieve. Specify either `url` or `id` but not both
18
18
 
19
19
  `-i, --id [id]`
20
20
  : The UniqueId (GUID) of the file to retrieve. Specify either `url` or `id` but not both
@@ -14,7 +14,7 @@ m365 spo file copy [options]
14
14
  : The URL of the site where the file is located.
15
15
 
16
16
  `-s, --sourceUrl <sourceUrl>`
17
- : Server-relative or absolute URL of the file.
17
+ : Site-relative, server-relative or absolute URL of the file.
18
18
 
19
19
  `-t, --targetUrl <targetUrl>`
20
20
  : Server-relative or absolute URL of the location.
@@ -14,7 +14,7 @@ m365 spo file get [options]
14
14
  : The URL of the site where the file is located
15
15
 
16
16
  `-u, --url [url]`
17
- : The server-relative URL of the file to retrieve. Specify either `url` or `id` but not both
17
+ : The server- or site-relative URL of the file to retrieve. Specify either `url` or `id` but not both
18
18
 
19
19
  `-i, --id [id]`
20
20
  : The UniqueId (GUID) of the file to retrieve. Specify either `url` or `id` but not both
@@ -14,7 +14,7 @@ m365 spo file move [options]
14
14
  : The URL of the site where the file is located
15
15
 
16
16
  `-s, --sourceUrl <sourceUrl>`
17
- : Site-relative URL of the file to move
17
+ : The server- or site-relative URL of the file to move
18
18
 
19
19
  `-t, --targetUrl <targetUrl>`
20
20
  : Server-relative URL where to move the file
@@ -36,7 +36,7 @@ When you move a file using the `spo file move` command, all of the versions are
36
36
  Move file to a document library in another site collection
37
37
 
38
38
  ```sh
39
- m365 spo file move --webUrl https://contoso.sharepoint.com/sites/test1 --sourceUrl /Shared%20Documents/sp1.pdf --targetUrl /sites/test2/Shared%20Documents/
39
+ m365 spo file move --webUrl https://contoso.sharepoint.com/sites/test1 --sourceUrl /sites/test1/Shared%20Documents/sp1.pdf --targetUrl /sites/test2/Shared%20Documents/
40
40
  ```
41
41
 
42
42
  Move file to a document library in the same site collection
@@ -54,7 +54,7 @@ m365 spo file move --webUrl https://contoso.sharepoint.com/sites/test1 --sourceU
54
54
  Move file to a document library in another site collection. Allow for schema mismatch
55
55
 
56
56
  ```sh
57
- m365 spo file move --webUrl https://contoso.sharepoint.com/sites/test1 --sourceUrl /Shared%20Documents/sp1.pdf --targetUrl /sites/test2/Shared%20Documents/ --allowSchemaMismatch
57
+ m365 spo file move --webUrl https://contoso.sharepoint.com/sites/test1 --sourceUrl /sites/test1/Shared%20Documents/sp1.pdf --targetUrl /sites/test2/Shared%20Documents/ --allowSchemaMismatch
58
58
  ```
59
59
 
60
60
 
@@ -14,7 +14,7 @@ m365 spo file rename [options]
14
14
  : The URL of the site where the file is located
15
15
 
16
16
  `-s, --sourceUrl <sourceUrl>`
17
- : Site-relative URL of the file to rename
17
+ : The server- or site-relative URL of the file to rename
18
18
 
19
19
  `-t, --targetFileName <targetFileName>`
20
20
  : New file name of the file
@@ -11,10 +11,10 @@ m365 spo file retentionlabel ensure [options]
11
11
  ## Options
12
12
 
13
13
  `-u, --webUrl <webUrl>`
14
- : URL of the site where the retentionlabel from a file to apply is located
14
+ : URL of the site where the retention label from a file to apply is located
15
15
 
16
16
  `--fileUrl [fileUrl]`
17
- : The site- or server relative URL of the file that should be labelled. Specify either `fileUrl` or `fileId` but not both.
17
+ : The site- or server-relative URL of the file that should be labelled. Specify either `fileUrl` or `fileId` but not both.
18
18
 
19
19
  `i, --fileId [fileId]`
20
20
  : The UniqueId (GUID) of the file that should be labelled. Specify either `fileUrl` or `fileId` but not both.
@@ -29,7 +29,7 @@ m365 spo file retentionlabel ensure [options]
29
29
 
30
30
  ## Remarks
31
31
 
32
- You can also use [spo listitem retentionlabel remove](./../../../cmd/spo//listitem/listitem-retentionlabel-remove.md) for removing the retentionlabel from a listitem.
32
+ You can also use [spo listitem retentionlabel remove](./../../../cmd/spo//listitem/listitem-retentionlabel-remove.md) for removing the retention label from a listitem.
33
33
 
34
34
  The `--assetId` option has to do with event-based retention. Event-based retention is about starting a retention period when a specific event occurs, instead of the moment a document was labeled or created.
35
35
 
@@ -11,10 +11,10 @@ m365 spo file retentionlabel remove [options]
11
11
  ## Options
12
12
 
13
13
  `-u, --webUrl <webUrl>`
14
- : URL of the site where the retentionlabel from a file to remove is located
14
+ : URL of the site where the retention label from a file to remove is located
15
15
 
16
16
  `--fileUrl [fileUrl]`
17
- : The site- or server relative URL of the file of which the label should be removed. Specify either `fileUrl` or `fileId` but not both.
17
+ : The server- or site-relative URL of the file of which the label should be removed. Specify either `fileUrl` or `fileId` but not both.
18
18
 
19
19
  `-i, --fileId [fileId]`
20
20
  : The UniqueId (GUID) of the file of which the label should be removed. Specify either `fileUrl` or `fileId` but not both.
@@ -14,7 +14,7 @@ m365 spo file roleassignment add [options]
14
14
  : URL of the site where the file is located.
15
15
 
16
16
  `--fileUrl [fileUrl]`
17
- : The server-relative URL of the file to retrieve. Specify either `fileUrl` or `fileId` but not both.
17
+ : The server- or site-relative URL of the file to retrieve. Specify either `fileUrl` or `fileId` but not both.
18
18
 
19
19
  `i, --fileId [fileId]`
20
20
  : The UniqueId (GUID) of the file to retrieve. Specify either `fileUrl` or `fileId` but not both.
@@ -14,7 +14,7 @@ m365 spo file roleassignment remove [options]
14
14
  : URL of the site where the file is located.
15
15
 
16
16
  `--fileUrl [fileUrl]`
17
- : The server-relative URL of the file. Specify either `fileUrl` or `fileId` but not both.
17
+ : The server- or site-relative URL of the file. Specify either `fileUrl` or `fileId` but not both.
18
18
 
19
19
  `-i, --fileId [fileId]`
20
20
  : The UniqueId (GUID) of the file. Specify either `fileUrl` or `fileId` but not both.
@@ -14,7 +14,7 @@ m365 spo file roleinheritance break [options]
14
14
  : URL of the site where the file is located
15
15
 
16
16
  `--fileUrl [fileUrl]`
17
- : The server-relative URL of the file. Specify either `fileUrl` or `fileId` but not both
17
+ : The server- or site-relative URL of the file. Specify either `fileUrl` or `fileId` but not both
18
18
 
19
19
  `i, --fileId [fileId]`
20
20
  : The UniqueId (GUID) of the file. Specify either `fileUrl` or `fileId` but not both
@@ -14,7 +14,7 @@ m365 spo file roleinheritance reset [options]
14
14
  : URL of the site where the file is located
15
15
 
16
16
  `--fileUrl [fileUrl]`
17
- : The server-relative URL of the file to retrieve. Specify either `fileUrl` or `fileId` but not both
17
+ : The server- or site-relative URL of the file to retrieve. Specify either `fileUrl` or `fileId` but not both
18
18
 
19
19
  `i, --fileId [fileId]`
20
20
  : The UniqueId (GUID) of the file to retrieve. Specify either `fileUrl` or `fileId` but not both
@@ -14,7 +14,7 @@ m365 spo file sharinginfo get [options]
14
14
  : The URL of the site where the file is located
15
15
 
16
16
  `-f, --fileUrl [fileUrl]`
17
- : The server-relative URL of the file for which to build the report. Specify either `fileUrl` or `fileId` but not both
17
+ : The server- or site-relative URL of the file for which to build the report. Specify either `fileUrl` or `fileId` but not both
18
18
 
19
19
  `-i, --fileId [fileId]`
20
20
  : The UniqueId (GUID) of the file for which to build the report. Specify either `fileUrl` or `fileId` but not both
@@ -14,7 +14,7 @@ m365 spo file sharinglink add [options]
14
14
  : The URL of the site where the file is located.
15
15
 
16
16
  `--fileUrl [fileUrl]`
17
- : The server-relative (decoded) URL of the file. Specify either `fileUrl` or `fileId` but not both.
17
+ : The server- or site-relative (decoded) URL of the file. Specify either `fileUrl` or `fileId` but not both.
18
18
 
19
19
  `--fileId [fileId]`
20
20
  : The UniqueId (GUID) of the file. Specify either `fileUrl` or `fileId` but not both.
@@ -14,7 +14,7 @@ m365 spo file sharinglink clear [options]
14
14
  : The URL of the site where the file is located.
15
15
 
16
16
  `--fileUrl [fileUrl]`
17
- : The server-relative (decoded) URL of the file. Specify either `fileUrl` or `fileId` but not both.
17
+ : The server- or site-relative (decoded) URL of the file. Specify either `fileUrl` or `fileId` but not both.
18
18
 
19
19
  `--fileId [fileId]`
20
20
  : The UniqueId (GUID) of the file. Specify either `fileUrl` or `fileId` but not both.
@@ -14,7 +14,7 @@ m365 spo file sharinglink get [options]
14
14
  : The URL of the site where the file is located.
15
15
 
16
16
  `--fileUrl [fileUrl]`
17
- : The server-relative (decoded) URL of the file. Specify either `fileUrl` or `fileId` but not both.
17
+ : The server- or site-relative (decoded) URL of the file. Specify either `fileUrl` or `fileId` but not both.
18
18
 
19
19
  `--fileId [fileId]`
20
20
  : The UniqueId (GUID) of the file. Specify either `fileUrl` or `fileId` but not both.
@@ -14,7 +14,7 @@ m365 spo file sharinglink list [options]
14
14
  : The URL of the site where the file is located.
15
15
 
16
16
  `--fileUrl [fileUrl]`
17
- : The server-relative (decoded) URL of the file. Specify either `fileUrl` or `fileId` but not both.
17
+ : The server- or site-relative (decoded) URL of the file. Specify either `fileUrl` or `fileId` but not both.
18
18
 
19
19
  `--fileId [fileId]`
20
20
  : The UniqueId (GUID) of the file. Specify either `fileUrl` or `fileId` but not both.
@@ -14,7 +14,7 @@ m365 spo file sharinglink remove [options]
14
14
  : The URL of the site where the file is located.
15
15
 
16
16
  `--fileUrl [fileUrl]`
17
- : The server-relative (decoded) URL of the file. Specify either `fileUrl` or `fileId` but not both.
17
+ : The server- or site-relative (decoded) URL of the file. Specify either `fileUrl` or `fileId` but not both.
18
18
 
19
19
  `--fileId [fileId]`
20
20
  : The UniqueId (GUID) of the file. Specify either `fileUrl` or `fileId` but not both.
@@ -14,7 +14,7 @@ m365 spo file sharinglink set [options]
14
14
  : The URL of the site where the file is located.
15
15
 
16
16
  `--fileUrl [fileUrl]`
17
- : The server-relative (decoded) URL of the file. Specify either `fileUrl` or `fileId` but not both.
17
+ : The server- or site-relative (decoded) URL of the file. Specify either `fileUrl` or `fileId` but not both.
18
18
 
19
19
  `--fileId [fileId]`
20
20
  : The UniqueId (GUID) of the file. Specify either `fileUrl` or `fileId` but not both.
@@ -14,10 +14,10 @@ m365 spo file version clear [options]
14
14
  : The URL of the site where the file is located
15
15
 
16
16
  `-u, --fileUrl [fileUrl]`
17
- : The server-relative URL of the file to retrieve. Specify either `fileUrl` or `fileId` but not both
17
+ : The server- or site-relative URL of the file. Specify either `fileUrl` or `fileId` but not both
18
18
 
19
19
  `-i, --fileId [fileId]`
20
- : The UniqueId (GUID) of the file to retrieve. Specify either `fileUrl` or `fileId` but not both
20
+ : The UniqueId (GUID) of the file. Specify either `fileUrl` or `fileId` but not both
21
21
 
22
22
  `--confirm [confirm]`
23
23
  : Don't prompt for confirmation.