@pnp/cli-microsoft365 5.7.0-beta.d90ad27 → 5.8.0-beta.421ec27

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 (147) hide show
  1. package/dist/cli/Cli.js +1 -1
  2. package/dist/m365/aad/commands/app/app-get.js +4 -11
  3. package/dist/m365/aad/commands/app/app-remove.js +4 -11
  4. package/dist/m365/aad/commands/app/app-role-add.js +5 -10
  5. package/dist/m365/aad/commands/app/app-role-list.js +4 -24
  6. package/dist/m365/aad/commands/app/app-role-remove.js +4 -22
  7. package/dist/m365/aad/commands/app/app-set.js +4 -11
  8. package/dist/m365/aad/commands/approleassignment/approleassignment-add.js +4 -8
  9. package/dist/m365/aad/commands/approleassignment/approleassignment-list.js +4 -11
  10. package/dist/m365/aad/commands/approleassignment/approleassignment-remove.js +4 -8
  11. package/dist/m365/aad/commands/groupsettingtemplate/groupsettingtemplate-get.js +4 -7
  12. package/dist/m365/aad/commands/o365group/o365group-conversation-post-list.js +4 -8
  13. package/dist/m365/aad/commands/o365group/o365group-teamify.js +4 -7
  14. package/dist/m365/aad/commands/o365group/o365group-user-add.js +4 -7
  15. package/dist/m365/aad/commands/o365group/o365group-user-remove.js +4 -7
  16. package/dist/m365/aad/commands/o365group/o365group-user-set.js +4 -7
  17. package/dist/m365/aad/commands/sp/sp-add.js +4 -8
  18. package/dist/m365/aad/commands/sp/sp-get.js +4 -8
  19. package/dist/m365/aad/commands/user/user-get.js +4 -9
  20. package/dist/m365/aad/commands/user/user-list.js +13 -2
  21. package/dist/m365/aad/commands/user/user-set.js +4 -7
  22. package/dist/m365/booking/commands/business/business-get.js +86 -0
  23. package/dist/m365/booking/commands/business/business-list.js +30 -0
  24. package/dist/m365/booking/commands.js +8 -0
  25. package/dist/m365/commands/commands.js +1 -0
  26. package/dist/m365/commands/request.js +153 -0
  27. package/dist/m365/onenote/commands/notebook/notebook-list.js +139 -0
  28. package/dist/m365/onenote/commands.js +7 -0
  29. package/dist/m365/outlook/commands/message/message-list.js +4 -23
  30. package/dist/m365/outlook/commands/message/message-move.js +4 -31
  31. package/dist/m365/pa/commands/app/app-get.js +4 -7
  32. package/dist/m365/planner/commands/bucket/bucket-add.js +4 -7
  33. package/dist/m365/planner/commands/bucket/bucket-list.js +4 -7
  34. package/dist/m365/planner/commands/plan/plan-add.js +4 -7
  35. package/dist/m365/planner/commands/plan/plan-list.js +4 -7
  36. package/dist/m365/planner/commands/task/task-add.js +4 -13
  37. package/dist/m365/planner/commands/task/task-get.js +7 -0
  38. package/dist/m365/pp/commands/managementapp/managementapp-add.js +4 -11
  39. package/dist/m365/search/commands/externalconnection/externalconnection-remove.js +101 -0
  40. package/dist/m365/search/commands.js +2 -1
  41. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN010008_YORC_nodeVersion.js +47 -0
  42. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN021003_PKG_engines_node.js +48 -0
  43. package/dist/m365/spfx/commands/project/project-upgrade/upgrade-1.16.0-beta.1.js +61 -0
  44. package/dist/m365/spfx/commands/project/project-upgrade.js +16 -13
  45. package/dist/m365/spo/commands/app/app-deploy.js +4 -7
  46. package/dist/m365/spo/commands/app/app-get.js +4 -7
  47. package/dist/m365/spo/commands/contenttype/contenttype-get.js +4 -7
  48. package/dist/m365/spo/commands/contenttype/contenttype-remove.js +5 -14
  49. package/dist/m365/spo/commands/file/file-checkin.js +4 -7
  50. package/dist/m365/spo/commands/file/file-checkout.js +4 -7
  51. package/dist/m365/spo/commands/file/file-get.js +4 -7
  52. package/dist/m365/spo/commands/file/file-remove.js +4 -7
  53. package/dist/m365/spo/commands/file/file-sharinginfo-get.js +4 -7
  54. package/dist/m365/spo/commands/group/group-remove.js +4 -7
  55. package/dist/m365/spo/commands/group/group-user-add.js +4 -13
  56. package/dist/m365/spo/commands/group/group-user-list.js +4 -7
  57. package/dist/m365/spo/commands/group/group-user-remove.js +4 -7
  58. package/dist/m365/spo/commands/hubsite/hubsite-unregister.js +1 -1
  59. package/dist/m365/spo/commands/list/list-contenttype-add.js +4 -7
  60. package/dist/m365/spo/commands/list/list-contenttype-default-set.js +4 -7
  61. package/dist/m365/spo/commands/list/list-contenttype-list.js +4 -7
  62. package/dist/m365/spo/commands/list/list-contenttype-remove.js +4 -7
  63. package/dist/m365/spo/commands/list/list-get.js +4 -7
  64. package/dist/m365/spo/commands/list/list-label-get.js +4 -7
  65. package/dist/m365/spo/commands/list/list-label-set.js +4 -4
  66. package/dist/m365/spo/commands/list/list-remove.js +4 -7
  67. package/dist/m365/spo/commands/list/list-roleassignment-add.js +9 -0
  68. package/dist/m365/spo/commands/list/list-roleassignment-remove.js +57 -28
  69. package/dist/m365/spo/commands/list/list-sitescript-get.js +4 -7
  70. package/dist/m365/spo/commands/list/list-view-field-add.js +4 -19
  71. package/dist/m365/spo/commands/list/list-view-field-remove.js +4 -19
  72. package/dist/m365/spo/commands/list/list-view-field-set.js +4 -19
  73. package/dist/m365/spo/commands/list/list-view-get.js +4 -10
  74. package/dist/m365/spo/commands/list/list-view-list.js +4 -7
  75. package/dist/m365/spo/commands/list/list-view-remove.js +4 -13
  76. package/dist/m365/spo/commands/list/list-view-set.js +4 -13
  77. package/dist/m365/spo/commands/list/list-webhook-add.js +4 -7
  78. package/dist/m365/spo/commands/list/list-webhook-get.js +4 -7
  79. package/dist/m365/spo/commands/list/list-webhook-remove.js +4 -7
  80. package/dist/m365/spo/commands/list/list-webhook-set.js +4 -7
  81. package/dist/m365/spo/commands/listitem/listitem-add.js +4 -7
  82. package/dist/m365/spo/commands/listitem/listitem-attachment-list.js +4 -7
  83. package/dist/m365/spo/commands/listitem/listitem-get.js +4 -7
  84. package/dist/m365/spo/commands/listitem/listitem-isrecord.js +4 -7
  85. package/dist/m365/spo/commands/listitem/listitem-record-declare.js +4 -7
  86. package/dist/m365/spo/commands/listitem/listitem-record-undeclare.js +4 -7
  87. package/dist/m365/spo/commands/listitem/listitem-remove.js +4 -7
  88. package/dist/m365/spo/commands/listitem/listitem-roleassignment-remove.js +206 -0
  89. package/dist/m365/spo/commands/listitem/listitem-set.js +4 -7
  90. package/dist/m365/spo/commands/site/site-apppermission-add.js +4 -4
  91. package/dist/m365/spo/commands/site/site-apppermission-remove.js +4 -9
  92. package/dist/m365/spo/commands/site/site-apppermission-set.js +4 -4
  93. package/dist/m365/spo/commands/term/term-add.js +4 -7
  94. package/dist/m365/spo/commands/term/term-get.js +4 -7
  95. package/dist/m365/spo/commands/term/term-group-get.js +4 -7
  96. package/dist/m365/spo/commands/term/term-list.js +4 -13
  97. package/dist/m365/spo/commands/term/term-set-add.js +4 -7
  98. package/dist/m365/spo/commands/term/term-set-get.js +4 -13
  99. package/dist/m365/spo/commands/term/term-set-list.js +4 -7
  100. package/dist/m365/spo/commands/user/user-get.js +4 -9
  101. package/dist/m365/spo/commands/user/user-remove.js +4 -7
  102. package/dist/m365/spo/commands/web/web-roleassignment-add.js +187 -0
  103. package/dist/m365/spo/commands/web/web-roleassignment-remove.js +170 -0
  104. package/dist/m365/spo/commands.js +3 -0
  105. package/dist/m365/teams/commands/app/app-install.js +4 -11
  106. package/dist/m365/teams/commands/app/app-update.js +4 -7
  107. package/dist/m365/teams/commands/channel/channel-add.js +4 -7
  108. package/dist/m365/teams/commands/channel/channel-get.js +4 -22
  109. package/dist/m365/teams/commands/channel/channel-list.js +4 -7
  110. package/dist/m365/teams/commands/channel/channel-member-list.js +4 -13
  111. package/dist/m365/teams/commands/channel/channel-member-set.js +4 -21
  112. package/dist/m365/teams/commands/channel/channel-remove.js +4 -7
  113. package/dist/m365/teams/commands/chat/chat-get.js +4 -17
  114. package/dist/m365/teams/commands/chat/chat-message-send.js +4 -17
  115. package/dist/m365/teams/commands/tab/tab-get.js +4 -19
  116. package/dist/m365/teams/commands/team/team-get.js +4 -7
  117. package/dist/m365/teams/commands/user/user-app-list.js +4 -7
  118. package/dist/m365/todo/commands/list/list-remove.js +4 -21
  119. package/dist/m365/todo/commands/list/list-set.js +4 -21
  120. package/dist/m365/todo/commands/task/task-add.js +4 -21
  121. package/dist/m365/todo/commands/task/task-list.js +4 -21
  122. package/dist/m365/todo/commands/task/task-remove.js +4 -21
  123. package/dist/m365/todo/commands/task/task-set.js +4 -7
  124. package/dist/request.js +6 -2
  125. package/docs/docs/cmd/aad/app/app-add.md +1 -1
  126. package/docs/docs/cmd/aad/app/app-set.md +1 -1
  127. package/docs/docs/cmd/adaptivecard/adaptivecard-send.md +0 -20
  128. package/docs/docs/cmd/booking/business/business-get.md +33 -0
  129. package/docs/docs/cmd/booking/business/business-list.md +21 -0
  130. package/docs/docs/cmd/cli/completion/completion-clink-update.md +1 -1
  131. package/docs/docs/cmd/cli/completion/completion-pwsh-setup.md +1 -1
  132. package/docs/docs/cmd/cli/completion/completion-pwsh-update.md +1 -1
  133. package/docs/docs/cmd/cli/completion/completion-sh-setup.md +1 -1
  134. package/docs/docs/cmd/cli/completion/completion-sh-update.md +1 -1
  135. package/docs/docs/cmd/onenote/notebook/notebook-list.md +70 -0
  136. package/docs/docs/cmd/request.md +76 -0
  137. package/docs/docs/cmd/search/externalconnection/externalconnection-remove.md +40 -0
  138. package/docs/docs/cmd/spfx/project/project-upgrade.md +1 -1
  139. package/docs/docs/cmd/spo/hubsite/hubsite-unregister.md +2 -2
  140. package/docs/docs/cmd/spo/list/list-roleassignment-remove.md +3 -0
  141. package/docs/docs/cmd/spo/listitem/listitem-roleassignment-remove.md +67 -0
  142. package/docs/docs/cmd/spo/listitem/listitem-roleinheritance-break.md +6 -6
  143. package/docs/docs/cmd/spo/web/web-roleassignment-add.md +57 -0
  144. package/docs/docs/cmd/spo/web/web-roleassignment-remove.md +54 -0
  145. package/npm-shrinkwrap.json +202 -163
  146. package/package.json +10 -10
  147. package/scripts/Register-CLIM365Completion.ps1 +1 -1
@@ -1,19 +1,10 @@
1
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
2
  var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
12
3
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
13
4
  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
5
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
15
6
  };
16
- var _TodoListRemoveCommand_instances, _TodoListRemoveCommand_initTelemetry, _TodoListRemoveCommand_initOptions, _TodoListRemoveCommand_initValidators;
7
+ var _TodoListRemoveCommand_instances, _TodoListRemoveCommand_initTelemetry, _TodoListRemoveCommand_initOptions, _TodoListRemoveCommand_initOptionSets;
17
8
  Object.defineProperty(exports, "__esModule", { value: true });
18
9
  const cli_1 = require("../../../../cli");
19
10
  const request_1 = require("../../../../request");
@@ -25,7 +16,7 @@ class TodoListRemoveCommand extends GraphCommand_1.default {
25
16
  _TodoListRemoveCommand_instances.add(this);
26
17
  __classPrivateFieldGet(this, _TodoListRemoveCommand_instances, "m", _TodoListRemoveCommand_initTelemetry).call(this);
27
18
  __classPrivateFieldGet(this, _TodoListRemoveCommand_instances, "m", _TodoListRemoveCommand_initOptions).call(this);
28
- __classPrivateFieldGet(this, _TodoListRemoveCommand_instances, "m", _TodoListRemoveCommand_initValidators).call(this);
19
+ __classPrivateFieldGet(this, _TodoListRemoveCommand_instances, "m", _TodoListRemoveCommand_initOptionSets).call(this);
29
20
  }
30
21
  get name() {
31
22
  return commands_1.default.LIST_REMOVE;
@@ -103,16 +94,8 @@ _TodoListRemoveCommand_instances = new WeakSet(), _TodoListRemoveCommand_initTel
103
94
  }, {
104
95
  option: '--confirm'
105
96
  });
106
- }, _TodoListRemoveCommand_initValidators = function _TodoListRemoveCommand_initValidators() {
107
- this.validators.push((args) => __awaiter(this, void 0, void 0, function* () {
108
- if (!args.options.name && !args.options.id) {
109
- return 'Specify name or id of the list to remove';
110
- }
111
- if (args.options.name && args.options.id) {
112
- return 'Specify either the name or the id of the list to remove but not both';
113
- }
114
- return true;
115
- }));
97
+ }, _TodoListRemoveCommand_initOptionSets = function _TodoListRemoveCommand_initOptionSets() {
98
+ this.optionSets.push(['name', 'id']);
116
99
  };
117
100
  module.exports = new TodoListRemoveCommand();
118
101
  //# sourceMappingURL=list-remove.js.map
@@ -1,19 +1,10 @@
1
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
2
  var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
12
3
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
13
4
  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
5
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
15
6
  };
16
- var _TodoListSetCommand_instances, _TodoListSetCommand_initTelemetry, _TodoListSetCommand_initOptions, _TodoListSetCommand_initValidators;
7
+ var _TodoListSetCommand_instances, _TodoListSetCommand_initTelemetry, _TodoListSetCommand_initOptions, _TodoListSetCommand_initOptionSets;
17
8
  Object.defineProperty(exports, "__esModule", { value: true });
18
9
  const request_1 = require("../../../../request");
19
10
  const GraphCommand_1 = require("../../../base/GraphCommand");
@@ -24,7 +15,7 @@ class TodoListSetCommand extends GraphCommand_1.default {
24
15
  _TodoListSetCommand_instances.add(this);
25
16
  __classPrivateFieldGet(this, _TodoListSetCommand_instances, "m", _TodoListSetCommand_initTelemetry).call(this);
26
17
  __classPrivateFieldGet(this, _TodoListSetCommand_instances, "m", _TodoListSetCommand_initOptions).call(this);
27
- __classPrivateFieldGet(this, _TodoListSetCommand_instances, "m", _TodoListSetCommand_initValidators).call(this);
18
+ __classPrivateFieldGet(this, _TodoListSetCommand_instances, "m", _TodoListSetCommand_initOptionSets).call(this);
28
19
  }
29
20
  get name() {
30
21
  return commands_1.default.LIST_SET;
@@ -88,16 +79,8 @@ _TodoListSetCommand_instances = new WeakSet(), _TodoListSetCommand_initTelemetry
88
79
  }, {
89
80
  option: '--newName <newName>'
90
81
  });
91
- }, _TodoListSetCommand_initValidators = function _TodoListSetCommand_initValidators() {
92
- this.validators.push((args) => __awaiter(this, void 0, void 0, function* () {
93
- if (!args.options.name && !args.options.id) {
94
- return 'Specify name or id of the list to update';
95
- }
96
- if (args.options.name && args.options.id) {
97
- return 'Specify either the name or the id of the list to update but not both';
98
- }
99
- return true;
100
- }));
82
+ }, _TodoListSetCommand_initOptionSets = function _TodoListSetCommand_initOptionSets() {
83
+ this.optionSets.push(['name', 'id']);
101
84
  };
102
85
  module.exports = new TodoListSetCommand();
103
86
  //# sourceMappingURL=list-set.js.map
@@ -1,19 +1,10 @@
1
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
2
  var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
12
3
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
13
4
  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
5
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
15
6
  };
16
- var _TodoTaskAddCommand_instances, _TodoTaskAddCommand_initTelemetry, _TodoTaskAddCommand_initOptions, _TodoTaskAddCommand_initValidators;
7
+ var _TodoTaskAddCommand_instances, _TodoTaskAddCommand_initTelemetry, _TodoTaskAddCommand_initOptions, _TodoTaskAddCommand_initOptionSets;
17
8
  Object.defineProperty(exports, "__esModule", { value: true });
18
9
  const request_1 = require("../../../../request");
19
10
  const GraphCommand_1 = require("../../../base/GraphCommand");
@@ -24,7 +15,7 @@ class TodoTaskAddCommand extends GraphCommand_1.default {
24
15
  _TodoTaskAddCommand_instances.add(this);
25
16
  __classPrivateFieldGet(this, _TodoTaskAddCommand_instances, "m", _TodoTaskAddCommand_initTelemetry).call(this);
26
17
  __classPrivateFieldGet(this, _TodoTaskAddCommand_instances, "m", _TodoTaskAddCommand_initOptions).call(this);
27
- __classPrivateFieldGet(this, _TodoTaskAddCommand_instances, "m", _TodoTaskAddCommand_initValidators).call(this);
18
+ __classPrivateFieldGet(this, _TodoTaskAddCommand_instances, "m", _TodoTaskAddCommand_initOptionSets).call(this);
28
19
  }
29
20
  get name() {
30
21
  return commands_1.default.TASK_ADD;
@@ -91,16 +82,8 @@ _TodoTaskAddCommand_instances = new WeakSet(), _TodoTaskAddCommand_initTelemetry
91
82
  }, {
92
83
  option: '--listId [listId]'
93
84
  });
94
- }, _TodoTaskAddCommand_initValidators = function _TodoTaskAddCommand_initValidators() {
95
- this.validators.push((args) => __awaiter(this, void 0, void 0, function* () {
96
- if (args.options.listId && args.options.listName) {
97
- return 'Specify listId or listName but not both';
98
- }
99
- if (!args.options.listId && !args.options.listName) {
100
- return 'Specify listId or listName';
101
- }
102
- return true;
103
- }));
85
+ }, _TodoTaskAddCommand_initOptionSets = function _TodoTaskAddCommand_initOptionSets() {
86
+ this.optionSets.push(['listId', 'listName']);
104
87
  };
105
88
  module.exports = new TodoTaskAddCommand();
106
89
  //# sourceMappingURL=task-add.js.map
@@ -1,19 +1,10 @@
1
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
2
  var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
12
3
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
13
4
  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
5
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
15
6
  };
16
- var _TodoTaskListCommand_instances, _TodoTaskListCommand_initTelemetry, _TodoTaskListCommand_initOptions, _TodoTaskListCommand_initValidators;
7
+ var _TodoTaskListCommand_instances, _TodoTaskListCommand_initTelemetry, _TodoTaskListCommand_initOptions, _TodoTaskListCommand_initOptionSets;
17
8
  Object.defineProperty(exports, "__esModule", { value: true });
18
9
  const request_1 = require("../../../../request");
19
10
  const utils_1 = require("../../../../utils");
@@ -25,7 +16,7 @@ class TodoTaskListCommand extends GraphCommand_1.default {
25
16
  _TodoTaskListCommand_instances.add(this);
26
17
  __classPrivateFieldGet(this, _TodoTaskListCommand_instances, "m", _TodoTaskListCommand_initTelemetry).call(this);
27
18
  __classPrivateFieldGet(this, _TodoTaskListCommand_instances, "m", _TodoTaskListCommand_initOptions).call(this);
28
- __classPrivateFieldGet(this, _TodoTaskListCommand_instances, "m", _TodoTaskListCommand_initValidators).call(this);
19
+ __classPrivateFieldGet(this, _TodoTaskListCommand_instances, "m", _TodoTaskListCommand_initOptionSets).call(this);
29
20
  }
30
21
  get name() {
31
22
  return commands_1.default.TASK_LIST;
@@ -95,16 +86,8 @@ _TodoTaskListCommand_instances = new WeakSet(), _TodoTaskListCommand_initTelemet
95
86
  }, {
96
87
  option: '--listId [listId]'
97
88
  });
98
- }, _TodoTaskListCommand_initValidators = function _TodoTaskListCommand_initValidators() {
99
- this.validators.push((args) => __awaiter(this, void 0, void 0, function* () {
100
- if (args.options.listId && args.options.listName) {
101
- return 'Specify listId or listName, but not both';
102
- }
103
- if (!args.options.listId && !args.options.listName) {
104
- return 'Specify listId or listName';
105
- }
106
- return true;
107
- }));
89
+ }, _TodoTaskListCommand_initOptionSets = function _TodoTaskListCommand_initOptionSets() {
90
+ this.optionSets.push(['listId', 'listName']);
108
91
  };
109
92
  module.exports = new TodoTaskListCommand();
110
93
  //# sourceMappingURL=task-list.js.map
@@ -1,19 +1,10 @@
1
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
2
  var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
12
3
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
13
4
  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
5
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
15
6
  };
16
- var _TodoTaskRemoveCommand_instances, _TodoTaskRemoveCommand_initTelemetry, _TodoTaskRemoveCommand_initOptions, _TodoTaskRemoveCommand_initValidators;
7
+ var _TodoTaskRemoveCommand_instances, _TodoTaskRemoveCommand_initTelemetry, _TodoTaskRemoveCommand_initOptions, _TodoTaskRemoveCommand_initOptionSets;
17
8
  Object.defineProperty(exports, "__esModule", { value: true });
18
9
  const cli_1 = require("../../../../cli");
19
10
  const request_1 = require("../../../../request");
@@ -25,7 +16,7 @@ class TodoTaskRemoveCommand extends GraphCommand_1.default {
25
16
  _TodoTaskRemoveCommand_instances.add(this);
26
17
  __classPrivateFieldGet(this, _TodoTaskRemoveCommand_instances, "m", _TodoTaskRemoveCommand_initTelemetry).call(this);
27
18
  __classPrivateFieldGet(this, _TodoTaskRemoveCommand_instances, "m", _TodoTaskRemoveCommand_initOptions).call(this);
28
- __classPrivateFieldGet(this, _TodoTaskRemoveCommand_instances, "m", _TodoTaskRemoveCommand_initValidators).call(this);
19
+ __classPrivateFieldGet(this, _TodoTaskRemoveCommand_instances, "m", _TodoTaskRemoveCommand_initOptionSets).call(this);
29
20
  }
30
21
  get name() {
31
22
  return commands_1.default.TASK_REMOVE;
@@ -105,16 +96,8 @@ _TodoTaskRemoveCommand_instances = new WeakSet(), _TodoTaskRemoveCommand_initTel
105
96
  }, {
106
97
  option: '--confirm'
107
98
  });
108
- }, _TodoTaskRemoveCommand_initValidators = function _TodoTaskRemoveCommand_initValidators() {
109
- this.validators.push((args) => __awaiter(this, void 0, void 0, function* () {
110
- if (!args.options.listName && !args.options.listId) {
111
- return 'Specify name or id of the To Do list';
112
- }
113
- if (args.options.listName && args.options.listId) {
114
- return 'Specify either the name or the id of the To Do list but not both';
115
- }
116
- return true;
117
- }));
99
+ }, _TodoTaskRemoveCommand_initOptionSets = function _TodoTaskRemoveCommand_initOptionSets() {
100
+ this.optionSets.push(['listName', 'listId']);
118
101
  };
119
102
  module.exports = new TodoTaskRemoveCommand();
120
103
  //# sourceMappingURL=task-remove.js.map
@@ -13,7 +13,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
13
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
14
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
15
15
  };
16
- var _TodoTaskSetCommand_instances, _TodoTaskSetCommand_initTelemetry, _TodoTaskSetCommand_initOptions, _TodoTaskSetCommand_initValidators;
16
+ var _TodoTaskSetCommand_instances, _TodoTaskSetCommand_initTelemetry, _TodoTaskSetCommand_initOptions, _TodoTaskSetCommand_initValidators, _TodoTaskSetCommand_initOptionSets;
17
17
  Object.defineProperty(exports, "__esModule", { value: true });
18
18
  const request_1 = require("../../../../request");
19
19
  const GraphCommand_1 = require("../../../base/GraphCommand");
@@ -25,6 +25,7 @@ class TodoTaskSetCommand extends GraphCommand_1.default {
25
25
  __classPrivateFieldGet(this, _TodoTaskSetCommand_instances, "m", _TodoTaskSetCommand_initTelemetry).call(this);
26
26
  __classPrivateFieldGet(this, _TodoTaskSetCommand_instances, "m", _TodoTaskSetCommand_initOptions).call(this);
27
27
  __classPrivateFieldGet(this, _TodoTaskSetCommand_instances, "m", _TodoTaskSetCommand_initValidators).call(this);
28
+ __classPrivateFieldGet(this, _TodoTaskSetCommand_instances, "m", _TodoTaskSetCommand_initOptionSets).call(this);
28
29
  }
29
30
  get name() {
30
31
  return commands_1.default.TASK_SET;
@@ -109,12 +110,6 @@ _TodoTaskSetCommand_instances = new WeakSet(), _TodoTaskSetCommand_initTelemetry
109
110
  });
110
111
  }, _TodoTaskSetCommand_initValidators = function _TodoTaskSetCommand_initValidators() {
111
112
  this.validators.push((args) => __awaiter(this, void 0, void 0, function* () {
112
- if (args.options.listId && args.options.listName) {
113
- return 'Specify listId or listName but not both';
114
- }
115
- if (!args.options.listId && !args.options.listName) {
116
- return 'Specify listId or listName';
117
- }
118
113
  if (args.options.status &&
119
114
  args.options.status !== 'notStarted' &&
120
115
  args.options.status !== 'inProgress' &&
@@ -125,6 +120,8 @@ _TodoTaskSetCommand_instances = new WeakSet(), _TodoTaskSetCommand_initTelemetry
125
120
  }
126
121
  return true;
127
122
  }));
123
+ }, _TodoTaskSetCommand_initOptionSets = function _TodoTaskSetCommand_initOptionSets() {
124
+ this.optionSets.push(['listId', 'listName']);
128
125
  };
129
126
  module.exports = new TodoTaskSetCommand();
130
127
  //# sourceMappingURL=task-set.js.map
package/dist/request.js CHANGED
@@ -128,7 +128,8 @@ class Request {
128
128
  return Promise.resolve('');
129
129
  }
130
130
  else {
131
- const resource = Auth_1.Auth.getResourceFromUrl(options.url);
131
+ const url = options.headers && options.headers['x-resource'] ? options.headers['x-resource'] : options.url;
132
+ const resource = Auth_1.Auth.getResourceFromUrl(url);
132
133
  return Auth_1.default.ensureAccessToken(resource, this._logger, this._debug);
133
134
  }
134
135
  })()
@@ -137,7 +138,10 @@ class Request {
137
138
  if (options.headers['x-anonymous']) {
138
139
  delete options.headers['x-anonymous'];
139
140
  }
140
- else {
141
+ if (options.headers['x-resource']) {
142
+ delete options.headers['x-resource'];
143
+ }
144
+ if (accessToken !== '') {
141
145
  options.headers.authorization = `Bearer ${accessToken}`;
142
146
  }
143
147
  }
@@ -176,5 +176,5 @@ m365 aad app add --name 'My AAD app' --save
176
176
  Create new Azure AD app registration with a certificate
177
177
 
178
178
  ```sh
179
- m365 aad app add --name 'My AAD app' --certificateDisplayName "Some certificate name" --certificateFile c:\temp\some-certificate.cer
179
+ m365 aad app add --name 'My AAD app' --certificateDisplayName "Some certificate name" --certificateFile "c:\temp\some-certificate.cer"
180
180
  ```
@@ -85,5 +85,5 @@ m365 aad app set --objectId 95cfe30d-ed44-4f9d-b73d-c66560f72e83 --redirectUris
85
85
  Add a certificate to the app
86
86
 
87
87
  ```sh
88
- m365 aad app set --certificateDisplayName "Some certificate name" --certificateFile c:\temp\some-certificate.cer
88
+ m365 aad app set --appId e75be2e1-0204-4f95-857d-51a37cf40be8 --certificateDisplayName "Some certificate name" --certificateFile "c:\temp\some-certificate.cer"
89
89
  ```
@@ -116,23 +116,3 @@ Send custom card with card data
116
116
  ```sh
117
117
  m365 adaptivecard send --url https://contoso.webhook.office.com/webhookb2/892e8ed3-997c-4b6e-8f8a-7f32728a8a87@f7322380-f203-42ff-93e8-66e266f6d2e4/IncomingWebhook/fcc6565ec7a944928bd43d6fc193b258/4f0482d4-b147-4f67-8a61-11f0a5019547 --card '{"type":"AdaptiveCard","body":[{"type":"TextBlock","size":"Medium","weight":"Bolder","text":"${title}"},{"type":"TextBlock","text":"${description}","wrap":true},{"type":"FactSet","facts":[{"$data":"${properties}","title":"${key}:","value":"${value}"}]}],"actions":[{"type":"Action.OpenUrl","title":"View","url":"${viewUrl}"}],"$schema":"http://adaptivecards.io/schemas/adaptive-card.json","version":"1.2"}' --cardData '{"title":"Publish Adaptive Card Schema","description":"Now that we have defined the main rules and features of the format, we need to produce a schema and publish it to GitHub. The schema will be the starting point of our reference documentation.","creator":{"name":"Matt Hidinger","profileImage":"https://pbs.twimg.com/profile_images/3647943215/d7f12830b3c17a5a9e4afcc370e3a37e_400x400.jpeg"},"createdUtc":"2017-02-14T06:08:39Z","viewUrl":"https://adaptivecards.io","properties":[{"key":"Board","value":"Adaptive Cards"},{"key":"List","value":"Backlog"},{"key":"Assigned to","value":"Matt Hidinger"},{"key":"Due date","value":"Not set"}]}'
118
118
  ```
119
-
120
- ## Examples for PowerShell
121
-
122
- Send custom card with all known options merged
123
-
124
- ```powershell
125
- m365 adaptivecard send --url https://contoso.webhook.office.com/webhookb2/892e8ed3-997c-4b6e-8f8a-7f32728a8a87@f7322380-f203-42ff-93e8-66e266f6d2e4/IncomingWebhook/fcc6565ec7a944928bd43d6fc193b258/4f0482d4-b147-4f67-8a61-11f0a5019547 --card "{\"type\":\"AdaptiveCard\",\"body\":[{\"type\":\"TextBlock\",\"size\":\"Medium\",\"weight\":\"Bolder\",\"text\":\"${title}\"},{\"type\":\"TextBlock\",\"text\":\"${description}\",\"wrap\":true},{\"type\":\"FactSet\",\"facts\":[{\"$data\":\"${properties}\",\"title\":\"${key}:\",\"value\":\"${value}\"}]}],\"actions\":[{\"type\":\"Action.OpenUrl\",\"title\":\"View\",\"url\":\"${actionUrl}\"}],\"$schema\":\"http://adaptivecards.io/schemas/adaptive-card.json\",\"version\":\"1.2\"}" --title "CLI for Microsoft 365 v3.4" --description "New release of CLI for Microsoft 365" --imageUrl "https://contoso.com/image.gif" --actionUrl "https://aka.ms/cli-m365"
126
- ```
127
-
128
- Send custom card with unknown option merged
129
-
130
- ```powershell
131
- m365 adaptivecard send --url https://contoso.webhook.office.com/webhookb2/892e8ed3-997c-4b6e-8f8a-7f32728a8a87@f7322380-f203-42ff-93e8-66e266f6d2e4/IncomingWebhook/fcc6565ec7a944928bd43d6fc193b258/4f0482d4-b147-4f67-8a61-11f0a5019547 --card "{\"type\":\"AdaptiveCard\",\"body\":[{\"type\":\"TextBlock\",\"size\":\"Medium\",\"weight\":\"Bolder\",\"text\":\"${Title}\"}],\"$schema\":\"http://adaptivecards.io/schemas/adaptive-card.json\",\"version\":\"1.2\"}" --Title "CLI for Microsoft 365 v3.4"
132
- ```
133
-
134
- Send custom card with card data
135
-
136
- ```powershell
137
- m365 adaptivecard send --url https://contoso.webhook.office.com/webhookb2/892e8ed3-997c-4b6e-8f8a-7f32728a8a87@f7322380-f203-42ff-93e8-66e266f6d2e4/IncomingWebhook/fcc6565ec7a944928bd43d6fc193b258/4f0482d4-b147-4f67-8a61-11f0a5019547 --card "{\"type\":\"AdaptiveCard\",\"body\":[{\"type\":\"TextBlock\",\"size\":\"Medium\",\"weight\":\"Bolder\",\"text\":\"${title}\"},{\"type\":\"TextBlock\",\"text\":\"${description}\",\"wrap\":true},{\"type\":\"FactSet\",\"facts\":[{\"$data\":\"${properties}\",\"title\":\"${key}:\",\"value\":\"${value}\"}]}],\"actions\":[{\"type\":\"Action.OpenUrl\",\"title\":\"View\",\"url\":\"${viewUrl}\"}],\"$schema\":\"http://adaptivecards.io/schemas/adaptive-card.json\",\"version\":\"1.2\"}" --cardData "{\"title\":\"Publish Adaptive Card Schema\",\"description\":\"Now that we have defined the main rules and features of the format, we need to produce a schema and publish it to GitHub. The schema will be the starting point of our reference documentation.\",\"creator\":{\"name\":\"Matt Hidinger\",\"profileImage\":\"https://pbs.twimg.com/profile_images/3647943215/d7f12830b3c17a5a9e4afcc370e3a37e_400x400.jpeg\"},\"createdUtc\":\"2017-02-14T06:08:39Z\",\"viewUrl\":\"https://adaptivecards.io\",\"properties\":[{\"key\":\"Board\",\"value\":\"Adaptive Cards\"},{\"key\":\"List\",\"value\":\"Backlog\"},{\"key\":\"Assigned to\",\"value\":\"Matt Hidinger\"},{\"key\":\"Due date\",\"value\":\"Not set\"}]}"
138
- ```
@@ -0,0 +1,33 @@
1
+ # booking business get
2
+
3
+ Retrieve the specified Microsoft Bookings business.
4
+
5
+ ## Usage
6
+
7
+ ```sh
8
+ m365 booking business get [options]
9
+ ```
10
+
11
+ ## Options
12
+
13
+ `-i, --id [id]`
14
+ : ID of the business. Specify either `id` or `name` but not both.
15
+
16
+ `-n, --name [name]`
17
+ : Name of the business. Specify either `id` or `name` but not both.
18
+
19
+ --8<-- "docs/cmd/_global.md"
20
+
21
+ ## Examples
22
+
23
+ Retrieve the specified Microsoft Bookings business with id _business@contoso.onmicrosoft.com_.
24
+
25
+ ```sh
26
+ m365 booking business get --id 'business@contoso.onmicrosoft.com'
27
+ ```
28
+
29
+ Retrieve the specified Microsoft Bookings business with name _business name_.
30
+
31
+ ```sh
32
+ m365 booking business get --name 'business name'
33
+ ```
@@ -0,0 +1,21 @@
1
+ # booking business list
2
+
3
+ Lists all Microsoft Bookings businesses that are created for the tenant.
4
+
5
+ ## Usage
6
+
7
+ ```sh
8
+ m365 booking business list [options]
9
+ ```
10
+
11
+ ## Options
12
+
13
+ --8<-- "docs/cmd/_global.md"
14
+
15
+ ## Examples
16
+
17
+ Returns a list of all Microsoft Bookings businesses that are created for the tenant.
18
+
19
+ ```sh
20
+ m365 booking business list
21
+ ```
@@ -29,4 +29,4 @@ cli completion clink update > m365.lua
29
29
 
30
30
  ## More information
31
31
 
32
- - Command completion: [https://pnp.github.io/cli-microsoft365/concepts/completion/](https://pnp.github.io/cli-microsoft365/concepts/completion/)
32
+ - Command completion: [https://pnp.github.io/cli-microsoft365/user-guide/completion/](https://pnp.github.io/cli-microsoft365/user-guide/completion/)
@@ -31,4 +31,4 @@ cli completion pwsh setup --profile $profile
31
31
 
32
32
  ## More information
33
33
 
34
- - Command completion: [https://pnp.github.io/cli-microsoft365/concepts/completion/](https://pnp.github.io/cli-microsoft365/concepts/completion/)
34
+ - Command completion: [https://pnp.github.io/cli-microsoft365/user-guide/completion/](https://pnp.github.io/cli-microsoft365/user-guide/completion/)
@@ -26,4 +26,4 @@ cli completion pwsh update
26
26
 
27
27
  ## More information
28
28
 
29
- - Command completion: [https://pnp.github.io/cli-microsoft365/concepts/completion/](https://pnp.github.io/cli-microsoft365/concepts/completion/)
29
+ - Command completion: [https://pnp.github.io/cli-microsoft365/user-guide/completion/](https://pnp.github.io/cli-microsoft365/user-guide/completion/)
@@ -22,4 +22,4 @@ cli completion sh setup
22
22
 
23
23
  ## More information
24
24
 
25
- - Command completion: [https://pnp.github.io/cli-microsoft365/concepts/completion/](https://pnp.github.io/cli-microsoft365/concepts/completion/)
25
+ - Command completion: [https://pnp.github.io/cli-microsoft365/user-guide/completion/](https://pnp.github.io/cli-microsoft365/user-guide/completion/)
@@ -26,4 +26,4 @@ m365 cli completion sh update
26
26
 
27
27
  ## More information
28
28
 
29
- - Command completion: [https://pnp.github.io/cli-microsoft365/concepts/completion/](https://pnp.github.io/cli-microsoft365/concepts/completion/)
29
+ - Command completion: [https://pnp.github.io/cli-microsoft365/user-guide/completion/](https://pnp.github.io/cli-microsoft365/user-guide/completion/)
@@ -0,0 +1,70 @@
1
+ # onenote notebook list
2
+
3
+ Retrieve a list of notebooks.
4
+
5
+ ## Usage
6
+
7
+ ```sh
8
+ m365 onenote notebook list [options]
9
+ ```
10
+
11
+ ## Options
12
+
13
+ `--userId [userId]`
14
+ : Id of the user. Use either userId or userName, but not both.
15
+
16
+ `--userName [userName]`
17
+ : Name of the user. Use either userId or userName, but not both.
18
+
19
+ `--groupId [groupId]`
20
+ : Id of the SharePoint group. Use either groupName or groupId, but not both
21
+
22
+ `--groupName [groupName]`
23
+ : Name of the SharePoint group. Use either groupName or groupId, but not both.
24
+
25
+ `-u, --webUrl [webUrl]`
26
+ : URL of the SharePoint site.
27
+
28
+ --8<-- "docs/cmd/_global.md"
29
+
30
+ ## Examples
31
+
32
+ List Microsoft OneNote notebooks for the currently logged in user
33
+
34
+ ```sh
35
+ m365 onenote notebook list
36
+ ```
37
+
38
+ List Microsoft OneNote notebooks in group 233e43d0-dc6a-482e-9b4e-0de7a7bce9b4
39
+
40
+ ```sh
41
+ m365 onenote notebook list --groupId 233e43d0-dc6a-482e-9b4e-0de7a7bce9b4
42
+ ```
43
+
44
+ List Microsoft OneNote notebooks in group My Group
45
+
46
+ ```sh
47
+ m365 onenote notebook list --groupName "MyGroup"
48
+ ```
49
+
50
+ List Microsoft OneNote notebooks for user user1@contoso.onmicrosoft.com
51
+
52
+ ```sh
53
+ m365 onenote notebook list --userName user1@contoso.onmicrosoft.com
54
+ ```
55
+
56
+ List Microsoft OneNote notebooks for user 2609af39-7775-4f94-a3dc-0dd67657e900
57
+
58
+ ```sh
59
+ m365 onenote notebook list --userId 2609af39-7775-4f94-a3dc-0dd67657e900
60
+ ```
61
+
62
+ List Microsoft OneNote notebooks for site https://contoso.sharepoint.com/sites/testsite
63
+
64
+ ```sh
65
+ m365 onenote notebook list --webUrl https://contoso.sharepoint.com/sites/testsite
66
+ ```
67
+
68
+ ## More information
69
+
70
+ - List notebooks (MS Graph docs): [https://docs.microsoft.com/en-us/graph/api/onenote-list-notebooks?view=graph-rest-1.0&tabs=http](https://docs.microsoft.com/en-us/graph/api/onenote-list-notebooks?view=graph-rest-1.0&tabs=http)
@@ -0,0 +1,76 @@
1
+ # request
2
+
3
+ Executes the specified web request using CLI for Microsoft 365
4
+
5
+ ## Usage
6
+
7
+ ```sh
8
+ m365 request [options]
9
+ ```
10
+
11
+ ## Options
12
+
13
+ `-u, --url <url>`
14
+ : The request URL.
15
+
16
+ `-m, --method [method]`
17
+ : The HTTP request method. Accepted values are `get, post, put, patch, delete, head, options`. The default value is `get`.
18
+
19
+ `-r, --resource [resource]`
20
+ : The resource uri for which the CLI should acquire a token from AAD in order to access
21
+ the service.
22
+
23
+ `-b, --body [body]`
24
+ : The request body. Optionally use `@example.json` to load the body from a file.
25
+
26
+ `-p, --filePath [filePath]`
27
+ : The file path to save the response to. This option can be used when downloading files.
28
+
29
+ --8<-- "docs/cmd/_global.md"
30
+
31
+ ## Remarks
32
+
33
+ When executing a request, CLI will take care of the very basic configuration, and you'll need to specify all additional information, such as headers, method and body. CLI will take care for you of:
34
+
35
+ - applying compression and handling throttling,
36
+ - setting the `accept` to `application/json` if you don't specify it yourself,
37
+ - setting the `authorization` header to the bearer token obtained for the resource determined from the request URL
38
+
39
+ If you specify the `resource` option, the CLI will try to retrieve a valid token for the resource instead of determining the resource based on the url. The value doesn't have to be a URL. It can be also a URI like `app://<guid>`.
40
+
41
+ Specify additional headers by typing them as options, for example: `--content-type "application/json"`, `--if-match "*"`, `--x-requestdigest "somedigest"`.
42
+
43
+ !!! important
44
+ When building the request, depending on the shell you use, you might need to escape all `$` characters in the URL, request headers, and the body. If you don't do it, the shell will treat it as a variable and will remove the following word from the request, breaking the request.
45
+
46
+ ## Examples
47
+
48
+ Call the SharePoint Rest API using a GET request with a constructed URL containing expands, filters and selects.
49
+
50
+ ```sh
51
+ m365 request --url "https://contoso.sharepoint.com/sites/project-x/_api/web/siteusers?\$filter=IsShareByEmailGuestUser eq true&\$expand=Groups&\$select=Title,LoginName,Email,Groups/LoginName" --accept "application/json;odata=nometadata"
52
+ ```
53
+
54
+ Call the Microsoft Graph beta endpoint using a GET request.
55
+
56
+ ```sh
57
+ m365 request --url "https://graph.microsoft.com/beta/me"
58
+ ```
59
+
60
+ Call the SharePoint API to retrieve a form digest.
61
+
62
+ ```sh
63
+ m365 request --method post --url "https://contoso.sharepoint.com/sites/project-x/_api/contextinfo"
64
+ ```
65
+
66
+ Call the SharePoint API to update a site title.
67
+
68
+ ```sh
69
+ m365 request --method post --url "https://contoso.sharepoint.com/sites/project-x/_api/web" --body '{ "Title": "New title" }' --content-type "application/json" --x-http-method "PATCH"
70
+ ```
71
+
72
+ Call the Microsoft Graph to get a profile photo.
73
+
74
+ ```sh
75
+ m365 request --url "https://graph.microsoft.com/beta/me/photo/\$value" --filePath ./profile-pic.jpg
76
+ ```
@@ -0,0 +1,40 @@
1
+ # search externalconnection remove
2
+
3
+ Allow the administrator to remove a specific external connection used in Microsoft Search.
4
+
5
+ ## Usage
6
+
7
+ ```sh
8
+ m365 search externalconnection remove [options]
9
+ ```
10
+
11
+ ## Options
12
+
13
+ `-i, --id [id]`
14
+ : ID of the External Connection to remove. Specify either `id` or `name`
15
+
16
+ `-n, --name [name]`
17
+ : Name of the External Connection to remove. Specify either `id` or `name`
18
+
19
+ `--confirm`
20
+ : Don't prompt for confirming removing the connection
21
+
22
+ --8<-- "docs/cmd/_global.md"
23
+
24
+ ## Remarks
25
+
26
+ If the command finds multiple external connections used in Microsoft Search with the specified name, it will prompt you to disambiguate which external connection it should remove, listing the discovered IDs.
27
+
28
+ ## Examples
29
+
30
+ Removes external connection with id _MyApp_
31
+
32
+ ```sh
33
+ m365 search externalconnection remove --id "MyApp"
34
+ ```
35
+
36
+ Removes external connection with name _Test_. Will NOT prompt for confirmation before removing.
37
+
38
+ ```sh
39
+ m365 search externalconnection remove --name "Test" --confirm
40
+ ```