@pnp/cli-microsoft365 5.9.0-beta.60e454b → 5.9.0-beta.77d7f6b

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 (43) hide show
  1. package/dist/Command.js +16 -2
  2. package/dist/m365/aad/commands/app/app-add.js +37 -13
  3. package/dist/m365/commands/status.js +6 -1
  4. package/dist/m365/outlook/commands/mail/mail-send.js +54 -30
  5. package/dist/m365/pp/commands/card/card-get.js +110 -0
  6. package/dist/m365/pp/commands/gateway/gateway-get.js +70 -0
  7. package/dist/m365/pp/commands/solution/solution-get.js +117 -0
  8. package/dist/m365/pp/commands.js +3 -0
  9. package/dist/m365/spfx/commands/project/project-doctor.js +4 -1
  10. package/dist/m365/spfx/commands/project/project-externalize.js +4 -1
  11. package/dist/m365/spfx/commands/spfx-doctor.js +3 -3
  12. package/dist/m365/spo/commands/contenttype/contenttype-add.js +82 -43
  13. package/dist/m365/spo/commands/contenttype/contenttype-field-remove.js +53 -21
  14. package/dist/m365/spo/commands/contenttype/contenttype-get.js +35 -14
  15. package/dist/m365/spo/commands/list/list-roleassignment-add.js +1 -1
  16. package/dist/m365/spo/commands/list/list-roleinheritance-break.js +14 -6
  17. package/dist/m365/spo/commands/list/list-roleinheritance-reset.js +15 -7
  18. package/dist/m365/spo/commands/listitem/listitem-roleassignment-add.js +239 -0
  19. package/dist/m365/spo/commands.js +1 -0
  20. package/dist/m365/todo/commands/task/task-add.js +55 -3
  21. package/docs/docs/_clisettings.md +19 -0
  22. package/docs/docs/cmd/outlook/mail/mail-send.md +13 -0
  23. package/docs/docs/cmd/planner/bucket/bucket-add.md +29 -0
  24. package/docs/docs/cmd/planner/bucket/bucket-get.md +29 -0
  25. package/docs/docs/cmd/planner/bucket/bucket-list.md +30 -0
  26. package/docs/docs/cmd/planner/bucket/bucket-remove.md +4 -0
  27. package/docs/docs/cmd/planner/bucket/bucket-set.md +4 -0
  28. package/docs/docs/cmd/planner/plan/plan-add.md +123 -0
  29. package/docs/docs/cmd/planner/plan/plan-get.md +75 -0
  30. package/docs/docs/cmd/planner/plan/plan-list.md +45 -0
  31. package/docs/docs/cmd/planner/plan/plan-remove.md +4 -0
  32. package/docs/docs/cmd/pp/card/card-get.md +51 -0
  33. package/docs/docs/cmd/pp/gateway/gateway-get.md +24 -0
  34. package/docs/docs/cmd/pp/solution/solution-get.md +51 -0
  35. package/docs/docs/cmd/spfx/project/project-rename.md +1 -14
  36. package/docs/docs/cmd/spo/contenttype/contenttype-add.md +20 -2
  37. package/docs/docs/cmd/spo/contenttype/contenttype-field-remove.md +22 -4
  38. package/docs/docs/cmd/spo/contenttype/contenttype-get.md +21 -3
  39. package/docs/docs/cmd/spo/list/list-roleinheritance-break.md +11 -8
  40. package/docs/docs/cmd/spo/list/list-roleinheritance-reset.md +14 -5
  41. package/docs/docs/cmd/spo/listitem/listitem-roleassignment-add.md +81 -0
  42. package/docs/docs/cmd/todo/task/task-add.md +32 -5
  43. package/package.json +3 -1
@@ -0,0 +1,239 @@
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 _SpoListItemRoleAssignmentAddCommand_instances, _SpoListItemRoleAssignmentAddCommand_initTelemetry, _SpoListItemRoleAssignmentAddCommand_initOptions, _SpoListItemRoleAssignmentAddCommand_initValidators;
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ const request_1 = require("../../../../request");
19
+ const SpoCommand_1 = require("../../../base/SpoCommand");
20
+ const commands_1 = require("../../commands");
21
+ const SpoUserGetCommand = require("../user/user-get");
22
+ const SpoGroupGetCommand = require("../group/group-get");
23
+ const SpoRoleDefinitionListCommand = require("../roledefinition/roledefinition-list");
24
+ const validation_1 = require("../../../../utils/validation");
25
+ const formatting_1 = require("../../../../utils/formatting");
26
+ const urlUtil_1 = require("../../../../utils/urlUtil");
27
+ const Cli_1 = require("../../../../cli/Cli");
28
+ class SpoListItemRoleAssignmentAddCommand extends SpoCommand_1.default {
29
+ constructor() {
30
+ super();
31
+ _SpoListItemRoleAssignmentAddCommand_instances.add(this);
32
+ __classPrivateFieldGet(this, _SpoListItemRoleAssignmentAddCommand_instances, "m", _SpoListItemRoleAssignmentAddCommand_initTelemetry).call(this);
33
+ __classPrivateFieldGet(this, _SpoListItemRoleAssignmentAddCommand_instances, "m", _SpoListItemRoleAssignmentAddCommand_initOptions).call(this);
34
+ __classPrivateFieldGet(this, _SpoListItemRoleAssignmentAddCommand_instances, "m", _SpoListItemRoleAssignmentAddCommand_initValidators).call(this);
35
+ }
36
+ get name() {
37
+ return commands_1.default.LISTITEM_ROLEASSIGNMENT_ADD;
38
+ }
39
+ get description() {
40
+ return 'Adds a role assignment to a listitem.';
41
+ }
42
+ commandAction(logger, args) {
43
+ return __awaiter(this, void 0, void 0, function* () {
44
+ if (this.verbose) {
45
+ logger.logToStderr(`Adding role assignment to listitem in site at ${args.options.webUrl}...`);
46
+ }
47
+ try {
48
+ let requestUrl = `${args.options.webUrl}/_api/web/`;
49
+ if (args.options.listId) {
50
+ requestUrl += `lists(guid'${formatting_1.formatting.encodeQueryParameter(args.options.listId)}')/`;
51
+ }
52
+ else if (args.options.listTitle) {
53
+ requestUrl += `lists/getByTitle('${formatting_1.formatting.encodeQueryParameter(args.options.listTitle)}')/`;
54
+ }
55
+ else if (args.options.listUrl) {
56
+ const listServerRelativeUrl = urlUtil_1.urlUtil.getServerRelativePath(args.options.webUrl, args.options.listUrl);
57
+ requestUrl += `GetList('${formatting_1.formatting.encodeQueryParameter(listServerRelativeUrl)}')/`;
58
+ }
59
+ requestUrl += `items(${args.options.listItemId})/`;
60
+ const roleDefinitionId = yield this.getRoleDefinitionId(args.options);
61
+ let principalId = 0;
62
+ if (args.options.upn) {
63
+ principalId = yield this.getUserPrincipalId(args.options);
64
+ yield this.addRoleAssignment(requestUrl, roleDefinitionId, principalId);
65
+ }
66
+ else if (args.options.groupName) {
67
+ principalId = yield this.getGroupPrincipalId(args.options);
68
+ yield this.addRoleAssignment(requestUrl, roleDefinitionId, principalId);
69
+ }
70
+ else {
71
+ principalId = args.options.principalId;
72
+ yield this.addRoleAssignment(requestUrl, roleDefinitionId, principalId);
73
+ }
74
+ }
75
+ catch (err) {
76
+ this.handleRejectedODataJsonPromise(err);
77
+ }
78
+ });
79
+ }
80
+ addRoleAssignment(requestUrl, roleDefinitionId, principalId) {
81
+ return __awaiter(this, void 0, void 0, function* () {
82
+ try {
83
+ const requestOptions = {
84
+ url: `${requestUrl}roleassignments/addroleassignment(principalid='${principalId}',roledefid='${roleDefinitionId}')`,
85
+ method: 'POST',
86
+ headers: {
87
+ 'accept': 'application/json;odata=nometadata',
88
+ 'content-type': 'application/json'
89
+ },
90
+ responseType: 'json'
91
+ };
92
+ yield request_1.default.post(requestOptions);
93
+ }
94
+ catch (err) {
95
+ return Promise.reject(err);
96
+ }
97
+ });
98
+ }
99
+ getRoleDefinitionId(options) {
100
+ return __awaiter(this, void 0, void 0, function* () {
101
+ if (!options.roleDefinitionName) {
102
+ return options.roleDefinitionId;
103
+ }
104
+ try {
105
+ const roleDefinitionListCommandOptions = {
106
+ webUrl: options.webUrl,
107
+ output: 'json',
108
+ debug: this.debug,
109
+ verbose: this.verbose
110
+ };
111
+ const output = yield Cli_1.Cli.executeCommandWithOutput(SpoRoleDefinitionListCommand, { options: Object.assign(Object.assign({}, roleDefinitionListCommandOptions), { _: [] }) });
112
+ const getRoleDefinitionListOutput = JSON.parse(output.stdout);
113
+ const roleDefinitionId = getRoleDefinitionListOutput.find((role) => role.Name === options.roleDefinitionName).Id;
114
+ return roleDefinitionId;
115
+ }
116
+ catch (err) {
117
+ return Promise.reject(err);
118
+ }
119
+ });
120
+ }
121
+ getGroupPrincipalId(options) {
122
+ return __awaiter(this, void 0, void 0, function* () {
123
+ try {
124
+ const groupGetCommandOptions = {
125
+ webUrl: options.webUrl,
126
+ name: options.groupName,
127
+ output: 'json',
128
+ debug: this.debug,
129
+ verbose: this.verbose
130
+ };
131
+ const output = yield Cli_1.Cli.executeCommandWithOutput(SpoGroupGetCommand, { options: Object.assign(Object.assign({}, groupGetCommandOptions), { _: [] }) });
132
+ const getGroupOutput = JSON.parse(output.stdout);
133
+ return getGroupOutput.Id;
134
+ }
135
+ catch (err) {
136
+ return Promise.reject(err);
137
+ }
138
+ });
139
+ }
140
+ getUserPrincipalId(options) {
141
+ return __awaiter(this, void 0, void 0, function* () {
142
+ try {
143
+ const userGetCommandOptions = {
144
+ webUrl: options.webUrl,
145
+ email: options.upn,
146
+ id: undefined,
147
+ output: 'json',
148
+ debug: this.debug,
149
+ verbose: this.verbose
150
+ };
151
+ const output = yield Cli_1.Cli.executeCommandWithOutput(SpoUserGetCommand, { options: Object.assign(Object.assign({}, userGetCommandOptions), { _: [] }) });
152
+ const getUserOutput = JSON.parse(output.stdout);
153
+ return getUserOutput.Id;
154
+ }
155
+ catch (err) {
156
+ return Promise.reject(err);
157
+ }
158
+ });
159
+ }
160
+ }
161
+ _SpoListItemRoleAssignmentAddCommand_instances = new WeakSet(), _SpoListItemRoleAssignmentAddCommand_initTelemetry = function _SpoListItemRoleAssignmentAddCommand_initTelemetry() {
162
+ this.telemetry.push((args) => {
163
+ Object.assign(this.telemetryProperties, {
164
+ listId: typeof args.options.listId !== 'undefined',
165
+ listTitle: typeof args.options.listTitle !== 'undefined',
166
+ listUrl: typeof args.options.listUrl !== 'undefined',
167
+ principalId: typeof args.options.principalId !== 'undefined',
168
+ upn: typeof args.options.upn !== 'undefined',
169
+ groupName: typeof args.options.groupName !== 'undefined',
170
+ roleDefinitionId: typeof args.options.roleDefinitionId !== 'undefined',
171
+ roleDefinitionName: typeof args.options.roleDefinitionName !== 'undefined'
172
+ });
173
+ });
174
+ }, _SpoListItemRoleAssignmentAddCommand_initOptions = function _SpoListItemRoleAssignmentAddCommand_initOptions() {
175
+ this.options.unshift({
176
+ option: '-u, --webUrl <webUrl>'
177
+ }, {
178
+ option: '--listItemId <listItemId>'
179
+ }, {
180
+ option: '--listId [listId]'
181
+ }, {
182
+ option: '--listTitle [listTitle]'
183
+ }, {
184
+ option: '--listUrl [listUrl]'
185
+ }, {
186
+ option: '--principalId [principalId]'
187
+ }, {
188
+ option: '--upn [upn]'
189
+ }, {
190
+ option: '--groupName [groupName]'
191
+ }, {
192
+ option: '--roleDefinitionId [roleDefinitionId]'
193
+ }, {
194
+ option: '--roleDefinitionName [roleDefinitionName]'
195
+ });
196
+ }, _SpoListItemRoleAssignmentAddCommand_initValidators = function _SpoListItemRoleAssignmentAddCommand_initValidators() {
197
+ this.validators.push((args) => __awaiter(this, void 0, void 0, function* () {
198
+ const isValidSharePointUrl = validation_1.validation.isValidSharePointUrl(args.options.webUrl);
199
+ if (isValidSharePointUrl !== true) {
200
+ return isValidSharePointUrl;
201
+ }
202
+ if (args.options.listId && !validation_1.validation.isValidGuid(args.options.listId)) {
203
+ return `${args.options.listId} is not a valid GUID`;
204
+ }
205
+ if (args.options.listItemId && isNaN(args.options.listItemId)) {
206
+ return `Specified listItemId ${args.options.listItemId} is not a number`;
207
+ }
208
+ if (args.options.principalId && isNaN(args.options.principalId)) {
209
+ return `Specified principalId ${args.options.principalId} is not a number`;
210
+ }
211
+ if (args.options.roleDefinitionId && isNaN(args.options.roleDefinitionId)) {
212
+ return `Specified roleDefinitionId ${args.options.roleDefinitionId} is not a number`;
213
+ }
214
+ const listOptions = [args.options.listId, args.options.listTitle, args.options.listUrl];
215
+ if (listOptions.some(item => item !== undefined) && listOptions.filter(item => item !== undefined).length > 1) {
216
+ return `Specify either list id or title or list url`;
217
+ }
218
+ if (listOptions.filter(item => item !== undefined).length === 0) {
219
+ return `Specify at least list id or title or list url`;
220
+ }
221
+ const principalOptions = [args.options.principalId, args.options.upn, args.options.groupName];
222
+ if (!principalOptions.some(item => item !== undefined)) {
223
+ return `Specify either principalId, upn or groupName`;
224
+ }
225
+ if (principalOptions.filter(item => item !== undefined).length > 1) {
226
+ return `Specify either principalId, upn or groupName but not multiple`;
227
+ }
228
+ const roleDefinitionOptions = [args.options.roleDefinitionId, args.options.roleDefinitionName];
229
+ if (!roleDefinitionOptions.some(item => item !== undefined)) {
230
+ return `Specify either roleDefinitionId or roleDefinitionName`;
231
+ }
232
+ if (roleDefinitionOptions.filter(item => item !== undefined).length > 1) {
233
+ return `Specify either roleDefinitionId or roleDefinitionName but not multiple`;
234
+ }
235
+ return true;
236
+ }));
237
+ };
238
+ module.exports = new SpoListItemRoleAssignmentAddCommand();
239
+ //# sourceMappingURL=listitem-roleassignment-add.js.map
@@ -137,6 +137,7 @@ exports.default = {
137
137
  LISTITEM_RECORD_DECLARE: `${prefix} listitem record declare`,
138
138
  LISTITEM_RECORD_UNDECLARE: `${prefix} listitem record undeclare`,
139
139
  LISTITEM_REMOVE: `${prefix} listitem remove`,
140
+ LISTITEM_ROLEASSIGNMENT_ADD: `${prefix} listitem roleassignment add`,
140
141
  LISTITEM_ROLEASSIGNMENT_REMOVE: `${prefix} listitem roleassignment remove`,
141
142
  LISTITEM_ROLEINHERITANCE_BREAK: `${prefix} listitem roleinheritance break`,
142
143
  LISTITEM_ROLEINHERITANCE_RESET: `${prefix} listitem roleinheritance reset`,
@@ -13,9 +13,10 @@ 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 _TodoTaskAddCommand_instances, _TodoTaskAddCommand_initTelemetry, _TodoTaskAddCommand_initOptions, _TodoTaskAddCommand_initOptionSets;
16
+ var _TodoTaskAddCommand_instances, _TodoTaskAddCommand_initTelemetry, _TodoTaskAddCommand_initOptions, _TodoTaskAddCommand_initValidators, _TodoTaskAddCommand_initOptionSets;
17
17
  Object.defineProperty(exports, "__esModule", { value: true });
18
18
  const request_1 = require("../../../../request");
19
+ const validation_1 = require("../../../../utils/validation");
19
20
  const GraphCommand_1 = require("../../../base/GraphCommand");
20
21
  const commands_1 = require("../../commands");
21
22
  class TodoTaskAddCommand extends GraphCommand_1.default {
@@ -24,6 +25,7 @@ class TodoTaskAddCommand extends GraphCommand_1.default {
24
25
  _TodoTaskAddCommand_instances.add(this);
25
26
  __classPrivateFieldGet(this, _TodoTaskAddCommand_instances, "m", _TodoTaskAddCommand_initTelemetry).call(this);
26
27
  __classPrivateFieldGet(this, _TodoTaskAddCommand_instances, "m", _TodoTaskAddCommand_initOptions).call(this);
28
+ __classPrivateFieldGet(this, _TodoTaskAddCommand_instances, "m", _TodoTaskAddCommand_initValidators).call(this);
27
29
  __classPrivateFieldGet(this, _TodoTaskAddCommand_instances, "m", _TodoTaskAddCommand_initOptionSets).call(this);
28
30
  }
29
31
  get name() {
@@ -33,6 +35,7 @@ class TodoTaskAddCommand extends GraphCommand_1.default {
33
35
  return 'Add a task to a Microsoft To Do task list';
34
36
  }
35
37
  commandAction(logger, args) {
38
+ var _a, _b;
36
39
  return __awaiter(this, void 0, void 0, function* () {
37
40
  const endpoint = `${this.resource}/v1.0`;
38
41
  try {
@@ -44,7 +47,14 @@ class TodoTaskAddCommand extends GraphCommand_1.default {
44
47
  'Content-Type': 'application/json'
45
48
  },
46
49
  data: {
47
- title: args.options.title
50
+ title: args.options.title,
51
+ body: {
52
+ content: args.options.bodyContent,
53
+ contentType: ((_a = args.options.bodyContentType) === null || _a === void 0 ? void 0 : _a.toLowerCase()) || 'text'
54
+ },
55
+ importance: (_b = args.options.importance) === null || _b === void 0 ? void 0 : _b.toLowerCase(),
56
+ dueDateTime: this.getDateTimeTimeZone(args.options.dueDateTime),
57
+ reminderDateTime: this.getDateTimeTimeZone(args.options.reminderDateTime)
48
58
  },
49
59
  responseType: 'json'
50
60
  };
@@ -56,6 +66,15 @@ class TodoTaskAddCommand extends GraphCommand_1.default {
56
66
  }
57
67
  });
58
68
  }
69
+ getDateTimeTimeZone(dateTime) {
70
+ if (!dateTime) {
71
+ return undefined;
72
+ }
73
+ return {
74
+ dateTime: dateTime,
75
+ timeZone: 'Etc/GMT'
76
+ };
77
+ }
59
78
  getTodoListId(args) {
60
79
  if (args.options.listId) {
61
80
  return Promise.resolve(args.options.listId);
@@ -81,7 +100,12 @@ _TodoTaskAddCommand_instances = new WeakSet(), _TodoTaskAddCommand_initTelemetry
81
100
  this.telemetry.push((args) => {
82
101
  Object.assign(this.telemetryProperties, {
83
102
  listId: typeof args.options.listId !== 'undefined',
84
- listName: typeof args.options.listName !== 'undefined'
103
+ listName: typeof args.options.listName !== 'undefined',
104
+ bodyContent: typeof args.options.bodyContent !== 'undefined',
105
+ bodyContentType: args.options.bodyContentType,
106
+ dueDateTime: typeof args.options.dueDateTime !== 'undefined',
107
+ importance: args.options.importance,
108
+ reminderDateTime: typeof args.options.reminderDateTime !== 'undefined'
85
109
  });
86
110
  });
87
111
  }, _TodoTaskAddCommand_initOptions = function _TodoTaskAddCommand_initOptions() {
@@ -91,7 +115,35 @@ _TodoTaskAddCommand_instances = new WeakSet(), _TodoTaskAddCommand_initTelemetry
91
115
  option: '--listName [listName]'
92
116
  }, {
93
117
  option: '--listId [listId]'
118
+ }, {
119
+ option: '--bodyContent [bodyContent]'
120
+ }, {
121
+ option: '--bodyContentType [bodyContentType]',
122
+ autocomplete: ['text', 'html']
123
+ }, {
124
+ option: '--dueDateTime [dueDateTime]'
125
+ }, {
126
+ option: '--importance [importance]',
127
+ autocomplete: ['low', 'normal', 'high']
128
+ }, {
129
+ option: '--reminderDateTime [reminderDateTime]'
94
130
  });
131
+ }, _TodoTaskAddCommand_initValidators = function _TodoTaskAddCommand_initValidators() {
132
+ this.validators.push((args) => __awaiter(this, void 0, void 0, function* () {
133
+ if (args.options.bodyContentType && ['text', 'html'].indexOf(args.options.bodyContentType.toLowerCase()) === -1) {
134
+ return `'${args.options.bodyContentType}' is not a valid value for the bodyContentType option. Allowed values are text|html`;
135
+ }
136
+ if (args.options.importance && ['low', 'normal', 'high'].indexOf(args.options.importance.toLowerCase()) === -1) {
137
+ return `'${args.options.importance}' is not a valid value for the importance option. Allowed values are low|normal|high`;
138
+ }
139
+ if (args.options.dueDateTime && !validation_1.validation.isValidISODateTime(args.options.dueDateTime)) {
140
+ return `'${args.options.dueDateTime}' is not a valid ISO date string`;
141
+ }
142
+ if (args.options.reminderDateTime && !validation_1.validation.isValidISODateTime(args.options.reminderDateTime)) {
143
+ return `'${args.options.reminderDateTime}' is not a valid ISO date string`;
144
+ }
145
+ return true;
146
+ }));
95
147
  }, _TodoTaskAddCommand_initOptionSets = function _TodoTaskAddCommand_initOptionSets() {
96
148
  this.optionSets.push(['listId', 'listName']);
97
149
  };
@@ -0,0 +1,19 @@
1
+ ## Available settings
2
+
3
+ Following is the list of configuration settings available in CLI for Microsoft 365.
4
+
5
+ Setting name|Definition|Default value
6
+ ------------|----------|-------------
7
+ `autoOpenBrowserOnLogin`|Automatically open the browser to the Azure AD login page after running `m365 login` command in device code mode. This setting will be replaced by `autoOpenLinksInBrowser` in the next major release.|`false`
8
+ `autoOpenLinksInBrowser`|Automatically open the browser for all commands which return a url and expect the user to copy paste this to the browser. For example when logging in, using `m365 login` in device code mode. This setting will replace `autoOpenBrowserOnLogin` in the next major release.|`false`
9
+ `copyDeviceCodeToClipboard`|Automatically copy the device code to the clipboard when running `m365 login` command in device code mode|`false`
10
+ `csvEscape`|Single character used for escaping; only apply to characters matching the quote and the escape options|`"`
11
+ `csvHeader`|Display the column names on the first line|`true`
12
+ `csvQuote`|The quote characters surrounding a field. An empty quote value will preserve the original field, whether it contains quotation marks or not.|` `
13
+ `csvQuoted`|Quote all the non-empty fields even if not required|`false`
14
+ `csvQuotedEmpty`|Quote empty strings and overrides quoted_string on empty strings when defined|`false`
15
+ `errorOutput`|Defines if errors should be written to `stdout` or `stderr`|`stderr`
16
+ `output`|Defines the default output when issuing a command|`json`
17
+ `printErrorsAsPlainText`|When output mode is set to `json`, print error messages as plain-text rather than JSON|`true`
18
+ `prompt`|Prompts for missing values in required options|`false`
19
+ `showHelpOnFailure`|Automatically display help when executing a command failed|`true`
@@ -43,6 +43,9 @@ m365 outlook sendmail [options]
43
43
  `--importance [importance]`
44
44
  : The importance of the message. Available options: `low`, `normal` or `high`. Default is `normal`.
45
45
 
46
+ `--attachment [attachment]`
47
+ : Path to the file that will be added as attachment to the email. This option can be used multiple times to attach multiple attachments.
48
+
46
49
  `--saveToSentItems [saveToSentItems]`
47
50
  : Save email in the sent items folder. Default `true`.
48
51
 
@@ -50,6 +53,10 @@ m365 outlook sendmail [options]
50
53
 
51
54
  ## Remarks
52
55
 
56
+ ### Attachments
57
+
58
+ When using the `attachment` option, note that the total size of all attachment files cannot exceed 3 MB.
59
+
53
60
  ### If you are connected using app only authentication
54
61
 
55
62
  - Always specify a user id or upn in the `--sender` option. The email will be sent as if it came from the specified user, and can optionally be saved in the sent folder of that user account.
@@ -116,3 +123,9 @@ Send an email with cc and bcc recipients marked as important
116
123
  ```sh
117
124
  m365 outlook mail send --to chris@contoso.com --cc claire@contoso.com --bcc randy@contoso.com --subject "DG2000 Data Sheets" --bodyContents "The latest data sheets are in the team site" --importance high
118
125
  ```
126
+
127
+ Send an email with multiple attachments
128
+
129
+ ```sh
130
+ m365 outlook mail send --to chris@contoso.com --subject "Monthly reports" --bodyContents "Here are the reports of this month." --attachment "C:/Reports/File1.jpg" --attachment "C:/Reports/File2.docx" --attachment "C:/Reports/File3.xlsx"
131
+ ```
@@ -46,3 +46,32 @@ Adds a Microsoft Planner bucket with the name _My Planner Bucket_ for plan with
46
46
  ```sh
47
47
  m365 planner bucket add --name "My Planner Bucket" --planTitle "My Planner Plan" --ownerGroupName "My Planner Group"
48
48
  ```
49
+
50
+ ## Response
51
+
52
+ === "JSON"
53
+
54
+ ``` json
55
+ {
56
+ "name": "My Planner Bucket",
57
+ "planId": "xqQg5FS2LkCp935s-FIFm2QAFkHM",
58
+ "orderHint": "8585363889524958496",
59
+ "id": "ttEB_Uj690STdR3GC1MIDZgANq1U"
60
+ }
61
+ ```
62
+
63
+ === "Text"
64
+
65
+ ``` text
66
+ id : ttEB_Uj690STdR3GC1MIDZgANq1U
67
+ name : My Planner Bucket
68
+ orderHint: 8585363889524958496
69
+ planId : xqQg5FS2LkCp935s-FIFm2QAFkHM
70
+ ```
71
+
72
+ === "CSV"
73
+
74
+ ``` text
75
+ id,name,planId,orderHint
76
+ ttEB_Uj690STdR3GC1MIDZgANq1U,My Planner Bucket,xqQg5FS2LkCp935s-FIFm2QAFkHM,8585363889524958496
77
+ ```
@@ -58,3 +58,32 @@ Gets the Microsoft Planner bucket in the Plan _My Plan_ owned by groupId ee0f40f
58
58
  ```sh
59
59
  m365 planner bucket get --name "Planner Bucket A" --planTitle "My Plan" --ownerGroupId "ee0f40fc-b2f7-45c7-b62d-11b90dd2ea8e"
60
60
  ```
61
+
62
+ ## Response
63
+
64
+ === "JSON"
65
+
66
+ ``` json
67
+ {
68
+ "name": "My Planner Bucket",
69
+ "planId": "xqQg5FS2LkCp935s-FIFm2QAFkHM",
70
+ "orderHint": "8585363889524958496",
71
+ "id": "ttEB_Uj690STdR3GC1MIDZgANq1U"
72
+ }
73
+ ```
74
+
75
+ === "Text"
76
+
77
+ ``` text
78
+ id : ttEB_Uj690STdR3GC1MIDZgANq1U
79
+ name : My Planner Bucket
80
+ orderHint: 8585363889524958496
81
+ planId : xqQg5FS2LkCp935s-FIFm2QAFkHM
82
+ ```
83
+
84
+ === "CSV"
85
+
86
+ ``` text
87
+ id,name,planId,orderHint
88
+ ttEB_Uj690STdR3GC1MIDZgANq1U,My Planner Bucket,xqQg5FS2LkCp935s-FIFm2QAFkHM,8585363889524958496
89
+ ```
@@ -40,3 +40,33 @@ Lists the Microsoft Planner buckets in the Plan _My Plan_ owned by group _My Gro
40
40
  ```sh
41
41
  m365 planner bucket list --planTitle "My Plan" --ownerGroupName "My Group"
42
42
  ```
43
+
44
+ ## Response
45
+
46
+ === "JSON"
47
+
48
+ ``` json
49
+ [
50
+ {
51
+ "name": "My Planner Bucket",
52
+ "planId": "xqQg5FS2LkCp935s-FIFm2QAFkHM",
53
+ "orderHint": "8585363889524958496",
54
+ "id": "ttEB_Uj690STdR3GC1MIDZgANq1U"
55
+ }
56
+ ]
57
+ ```
58
+
59
+ === "Text"
60
+
61
+ ``` text
62
+ id name planId orderHint
63
+ ---------------------------- ----------------- ---------------------------- -------------------
64
+ ttEB_Uj690STdR3GC1MIDZgANq1U My Planner Bucket xqQg5FS2LkCp935s-FIFm2QAFkHM 8585363889524958496
65
+ ```
66
+
67
+ === "CSV"
68
+
69
+ ``` CSV
70
+ id,name,planId,orderHint
71
+ ttEB_Uj690STdR3GC1MIDZgANq1U,My Planner Bucket,xqQg5FS2LkCp935s-FIFm2QAFkHM,8585363889524958496
72
+ ```
@@ -61,3 +61,7 @@ Removes the Microsoft Planner bucket with name _My Bucket_ in the Plan _My Plan_
61
61
  ```sh
62
62
  m365 planner bucket remove --name "My Bucket" --planTitle "My Plan" --ownerGroupName "My Group"
63
63
  ```
64
+
65
+ ## Response
66
+
67
+ The command won't return a response on success.
@@ -58,3 +58,7 @@ Updates the Microsoft Planner bucket named _My Bucket_ in the Plan _My Plan_ own
58
58
  ```sh
59
59
  m365 planner bucket set --name "My Bucket" --planTitle "My Plan" --ownerGroupId 00000000-0000-0000-0000-000000000000 --newName "New bucket name"
60
60
  ```
61
+
62
+ ## Response
63
+
64
+ The command won't return a response on success.
@@ -50,3 +50,126 @@ Adds a Microsoft Planner plan with the name _My Planner Plan_ for Group _My Plan
50
50
  ```sh
51
51
  m365 planner plan add --title 'My Planner Plan' --ownerGroupName 'My Planner Group' --shareWithUserNames 'Allan.Carroll@contoso.com,Ida.Stevens@contoso.com'
52
52
  ```
53
+
54
+ ## Response
55
+
56
+ ### Standard response
57
+
58
+ === "JSON"
59
+
60
+ ``` json
61
+ {
62
+ "createdDateTime": "2015-03-30T18:36:49.2407981Z",
63
+ "owner": "ebf3b108-5234-4e22-b93d-656d7dae5874",
64
+ "title": "My Planner Plan",
65
+ "id": "xqQg5FS2LkCp935s-FIFm2QAFkHM",
66
+ "createdBy": {
67
+ "user": {
68
+ "displayName": null,
69
+ "id": "95e27074-6c4a-447a-aa24-9d718a0b86fa"
70
+ },
71
+ "application": {
72
+ "displayName": null,
73
+ "id": "ebf3b108-5234-4e22-b93d-656d7dae5874"
74
+ }
75
+ },
76
+ "container": {
77
+ "containerId": "ebf3b108-5234-4e22-b93d-656d7dae5874",
78
+ "type": "group",
79
+ "url": "https://graph.microsoft.com/v1.0/groups/ebf3b108-5234-4e22-b93d-656d7dae5874"
80
+ }
81
+ }
82
+ ```
83
+
84
+ === "Text"
85
+
86
+ ``` text
87
+ createdDateTime: 2015-03-30T18:36:49.2407981Z
88
+ id : xqQg5FS2LkCp935s-FIFm2QAFkHM
89
+ owner : ebf3b108-5234-4e22-b93d-656d7dae5874
90
+ title : My Planner Plan
91
+ ```
92
+
93
+ === "CSV"
94
+
95
+ ``` text
96
+ id,title,createdDateTime,owner
97
+ xqQg5FS2LkCp935s-FIFm2QAFkHM,My Planner Plan,2015-03-30T18:36:49.2407981Z,ebf3b108-5234-4e22-b93d-656d7dae5874
98
+ ```
99
+
100
+ ### `shareWithUserIds`, `shareWithUserNames` response
101
+
102
+ When we make use of the option `shareWithUserIds` or `shareWithUserNames` the response will differ.
103
+
104
+ === "JSON"
105
+
106
+ ``` json
107
+ {
108
+ "createdDateTime": "2015-03-30T18:36:49.2407981Z",
109
+ "owner": "ebf3b108-5234-4e22-b93d-656d7dae5874",
110
+ "title": "My Planner Plan",
111
+ "id": "xqQg5FS2LkCp935s-FIFm2QAFkHM",
112
+ "createdBy": {
113
+ "user": {
114
+ "displayName": null,
115
+ "id": "95e27074-6c4a-447a-aa24-9d718a0b86fa"
116
+ },
117
+ "application": {
118
+ "displayName": null,
119
+ "id": "ebf3b108-5234-4e22-b93d-656d7dae5874"
120
+ }
121
+ },
122
+ "container": {
123
+ "containerId": "ebf3b108-5234-4e22-b93d-656d7dae5874",
124
+ "type": "group",
125
+ "url": "https://graph.microsoft.com/v1.0/groups/ebf3b108-5234-4e22-b93d-656d7dae5874"
126
+ },
127
+ "sharedWith": {
128
+ "ebf3b108-5234-4e22-b93d-656d7dae5874": true,
129
+ "6463a5ce-2119-4198-9f2a-628761df4a62": true
130
+ },
131
+ "categoryDescriptions": {
132
+ "category1": null,
133
+ "category2": null,
134
+ "category3": null,
135
+ "category4": null,
136
+ "category5": null,
137
+ "category6": null,
138
+ "category7": null,
139
+ "category8": null,
140
+ "category9": null,
141
+ "category10": null,
142
+ "category11": null,
143
+ "category12": null,
144
+ "category13": null,
145
+ "category14": null,
146
+ "category15": null,
147
+ "category16": null,
148
+ "category17": null,
149
+ "category18": null,
150
+ "category19": null,
151
+ "category20": null,
152
+ "category21": null,
153
+ "category22": null,
154
+ "category23": null,
155
+ "category24": null,
156
+ "category25": null
157
+ }
158
+ }
159
+ ```
160
+
161
+ === "Text"
162
+
163
+ ``` text
164
+ createdDateTime: 2015-03-30T18:36:49.2407981Z
165
+ id : xqQg5FS2LkCp935s-FIFm2QAFkHM
166
+ owner : ebf3b108-5234-4e22-b93d-656d7dae5874
167
+ title : My Planner Plan
168
+ ```
169
+
170
+ === "CSV"
171
+
172
+ ``` text
173
+ id,title,createdDateTime,owner
174
+ xqQg5FS2LkCp935s-FIFm2QAFkHM,My Planner Plan,2015-03-30T18:36:49.2407981Z,ebf3b108-5234-4e22-b93d-656d7dae5874
175
+ ```