@pnp/cli-microsoft365 6.11.0-beta.b75e15f → 6.11.0-beta.cb74646

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 (25) hide show
  1. package/dist/m365/planner/commands/task/task-add.js +17 -11
  2. package/dist/m365/planner/commands/task/task-get.js +35 -25
  3. package/dist/m365/planner/commands/task/task-list.js +26 -19
  4. package/dist/m365/planner/commands/task/task-remove.js +40 -35
  5. package/dist/m365/planner/commands/task/task-set.js +35 -23
  6. package/dist/m365/spfx/commands/project/DeployWorkflow.js +58 -0
  7. package/dist/m365/spfx/commands/project/project-github-workflow-add.js +171 -0
  8. package/dist/m365/spfx/commands/project/project-github-workflow-model.js +3 -0
  9. package/dist/m365/spfx/commands.js +1 -0
  10. package/dist/m365/spo/commands/serviceprincipal/serviceprincipal-set.js +32 -32
  11. package/dist/m365/spo/commands/site/site-add.js +113 -154
  12. package/dist/m365/spo/commands/site/site-apppermission-add.js +26 -27
  13. package/dist/m365/spo/commands/site/site-apppermission-remove.js +37 -37
  14. package/dist/m365/spo/commands/site/site-apppermission-set.js +15 -16
  15. package/dist/m365/spo/commands/site/site-remove.js +139 -171
  16. package/dist/m365/spo/commands/site/site-set.js +134 -146
  17. package/dist/utils/fsUtil.js +5 -0
  18. package/docs/docs/cmd/planner/task/task-add.mdx +22 -7
  19. package/docs/docs/cmd/planner/task/task-get.mdx +13 -4
  20. package/docs/docs/cmd/planner/task/task-list.mdx +22 -7
  21. package/docs/docs/cmd/planner/task/task-remove.mdx +25 -8
  22. package/docs/docs/cmd/planner/task/task-set.mdx +22 -7
  23. package/docs/docs/cmd/spfx/project/project-github-workflow-add.mdx +94 -0
  24. package/npm-shrinkwrap.json +15 -1
  25. package/package.json +3 -2
@@ -93,33 +93,33 @@ class SpoSiteSetCommand extends SpoCommand_1.default {
93
93
  return request_1.default.post(requestOptions);
94
94
  }
95
95
  updateSharePointOnlySite(logger, args) {
96
- if (this.debug) {
97
- logger.logToStderr('Site is not group connected');
98
- }
99
- if (typeof args.options.isPublic !== 'undefined') {
100
- return Promise.reject(`The isPublic option can't be set on a site that is not groupified`);
101
- }
102
- return this.updateSiteDescription(logger, args)
103
- .then(_ => this.updateSiteOwners(logger, args));
96
+ return __awaiter(this, void 0, void 0, function* () {
97
+ if (this.debug) {
98
+ logger.logToStderr('Site is not group connected');
99
+ }
100
+ if (typeof args.options.isPublic !== 'undefined') {
101
+ throw `The isPublic option can't be set on a site that is not groupified`;
102
+ }
103
+ yield this.updateSiteDescription(logger, args);
104
+ yield this.updateSiteOwners(logger, args);
105
+ });
104
106
  }
105
- waitForSiteUpdateCompletion(logger, args, res) {
106
- return new Promise((resolve, reject) => {
107
- if (!res) {
108
- resolve();
107
+ waitForSiteUpdateCompletion(logger, args, response) {
108
+ return __awaiter(this, void 0, void 0, function* () {
109
+ if (!response) {
109
110
  return;
110
111
  }
111
- const json = JSON.parse(res);
112
- const response = json[0];
113
- if (response.ErrorInfo) {
114
- reject(response.ErrorInfo.ErrorMessage);
115
- }
116
- else {
117
- const operation = json[json.length - 1];
118
- const isComplete = operation.IsComplete;
119
- if (!args.options.wait || isComplete) {
120
- resolve();
121
- return;
122
- }
112
+ const json = JSON.parse(response);
113
+ const responseContent = json[0];
114
+ if (responseContent.ErrorInfo) {
115
+ throw responseContent.ErrorInfo.ErrorMessage;
116
+ }
117
+ const operation = json[json.length - 1];
118
+ const isComplete = operation.IsComplete;
119
+ if (!args.options.wait || isComplete) {
120
+ return;
121
+ }
122
+ yield new Promise((resolve, reject) => {
123
123
  setTimeout(() => {
124
124
  spo_1.spo.waitUntilFinished({
125
125
  operationId: JSON.stringify(operation._ObjectIdentity_),
@@ -132,29 +132,24 @@ class SpoSiteSetCommand extends SpoCommand_1.default {
132
132
  verbose: this.verbose
133
133
  });
134
134
  }, operation.PollingInterval);
135
- }
135
+ });
136
136
  });
137
137
  }
138
138
  updateSiteOwners(logger, args) {
139
- if (!args.options.owners) {
140
- return Promise.resolve();
141
- }
142
- return new Promise((resolve, reject) => {
139
+ return __awaiter(this, void 0, void 0, function* () {
140
+ if (!args.options.owners) {
141
+ return;
142
+ }
143
143
  if (this.verbose) {
144
144
  logger.logToStderr(`Updating site owners ${args.options.url}...`);
145
145
  }
146
- Promise.all(args.options.owners.split(',').map(o => {
146
+ yield Promise.all(args.options.owners.split(',').map(o => {
147
147
  return this.setAdmin(args.options.url, o.trim());
148
- }))
149
- .then(() => {
150
- resolve();
151
- }, (err) => {
152
- reject(err);
153
- });
148
+ }));
154
149
  });
155
150
  }
156
151
  setAdmin(siteUrl, principal) {
157
- return new Promise((resolve, reject) => {
152
+ return __awaiter(this, void 0, void 0, function* () {
158
153
  const requestOptions = {
159
154
  url: `${this.spoAdminUrl}/_vti_bin/client.svc/ProcessQuery`,
160
155
  headers: {
@@ -162,70 +157,67 @@ class SpoSiteSetCommand extends SpoCommand_1.default {
162
157
  },
163
158
  data: `<Request AddExpandoFieldTypeSuffix="true" SchemaVersion="15.0.0.0" LibraryVersion="16.0.0.0" ApplicationName="${config_1.default.applicationName}" xmlns="http://schemas.microsoft.com/sharepoint/clientquery/2009"><Actions><ObjectPath Id="48" ObjectPathId="47" /></Actions><ObjectPaths><Method Id="47" ParentId="34" Name="SetSiteAdmin"><Parameters><Parameter Type="String">${formatting_1.formatting.escapeXml(siteUrl)}</Parameter><Parameter Type="String">${formatting_1.formatting.escapeXml(principal)}</Parameter><Parameter Type="Boolean">true</Parameter></Parameters></Method><Constructor Id="34" TypeId="{268004ae-ef6b-4e9b-8425-127220d84719}" /></ObjectPaths></Request>`
164
159
  };
165
- return request_1.default.post(requestOptions)
166
- .then((res) => {
167
- const json = JSON.parse(res);
168
- const response = json[0];
169
- if (response.ErrorInfo) {
170
- reject(response.ErrorInfo.ErrorMessage);
171
- }
172
- else {
173
- resolve();
174
- }
175
- }, (err) => {
176
- reject(err);
177
- });
160
+ const response = yield request_1.default.post(requestOptions);
161
+ const json = JSON.parse(response);
162
+ const responseContent = json[0];
163
+ if (responseContent.ErrorInfo) {
164
+ throw responseContent.ErrorInfo.ErrorMessage;
165
+ }
178
166
  });
179
167
  }
180
168
  updateSiteDescription(logger, args) {
181
- if (!args.options.description) {
182
- return Promise.resolve(undefined);
183
- }
184
- if (this.verbose) {
185
- logger.logToStderr(`Setting site description ${args.options.url}...`);
186
- }
187
- const requestOptions = {
188
- url: `${args.options.url}/_api/web`,
189
- headers: {
190
- 'IF-MATCH': '*',
191
- 'Accept': 'application/json;odata=nometadata',
192
- 'content-type': 'application/json;odata=nometadata',
193
- 'X-RequestDigest': this.context.FormDigestValue,
194
- 'X-HTTP-Method': 'MERGE'
195
- },
196
- data: {
197
- Description: args.options.description
198
- },
199
- json: true
200
- };
201
- return request_1.default.post(requestOptions);
169
+ return __awaiter(this, void 0, void 0, function* () {
170
+ if (!args.options.description) {
171
+ return;
172
+ }
173
+ if (this.verbose) {
174
+ logger.logToStderr(`Setting site description ${args.options.url}...`);
175
+ }
176
+ const requestOptions = {
177
+ url: `${args.options.url}/_api/web`,
178
+ headers: {
179
+ 'IF-MATCH': '*',
180
+ 'Accept': 'application/json;odata=nometadata',
181
+ 'content-type': 'application/json;odata=nometadata',
182
+ 'X-RequestDigest': this.context.FormDigestValue,
183
+ 'X-HTTP-Method': 'MERGE'
184
+ },
185
+ data: {
186
+ Description: args.options.description
187
+ },
188
+ json: true
189
+ };
190
+ yield request_1.default.post(requestOptions);
191
+ });
202
192
  }
203
193
  updateSiteLockState(logger, args) {
204
- if (!args.options.lockState) {
205
- return Promise.resolve(undefined);
206
- }
207
- if (this.verbose) {
208
- logger.logToStderr(`Setting site lock state ${args.options.url}...`);
209
- }
210
- const requestOptions = {
211
- url: `${this.spoAdminUrl}/_vti_bin/client.svc/ProcessQuery`,
212
- headers: {
213
- 'X-RequestDigest': this.context.FormDigestValue
214
- },
215
- data: `<Request AddExpandoFieldTypeSuffix="true" SchemaVersion="15.0.0.0" LibraryVersion="16.0.0.0" ApplicationName="${config_1.default.applicationName}" xmlns="http://schemas.microsoft.com/sharepoint/clientquery/2009"><Actions><SetProperty Id="7" ObjectPathId="5" Name="LockState"><Parameter Type="String">${formatting_1.formatting.escapeXml(args.options.lockState)}</Parameter></SetProperty><ObjectPath Id="9" ObjectPathId="8" /><ObjectIdentityQuery Id="10" ObjectPathId="5" /><Query Id="11" ObjectPathId="8"><Query SelectAllProperties="true"><Properties /></Query></Query></Actions><ObjectPaths><Method Id="5" ParentId="3" Name="GetSitePropertiesByUrl"><Parameters><Parameter Type="String">${formatting_1.formatting.escapeXml(args.options.url)}</Parameter><Parameter Type="Boolean">false</Parameter></Parameters></Method><Method Id="8" ParentId="5" Name="Update" /><Constructor Id="3" TypeId="{268004ae-ef6b-4e9b-8425-127220d84719}" /></ObjectPaths></Request>`
216
- };
217
- return request_1.default.post(requestOptions);
194
+ return __awaiter(this, void 0, void 0, function* () {
195
+ if (!args.options.lockState) {
196
+ return;
197
+ }
198
+ if (this.verbose) {
199
+ logger.logToStderr(`Setting site lock state ${args.options.url}...`);
200
+ }
201
+ const requestOptions = {
202
+ url: `${this.spoAdminUrl}/_vti_bin/client.svc/ProcessQuery`,
203
+ headers: {
204
+ 'X-RequestDigest': this.context.FormDigestValue
205
+ },
206
+ data: `<Request AddExpandoFieldTypeSuffix="true" SchemaVersion="15.0.0.0" LibraryVersion="16.0.0.0" ApplicationName="${config_1.default.applicationName}" xmlns="http://schemas.microsoft.com/sharepoint/clientquery/2009"><Actions><SetProperty Id="7" ObjectPathId="5" Name="LockState"><Parameter Type="String">${formatting_1.formatting.escapeXml(args.options.lockState)}</Parameter></SetProperty><ObjectPath Id="9" ObjectPathId="8" /><ObjectIdentityQuery Id="10" ObjectPathId="5" /><Query Id="11" ObjectPathId="8"><Query SelectAllProperties="true"><Properties /></Query></Query></Actions><ObjectPaths><Method Id="5" ParentId="3" Name="GetSitePropertiesByUrl"><Parameters><Parameter Type="String">${formatting_1.formatting.escapeXml(args.options.url)}</Parameter><Parameter Type="Boolean">false</Parameter></Parameters></Method><Method Id="8" ParentId="5" Name="Update" /><Constructor Id="3" TypeId="{268004ae-ef6b-4e9b-8425-127220d84719}" /></ObjectPaths></Request>`
207
+ };
208
+ return request_1.default.post(requestOptions);
209
+ });
218
210
  }
219
211
  updateGroupConnectedSite(logger, args) {
220
- if (this.debug) {
221
- logger.logToStderr(`Site attached to group ${this.groupId}`);
222
- }
223
- return new Promise((resolve, reject) => {
212
+ return __awaiter(this, void 0, void 0, function* () {
213
+ if (this.debug) {
214
+ logger.logToStderr(`Site attached to group ${this.groupId}`);
215
+ }
224
216
  if (typeof args.options.title === 'undefined' &&
225
217
  typeof args.options.description === 'undefined' &&
226
218
  typeof args.options.isPublic === 'undefined' &&
227
219
  typeof args.options.owners === 'undefined') {
228
- return resolve();
220
+ return;
229
221
  }
230
222
  const promises = [];
231
223
  if (typeof args.options.title !== 'undefined') {
@@ -258,13 +250,7 @@ class SpoSiteSetCommand extends SpoCommand_1.default {
258
250
  promises.push(this.setGroupifiedSiteDescription(args.options.description));
259
251
  }
260
252
  promises.push(this.setGroupifiedSiteOwners(logger, args));
261
- Promise
262
- .all(promises)
263
- .then(() => {
264
- resolve();
265
- }, (error) => {
266
- reject(error);
267
- });
253
+ yield Promise.all(promises);
268
254
  });
269
255
  }
270
256
  setGroupifiedSiteDescription(description) {
@@ -280,26 +266,26 @@ class SpoSiteSetCommand extends SpoCommand_1.default {
280
266
  return request_1.default.patch(requestOptions);
281
267
  }
282
268
  setGroupifiedSiteOwners(logger, args) {
283
- if (typeof args.options.owners === 'undefined') {
284
- return Promise.resolve();
285
- }
286
- const owners = args.options.owners.split(',').map(o => o.trim());
287
- if (this.verbose) {
288
- logger.logToStderr('Retrieving user information to set group owners...');
289
- }
290
- const requestOptions = {
291
- url: `https://graph.microsoft.com/v1.0/users?$filter=${owners.map(o => `userPrincipalName eq '${o}'`).join(' or ')}&$select=id`,
292
- headers: {
293
- 'content-type': 'application/json;odata.metadata=none'
294
- },
295
- responseType: 'json'
296
- };
297
- return request_1.default.get(requestOptions)
298
- .then((res) => {
299
- if (res.value.length === 0) {
300
- return Promise.resolve();
269
+ return __awaiter(this, void 0, void 0, function* () {
270
+ if (typeof args.options.owners === 'undefined') {
271
+ return;
272
+ }
273
+ const owners = args.options.owners.split(',').map(o => o.trim());
274
+ if (this.verbose) {
275
+ logger.logToStderr('Retrieving user information to set group owners...');
301
276
  }
302
- return Promise.all(res.value.map(user => {
277
+ const requestOptions = {
278
+ url: `https://graph.microsoft.com/v1.0/users?$filter=${owners.map(o => `userPrincipalName eq '${o}'`).join(' or ')}&$select=id`,
279
+ headers: {
280
+ 'content-type': 'application/json;odata.metadata=none'
281
+ },
282
+ responseType: 'json'
283
+ };
284
+ const response = yield request_1.default.get(requestOptions);
285
+ if (response.value.length === 0) {
286
+ return;
287
+ }
288
+ yield Promise.all(response.value.map(user => {
303
289
  const requestOptions = {
304
290
  url: `${this.spoAdminUrl}/_api/SP.Directory.DirectorySession/Group('${this.groupId}')/Owners/Add(objectId='${user.id}', principalName='')`,
305
291
  headers: {
@@ -327,10 +313,9 @@ class SpoSiteSetCommand extends SpoCommand_1.default {
327
313
  }
328
314
  }
329
315
  if (!updatedProperties) {
330
- return Promise.resolve(undefined);
316
+ return;
331
317
  }
332
- const res = yield spo_1.spo.ensureFormDigest(this.spoAdminUrl, logger, this.context, this.debug);
333
- this.context = res;
318
+ this.context = yield spo_1.spo.ensureFormDigest(this.spoAdminUrl, logger, this.context, this.debug);
334
319
  if (this.verbose) {
335
320
  logger.logToStderr(`Updating site ${args.options.url} properties...`);
336
321
  }
@@ -364,6 +349,9 @@ class SpoSiteSetCommand extends SpoCommand_1.default {
364
349
  const flowsPolicy = args.options.disableFlows ? FlowsPolicy_1.FlowsPolicy.Disabled : FlowsPolicy_1.FlowsPolicy.Enabled;
365
350
  payload.push(`<SetProperty Id="${propertyId++}" ObjectPathId="5" Name="DisableFlows"><Parameter Type="Enum">${flowsPolicy}</Parameter></SetProperty>`);
366
351
  }
352
+ if (typeof args.options.socialBarOnSitePagesDisabled !== 'undefined') {
353
+ payload.push(`<SetProperty Id="${propertyId++}" ObjectPathId="5" Name="SocialBarOnSitePagesDisabled"><Parameter Type="Boolean">${args.options.socialBarOnSitePagesDisabled}</Parameter></SetProperty>`);
354
+ }
367
355
  if (args.options.shareByEmailEnabled !== undefined) {
368
356
  sitePropertiesPayload.push(`<SetProperty Id="${propertyId++}" ObjectPathId="5" Name="ShareByEmailEnabled"><Parameter Type="Boolean">${args.options.shareByEmailEnabled}</Parameter></SetProperty>`);
369
357
  }
@@ -381,7 +369,7 @@ class SpoSiteSetCommand extends SpoCommand_1.default {
381
369
  const requestOptions = {
382
370
  url: `${args.options.url}/_vti_bin/client.svc/ProcessQuery`,
383
371
  headers: {
384
- 'X-RequestDigest': res.FormDigestValue
372
+ 'X-RequestDigest': this.context.FormDigestValue
385
373
  },
386
374
  data: `<Request AddExpandoFieldTypeSuffix="true" SchemaVersion="15.0.0.0" LibraryVersion="16.0.0.0" ApplicationName="${config_1.default.applicationName}" xmlns="http://schemas.microsoft.com/sharepoint/clientquery/2009"><Actions>${sitePropertiesPayload.join('')}</Actions><ObjectPaths><StaticProperty Id="1" TypeId="{3747adcd-a3c3-41b9-bfab-4a64dd2f1e0a}" Name="Current" /><Property Id="5" ParentId="1" Name="Site" /></ObjectPaths></Request>`
387
375
  };
@@ -392,7 +380,7 @@ class SpoSiteSetCommand extends SpoCommand_1.default {
392
380
  const requestOptions = {
393
381
  url: `${this.spoAdminUrl}/_vti_bin/client.svc/ProcessQuery`,
394
382
  headers: {
395
- 'X-RequestDigest': res.FormDigestValue
383
+ 'X-RequestDigest': this.context.FormDigestValue
396
384
  },
397
385
  data: `<Request AddExpandoFieldTypeSuffix="true" SchemaVersion="15.0.0.0" LibraryVersion="16.0.0.0" ApplicationName="${config_1.default.applicationName}" xmlns="http://schemas.microsoft.com/sharepoint/clientquery/2009"><Actions>${payload.join('')}<ObjectPath Id="14" ObjectPathId="13" /><ObjectIdentityQuery Id="15" ObjectPathId="5" /><Query Id="16" ObjectPathId="13"><Query SelectAllProperties="false"><Properties><Property Name="IsComplete" ScalarProperty="true" /><Property Name="PollingInterval" ScalarProperty="true" /></Properties></Query></Query></Actions><ObjectPaths><Identity Id="5" Name="53d8499e-d0d2-5000-cb83-9ade5be42ca4|${this.tenantId.substr(pos, this.tenantId.indexOf('&') - pos)}&#xA;SiteProperties&#xA;${formatting_1.formatting.encodeQueryParameter(args.options.url)}" /><Method Id="13" ParentId="5" Name="Update" /></ObjectPaths></Request>`
398
386
  };
@@ -402,38 +390,38 @@ class SpoSiteSetCommand extends SpoCommand_1.default {
402
390
  });
403
391
  }
404
392
  applySiteDesign(logger, args) {
405
- if (typeof args.options.siteDesignId === 'undefined') {
406
- return Promise.resolve();
407
- }
408
- const options = {
409
- webUrl: args.options.url,
410
- id: args.options.siteDesignId,
411
- asTask: false,
412
- debug: this.debug,
413
- verbose: this.verbose
414
- };
415
- return Cli_1.Cli.executeCommand(spoSiteDesignApplyCommand, { options: Object.assign(Object.assign({}, options), { _: [] }) });
393
+ return __awaiter(this, void 0, void 0, function* () {
394
+ if (typeof args.options.siteDesignId === 'undefined') {
395
+ return;
396
+ }
397
+ const options = {
398
+ webUrl: args.options.url,
399
+ id: args.options.siteDesignId,
400
+ asTask: false,
401
+ debug: this.debug,
402
+ verbose: this.verbose
403
+ };
404
+ return Cli_1.Cli.executeCommand(spoSiteDesignApplyCommand, { options: Object.assign(Object.assign({}, options), { _: [] }) });
405
+ });
416
406
  }
417
407
  loadSiteIds(siteUrl, logger) {
418
- if (this.debug) {
419
- logger.logToStderr('Loading site IDs...');
420
- }
421
- const requestOptions = {
422
- url: `${siteUrl}/_api/site?$select=GroupId,Id`,
423
- headers: {
424
- accept: 'application/json;odata=nometadata'
425
- },
426
- responseType: 'json'
427
- };
428
- return request_1.default
429
- .get(requestOptions)
430
- .then((siteInfo) => {
408
+ return __awaiter(this, void 0, void 0, function* () {
409
+ if (this.debug) {
410
+ logger.logToStderr('Loading site IDs...');
411
+ }
412
+ const requestOptions = {
413
+ url: `${siteUrl}/_api/site?$select=GroupId,Id`,
414
+ headers: {
415
+ accept: 'application/json;odata=nometadata'
416
+ },
417
+ responseType: 'json'
418
+ };
419
+ const siteInfo = yield request_1.default.get(requestOptions);
431
420
  this.groupId = siteInfo.GroupId;
432
421
  this.siteId = siteInfo.Id;
433
422
  if (this.debug) {
434
423
  logger.logToStderr(`Retrieved site IDs. siteId: ${this.siteId}, groupId: ${this.groupId}`);
435
424
  }
436
- return Promise.resolve();
437
425
  });
438
426
  }
439
427
  isGroupConnectedSite() {
@@ -99,6 +99,11 @@ exports.fsUtil = {
99
99
  },
100
100
  getRemoveCommand(command, shell) {
101
101
  return removeFileCommands[shell][command];
102
+ },
103
+ ensureDirectory(path) {
104
+ if (!fs.existsSync(path)) {
105
+ fs.mkdirSync(path, { recursive: true });
106
+ }
102
107
  }
103
108
  };
104
109
  //# sourceMappingURL=fsUtil.js.map
@@ -19,10 +19,13 @@ m365 planner task add [options]
19
19
  : Title of the task to add.
20
20
 
21
21
  `--planId [planId]`
22
- : ID of the plan to which the task belongs. Specify either `planId` or `planTitle` but not both.
22
+ : ID of the plan to which the task belongs. Specify either `planId`, `planTitle`, or `rosterId` but not multiple.
23
23
 
24
24
  `--planTitle [planTitle]`
25
- : Title of the plan to which the task belongs. Specify either `planId` or `planTitle` but not both.
25
+ : Title of the plan to which the task belongs. Specify either `planId`, `planTitle`, or `rosterId` but not multiple.
26
+
27
+ `--rosterId [rosterId]`
28
+ : ID of the Planner Roster. Specify either `planId`, `planTitle`, or `rosterId` but not multiple.
26
29
 
27
30
  `--ownerGroupId [ownerGroupId]`
28
31
  : ID of the group to which the plan belongs. Specify `ownerGroupId` or `ownerGroupName` when using `planTitle`.
@@ -89,38 +92,50 @@ When you specify an integer value for `priority`, consider the following:
89
92
 
90
93
  When using `description` with a multiple lines value, use the new line character of the shell you are using to indicate line breaks. For PowerShell this is `` `n ``. For Zsh or Bash use `\n` with a `$` in front. E.g. `$"Line 1\nLine 2"`.
91
94
 
95
+ :::caution
96
+
97
+ When using `rosterId`, the command is based on an API that is currently in preview and is subject to change once the API reached general availability.
98
+
99
+ :::
100
+
92
101
  ## Examples
93
102
 
94
- Adds a Microsoft Planner task with the name _My Planner Task_ for plan with the ID _8QZEH7b3wkSbGQobscsM5gADCBa_ and for the bucket with the ID _IK8tuFTwQEa5vTonM7ZMRZgAKdna_
103
+ Adds a Microsoft Planner task with the name for plan with the specified ID and specified bucket with the ID.
95
104
 
96
105
  ```sh
97
106
  m365 planner task add --title "My Planner Task" --planId "8QZEH7b3wkSbGQobscsM5gADCBa" --bucketId "IK8tuFTwQEa5vTonM7ZMRZgAKdna"
98
107
  ```
99
108
 
100
- Adds a Completed Microsoft Planner task with the name _My Planner Task_ for plan with the title _My Planner Plan_ owned by group _My Planner Group_ and for the bucket with the ID _IK8tuFTwQEa5vTonM7ZMRZgAKdna_
109
+ Adds a Completed Microsoft Planner task with the name for plan with the specified title owned by specified group and the specified bucket with the ID.
101
110
 
102
111
  ```sh
103
112
  m365 planner task add --title "My Planner task" --planTitle "My Planner Plan" --ownerGroupName "My Planner Group" --bucketId "IK8tuFTwQEa5vTonM7ZMRZgAKdna" --percentComplete 100
104
113
  ```
105
114
 
106
- Adds a Microsoft Planner task with the name _My Planner Task_ for plan with the ID _8QZEH7b3wkbGQobscsM5gADCBa_ and for the bucket with the ID _IK8tuFTwQEa5vTonM7ZMRZgAKdna_. The new task will be assigned to several users and receive a due date for _2021-12-16_
115
+ Adds a Microsoft Planner task with the specified name for the plan with the specified ID and bucket with the ID. The new task will be assigned to the specified users and receive a specified due date.
107
116
 
108
117
  ```sh
109
118
  m365 planner task add --title "My Planner Task" --planId "8QZEH7b3wkSbGQobscsM5gADCBa" --bucketId "IK8tuFTwQEa5vTonM7ZMRZgAKdna" --assignedToUserNames "Allan.Carroll@contoso.com,Ida.Stevens@contoso.com" --dueDateTime "2021-12-16"
110
119
  ```
111
120
 
112
- Adds a Microsoft Planner task with the name _My Planner Task_ for plan with the ID _8QZEH7b3wkbGQobscsM5gADCBa_ and for the bucket with the ID _IK8tuFTwQEa5vTonM7ZMRZgAKdna_. The new task will be assigned to several users who will appear first with the asssignee priority _' !'_
121
+ Adds a Microsoft Planner task with the specified name for the plan with the specified ID and bucket with the ID. The new task will be assigned to the specified users who will appear first with the asssignee priority _' !'_
113
122
 
114
123
  ```sh
115
124
  m365 planner task add --title "My Planner Task" --planId "8QZEH7b3wkSbGQobscsM5gADCBa" --bucketId "IK8tuFTwQEa5vTonM7ZMRZgAKdna" --assignedToUserNames "Allan.Carroll@contoso.com,Ida.Stevens@contoso.com" --asssigneePriority ' !'
116
125
  ```
117
126
 
118
- Adds a Microsoft Planner task with the name _My Planner Task_ for plan with the ID _8QZEH7b3wkbGQobscsM5gADCBa_ and for the bucket with the ID _IK8tuFTwQEa5vTonM7ZMRZgAKdna_. The new task will receive the categories _category1,category3_ and get a preview with the type _noPreview_
127
+ Adds a Microsoft Planner task with the specified name for the plan with the specified ID and the bucket with the ID. The new task will receive the specified categories and get a specified preview with the type.
119
128
 
120
129
  ```sh
121
130
  m365 planner task add --title "My Planner Task" --planId "8QZEH7b3wkSbGQobscsM5gADCBa" --bucketId "IK8tuFTwQEa5vTonM7ZMRZgAKdna" --appliedCategories "category1,category3" --previewType "noPreview"
122
131
  ```
123
132
 
133
+ Adds a Microsoft Planner task with the specified name for the plan with the specified rosterId and bucket with the ID.
134
+
135
+ ```sh
136
+ m365 planner task add --title "My Planner Task" --rosterId "DjL5xiKO10qut8LQgztpKskABWna" --bucketId "IK8tuFTwQEa5vTonM7ZMRZgAKdna"
137
+ ```
138
+
124
139
  ## Response
125
140
 
126
141
  ### Standard response
@@ -28,10 +28,13 @@ m365 planner task get [options]
28
28
  : Name of the bucket to which the task belongs. Specify `bucketId` or `bucketName` when using `title`.
29
29
 
30
30
  `--planId [planId]`
31
- : ID of the plan to which the task belongs. Specify `planId` or `planTitle` when using `bucketName`.
31
+ : ID of the plan to which the task belongs. Specify either `planId`, `planTitle`, or `rosterId` when using `bucketName`.
32
32
 
33
33
  `--planTitle [planTitle]`
34
- : Title of the plan to which the task belongs. Specify `planId` or `planTitle` when using `bucketName`.
34
+ : Title of the plan to which the task belongs. Specify either `planId`, `planTitle`, or `rosterId` when using `bucketName`.
35
+
36
+ `--rosterId [rosterId]`
37
+ : ID of the Planner Roster. Specify either `planId`, `planTitle`, or `rosterId` when using `bucketName`.
35
38
 
36
39
  `--ownerGroupId [ownerGroupId]`
37
40
  : ID of the group to which the plan belongs. Specify `ownerGroupId` or `ownerGroupName` when using `planTitle`.
@@ -44,18 +47,24 @@ m365 planner task get [options]
44
47
 
45
48
  ## Examples
46
49
 
47
- Retrieve the specified planner task by id
50
+ Returns the Microsoft Planner task by id.
48
51
 
49
52
  ```sh
50
53
  m365 planner task get --id "vzCcZoOv-U27PwydxHB8opcADJo-"
51
54
  ```
52
55
 
53
- Retrieve the specified planner task with the title _My Planner Task_ from the bucket named _My Planner Bucket_. Based on the plan with the title _My Planner Plan_ owned by the group _My Planner Group_.
56
+ Retrieve the Microsoft Planner task by title from the specified bucket. Based on the specified plan with the title owned by the specified group.
54
57
 
55
58
  ```sh
56
59
  m365 planner task get --title "My Planner Task" --bucketName "My Planner Bucket" --planTitle "My Planner Plan" --ownerGroupName "My Planner Group"
57
60
  ```
58
61
 
62
+ Returns the Microsoft Planner task by rosterId from the specified bucket.
63
+
64
+ ```sh
65
+ m365 planner task get --title "New Task" --bucketName "To do" --rosterId "DjL5xiKO10qut8LQgztpKskABWna"
66
+ ```
67
+
59
68
  ## Response
60
69
 
61
70
  <Tabs>
@@ -22,10 +22,13 @@ m365 planner task list [options]
22
22
  : Name of the bucket to list the tasks of. To retrieve tasks from a bucket, specify `bucketId` or `bucketName`, but not both.
23
23
 
24
24
  `--planId [planId]`
25
- : ID of a plan to list the tasks of. To retrieve all tasks from a plan, specify either `planId` or `planTitle` but not both. Use in combination with `bucketName` to retrieve tasks from a specific bucket.
25
+ : ID of a plan to list the tasks of. To retrieve all tasks from a plan, Specify either `planId`, `planTitle`, or `rosterId` but not multiple. Use in combination with `bucketName` to retrieve tasks from a specific bucket.
26
26
 
27
27
  `--planTitle [planTitle]`
28
- : Title of a plan to list the tasks of. To retrieve all tasks from a plan, specify either `planId` or `planTitle` but not both. Always use in combination with either `ownerGroupId` or `ownerGroupName`. Use in combination with `bucketName` to retrieve tasks from a specific bucket.
28
+ : Title of a plan to list the tasks of. To retrieve all tasks from a plan, Specify either `planId`, `planTitle`, or `rosterId` but not multiple. Always use in combination with either `ownerGroupId` or `ownerGroupName`. Use in combination with `bucketName` to retrieve tasks from a specific bucket.
29
+
30
+ `--rosterId [rosterId]`
31
+ : ID of the Planner Roster. Specify either `planId`, `planTitle`, or `rosterId` but not multiple.
29
32
 
30
33
  `--ownerGroupId [ownerGroupId]`
31
34
  : ID of the group to which the plan belongs. Specify `ownerGroupId` or `ownerGroupName` when using `planTitle`.
@@ -44,6 +47,12 @@ This command uses API that is currently in preview to enrich the results with th
44
47
 
45
48
  :::
46
49
 
50
+ :::caution
51
+
52
+ When using `rosterId`, the command is based on an API that is currently in preview and is subject to change once the API reached general availability.
53
+
54
+ :::
55
+
47
56
  ## Examples
48
57
 
49
58
  List tasks for the currently logged in user
@@ -52,36 +61,42 @@ List tasks for the currently logged in user
52
61
  m365 planner task list
53
62
  ```
54
63
 
55
- List the Microsoft Planner tasks in the plan _iVPMIgdku0uFlou-KLNg6MkAE1O2_
64
+ List the Microsoft Planner tasks in the plan by id.
56
65
 
57
66
  ```sh
58
67
  m365 planner task list --planId "iVPMIgdku0uFlou-KLNg6MkAE1O2"`
59
68
  ```
60
69
 
61
- List the Microsoft Planner tasks in the plan _My Plan_ in group _My Group_
70
+ List the Microsoft Planner tasks in the specified plan by title from the specified group by name.
62
71
 
63
72
  ```sh
64
73
  m365 planner task list --planTitle "My Plan" --ownerGroupName "My Group"
65
74
  ```
66
75
 
67
- List the Microsoft Planner tasks in the bucket _FtzysDykv0-9s9toWiZhdskAD67z_
76
+ List the Microsoft Planner tasks in the bucket by id.
68
77
 
69
78
  ```sh
70
79
  m365 planner task list --bucketId "FtzysDykv0-9s9toWiZhdskAD67z"
71
80
  ```
72
81
 
73
- List the Microsoft Planner tasks in the bucket _My Bucket_ belonging to plan _iVPMIgdku0uFlou-KLNg6MkAE1O2_
82
+ List the Microsoft Planner tasks in the bucket by name belonging to plan by id.
74
83
 
75
84
  ```sh
76
85
  m365 planner task list --bucketName "My Bucket" --planId "iVPMIgdku0uFlou-KLNg6MkAE1O2"
77
86
  ```
78
87
 
79
- List the Microsoft Planner tasks in the bucket _My Bucket_ belonging to plan _My Plan_ in group _My Group_
88
+ List the Microsoft Planner tasks in the bucket by name belonging to plan by title in the specified group.
80
89
 
81
90
  ```sh
82
91
  m365 planner task list --bucketName "My Bucket" --planTitle "My Plan" --ownerGroupName "My Group"
83
92
  ```
84
93
 
94
+ List the Microsoft Planner tasks by rosterId from the specified bucket.
95
+
96
+ ```sh
97
+ m365 planner task list --bucketName "My Bucket" --rosterId "DjL5xiKO10qut8LQgztpKskABWna"
98
+ ```
99
+
85
100
  ## Response
86
101
 
87
102
  <Tabs>