@pnp/cli-microsoft365 6.0.0-beta.c32757e → 6.0.0-beta.f73c4f8

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 (34) hide show
  1. package/dist/m365/planner/commands/bucket/bucket-add.js +17 -9
  2. package/dist/m365/planner/commands/bucket/bucket-get.js +19 -11
  3. package/dist/m365/planner/commands/bucket/bucket-list.js +17 -9
  4. package/dist/m365/planner/commands/bucket/bucket-remove.js +19 -11
  5. package/dist/m365/planner/commands/bucket/bucket-set.js +19 -11
  6. package/dist/m365/planner/commands/plan/plan-get.js +1 -1
  7. package/dist/m365/planner/commands/plan/plan-remove.js +1 -1
  8. package/dist/m365/planner/commands/task/task-add.js +15 -9
  9. package/dist/m365/planner/commands/task/task-get.js +14 -9
  10. package/dist/m365/planner/commands/task/task-list.js +19 -11
  11. package/dist/m365/planner/commands/task/task-remove.js +4 -19
  12. package/dist/m365/planner/commands/task/task-set.js +15 -9
  13. package/dist/m365/search/commands/externalconnection/externalconnection-get.js +69 -0
  14. package/dist/m365/search/commands.js +1 -0
  15. package/dist/m365/spo/base-permissions.js +9 -0
  16. package/dist/m365/spo/commands/hubsite/hubsite-get.js +62 -12
  17. package/dist/m365/spo/commands/roledefinition/RoleDefinition.js +3 -0
  18. package/dist/m365/spo/commands/roledefinition/RoleType.js +16 -0
  19. package/dist/m365/spo/commands/roledefinition/roledefinition-get.js +59 -0
  20. package/dist/m365/spo/commands.js +1 -0
  21. package/dist/utils/planner.js +6 -6
  22. package/docs/docs/cmd/planner/bucket/bucket-add.md +9 -6
  23. package/docs/docs/cmd/planner/bucket/bucket-get.md +10 -7
  24. package/docs/docs/cmd/planner/bucket/bucket-list.md +8 -5
  25. package/docs/docs/cmd/planner/bucket/bucket-remove.md +8 -5
  26. package/docs/docs/cmd/planner/bucket/bucket-set.md +9 -6
  27. package/docs/docs/cmd/planner/task/task-add.md +11 -8
  28. package/docs/docs/cmd/planner/task/task-get.md +11 -8
  29. package/docs/docs/cmd/planner/task/task-list.md +9 -6
  30. package/docs/docs/cmd/planner/task/task-set.md +9 -6
  31. package/docs/docs/cmd/search/externalconnection/externalconnection-get.md +33 -0
  32. package/docs/docs/cmd/spo/hubsite/hubsite-get.md +19 -8
  33. package/docs/docs/cmd/spo/roledefinition/roledefinition-get.md +27 -0
  34. package/package.json +1 -1
@@ -24,6 +24,7 @@ class PlannerTaskSetCommand extends GraphCommand_1.default {
24
24
  telemetryProps.title = typeof args.options.title !== 'undefined';
25
25
  telemetryProps.planId = typeof args.options.planId !== 'undefined';
26
26
  telemetryProps.planName = typeof args.options.planName !== 'undefined';
27
+ telemetryProps.planTitle = typeof args.options.planTitle !== 'undefined';
27
28
  telemetryProps.ownerGroupId = typeof args.options.ownerGroupId !== 'undefined';
28
29
  telemetryProps.ownerGroupName = typeof args.options.ownerGroupName !== 'undefined';
29
30
  telemetryProps.bucketId = typeof args.options.bucketId !== 'undefined';
@@ -41,6 +42,10 @@ class PlannerTaskSetCommand extends GraphCommand_1.default {
41
42
  return telemetryProps;
42
43
  }
43
44
  commandAction(logger, args, cb) {
45
+ if (args.options.planName) {
46
+ args.options.planTitle = args.options.planName;
47
+ this.warn(logger, `Option 'planName' is deprecated. Please use 'planTitle' instead`);
48
+ }
44
49
  if (utils_1.accessToken.isAppOnlyAccessToken(Auth_1.default.service.accessTokens[this.resource].accessToken)) {
45
50
  this.handleError('This command does not support application permissions.', logger, cb);
46
51
  return;
@@ -214,7 +219,7 @@ class PlannerTaskSetCommand extends GraphCommand_1.default {
214
219
  }
215
220
  return this
216
221
  .getGroupId(options)
217
- .then((groupId) => planner_1.planner.getPlanByName(options.planName, groupId))
222
+ .then((groupId) => planner_1.planner.getPlanByTitle(options.planTitle, groupId))
218
223
  .then(plan => plan.id);
219
224
  }
220
225
  getGroupId(options) {
@@ -265,6 +270,7 @@ class PlannerTaskSetCommand extends GraphCommand_1.default {
265
270
  { option: '-t, --title [title]' },
266
271
  { option: '--planId [planId]' },
267
272
  { option: '--planName [planName]' },
273
+ { option: '--planTitle [planTitle]' },
268
274
  { option: '--ownerGroupId [ownerGroupId]' },
269
275
  { option: '--ownerGroupName [ownerGroupName]' },
270
276
  { option: '--bucketId [bucketId]' },
@@ -287,17 +293,17 @@ class PlannerTaskSetCommand extends GraphCommand_1.default {
287
293
  if (args.options.bucketId && args.options.bucketName) {
288
294
  return 'Specify either bucketId or bucketName but not both';
289
295
  }
290
- if (args.options.bucketName && !args.options.planId && !args.options.planName) {
291
- return 'Specify either planId or planName when using bucketName';
296
+ if (args.options.bucketName && !args.options.planId && !args.options.planName && !args.options.planTitle) {
297
+ return 'Specify either planId or planTitle when using bucketName';
292
298
  }
293
- if (args.options.bucketName && args.options.planId && args.options.planName) {
294
- return 'Specify either planId or planName when using bucketName but not both';
299
+ if (args.options.bucketName && args.options.planId && (args.options.planName || args.options.planTitle)) {
300
+ return 'Specify either planId or planTitle when using bucketName but not both';
295
301
  }
296
- if (args.options.planName && !args.options.ownerGroupId && !args.options.ownerGroupName) {
297
- return 'Specify either ownerGroupId or ownerGroupName when using planName';
302
+ if ((args.options.planName || args.options.planTitle) && !args.options.ownerGroupId && !args.options.ownerGroupName) {
303
+ return 'Specify either ownerGroupId or ownerGroupName when using planTitle';
298
304
  }
299
- if (args.options.planName && args.options.ownerGroupId && args.options.ownerGroupName) {
300
- return 'Specify either ownerGroupId or ownerGroupName when using planName but not both';
305
+ if ((args.options.planName || args.options.planTitle) && args.options.ownerGroupId && args.options.ownerGroupName) {
306
+ return 'Specify either ownerGroupId or ownerGroupName when using planTitle but not both';
301
307
  }
302
308
  if (args.options.ownerGroupId && !utils_1.validation.isValidGuid(args.options.ownerGroupId)) {
303
309
  return `${args.options.ownerGroupId} is not a valid GUID`;
@@ -0,0 +1,69 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const request_1 = require("../../../../request");
4
+ const GraphCommand_1 = require("../../../base/GraphCommand");
5
+ const commands_1 = require("../../commands");
6
+ class SearchExternalConnectionGetCommand extends GraphCommand_1.default {
7
+ get name() {
8
+ return commands_1.default.EXTERNALCONNECTION_GET;
9
+ }
10
+ get description() {
11
+ return 'Get a specific external connection for use in Microsoft Search';
12
+ }
13
+ getTelemetryProperties(args) {
14
+ const telemetryProps = super.getTelemetryProperties(args);
15
+ telemetryProps.id = typeof args.options.id !== 'undefined';
16
+ telemetryProps.name = typeof args.options.name !== 'undefined';
17
+ return telemetryProps;
18
+ }
19
+ commandAction(logger, args, cb) {
20
+ let url = `${this.resource}/v1.0/external/connections`;
21
+ if (args.options.id) {
22
+ url += `/${encodeURIComponent(args.options.id)}`;
23
+ }
24
+ else {
25
+ url += `?$filter=name eq '${encodeURIComponent(args.options.name)}'`;
26
+ }
27
+ const requestOptions = {
28
+ url: url,
29
+ headers: {
30
+ accept: 'application/json;odata.metadata=none'
31
+ },
32
+ responseType: 'json'
33
+ };
34
+ request_1.default
35
+ .get(requestOptions)
36
+ .then((res) => {
37
+ if (args.options.name) {
38
+ if (res.value.length === 0) {
39
+ return Promise.reject(`External connection with name '${args.options.name}' not found`);
40
+ }
41
+ res = res.value[0];
42
+ }
43
+ return Promise.resolve(res);
44
+ })
45
+ .then(res => {
46
+ logger.log(res);
47
+ cb();
48
+ }, (err) => this.handleRejectedODataJsonPromise(err, logger, cb));
49
+ }
50
+ optionSets() {
51
+ return [
52
+ ['id', 'name']
53
+ ];
54
+ }
55
+ options() {
56
+ const options = [
57
+ {
58
+ option: '-i, --id [id]'
59
+ },
60
+ {
61
+ option: '-n, --name [name]'
62
+ }
63
+ ];
64
+ const parentOptions = super.options();
65
+ return options.concat(parentOptions);
66
+ }
67
+ }
68
+ module.exports = new SearchExternalConnectionGetCommand();
69
+ //# sourceMappingURL=externalconnection-get.js.map
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const prefix = 'search';
4
4
  exports.default = {
5
5
  EXTERNALCONNECTION_ADD: `${prefix} externalconnection add`,
6
+ EXTERNALCONNECTION_GET: `${prefix} externalconnection get`,
6
7
  EXTERNALCONNECTION_LIST: `${prefix} externalconnection list`
7
8
  };
8
9
  //# sourceMappingURL=commands.js.map
@@ -22,6 +22,15 @@ class BasePermissions {
22
22
  set low(value) {
23
23
  this._low = value;
24
24
  }
25
+ parse() {
26
+ const result = [];
27
+ for (const permissionKind in PermissionKind) {
28
+ if (this.has(PermissionKind[permissionKind])) {
29
+ result.push(permissionKind);
30
+ }
31
+ }
32
+ return result;
33
+ }
25
34
  has(perm) {
26
35
  let hasPermission = false;
27
36
  if (perm === PermissionKind.FullMask) {
@@ -11,37 +11,87 @@ class SpoHubSiteGetCommand extends SpoCommand_1.default {
11
11
  get description() {
12
12
  return 'Gets information about the specified hub site';
13
13
  }
14
+ getTelemetryProperties(args) {
15
+ const telemetryProps = super.getTelemetryProperties(args);
16
+ telemetryProps.id = typeof args.options.id !== 'undefined';
17
+ telemetryProps.title = typeof args.options.title !== 'undefined';
18
+ telemetryProps.url = typeof args.options.url !== 'undefined';
19
+ return telemetryProps;
20
+ }
14
21
  commandAction(logger, args, cb) {
15
22
  utils_1.spo
16
23
  .getSpoUrl(logger, this.debug)
17
24
  .then((spoUrl) => {
18
- const requestOptions = {
19
- url: `${spoUrl}/_api/hubsites/getbyid('${encodeURIComponent(args.options.id)}')`,
20
- headers: {
21
- accept: 'application/json;odata=nometadata'
22
- },
23
- responseType: 'json'
24
- };
25
- return request_1.default.get(requestOptions);
25
+ if (args.options.id) {
26
+ return this.getHubSiteById(spoUrl, args.options);
27
+ }
28
+ else {
29
+ return this.getHubSite(spoUrl, args.options);
30
+ }
26
31
  })
27
32
  .then((res) => {
28
33
  logger.log(res);
29
34
  cb();
30
35
  }, (err) => this.handleRejectedODataJsonPromise(err, logger, cb));
31
36
  }
37
+ getHubSiteById(spoUrl, options) {
38
+ const requestOptions = {
39
+ url: `${spoUrl}/_api/hubsites/getbyid('${options.id}')`,
40
+ headers: {
41
+ accept: 'application/json;odata=nometadata'
42
+ },
43
+ responseType: 'json'
44
+ };
45
+ return request_1.default.get(requestOptions);
46
+ }
47
+ getHubSite(spoUrl, options) {
48
+ const requestOptions = {
49
+ url: `${spoUrl}/_api/hubsites`,
50
+ headers: {
51
+ accept: 'application/json;odata=nometadata'
52
+ },
53
+ responseType: 'json'
54
+ };
55
+ return request_1.default
56
+ .get(requestOptions)
57
+ .then((response) => {
58
+ let hubSites = response.value;
59
+ if (options.title) {
60
+ hubSites = hubSites.filter(site => site.Title.toLocaleLowerCase() === options.title.toLocaleLowerCase());
61
+ }
62
+ else if (options.url) {
63
+ hubSites = hubSites.filter(site => site.SiteUrl.toLocaleLowerCase() === options.url.toLocaleLowerCase());
64
+ }
65
+ if (hubSites.length === 0) {
66
+ return Promise.reject(`The specified hub site ${options.title || options.url} does not exist`);
67
+ }
68
+ if (hubSites.length > 1) {
69
+ return Promise.reject(`Multiple hub sites with ${options.title || options.url} found. Please disambiguate: ${hubSites.map(site => site.SiteUrl).join(', ')}`);
70
+ }
71
+ return hubSites[0];
72
+ });
73
+ }
32
74
  options() {
33
75
  const options = [
34
- {
35
- option: '-i, --id <id>'
36
- }
76
+ { option: '-i, --id [id]' },
77
+ { option: '-t, --title [title]' },
78
+ { option: '-u, --url [url]' }
37
79
  ];
38
80
  const parentOptions = super.options();
39
81
  return options.concat(parentOptions);
40
82
  }
83
+ optionSets() {
84
+ return [
85
+ ['id', 'title', 'url']
86
+ ];
87
+ }
41
88
  validate(args) {
42
- if (!utils_1.validation.isValidGuid(args.options.id)) {
89
+ if (args.options.id && !utils_1.validation.isValidGuid(args.options.id)) {
43
90
  return `${args.options.id} is not a valid GUID`;
44
91
  }
92
+ if (args.options.url) {
93
+ return utils_1.validation.isValidSharePointUrl(args.options.url);
94
+ }
45
95
  return true;
46
96
  }
47
97
  }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=RoleDefinition.js.map
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.RoleType = void 0;
4
+ var RoleType;
5
+ (function (RoleType) {
6
+ RoleType[RoleType["None"] = 0] = "None";
7
+ RoleType[RoleType["Guest"] = 1] = "Guest";
8
+ RoleType[RoleType["Reader"] = 2] = "Reader";
9
+ RoleType[RoleType["Contributor"] = 3] = "Contributor";
10
+ RoleType[RoleType["WebDesigner"] = 4] = "WebDesigner";
11
+ RoleType[RoleType["Administrator"] = 5] = "Administrator";
12
+ RoleType[RoleType["Editor"] = 6] = "Editor";
13
+ RoleType[RoleType["Reviewer"] = 7] = "Reviewer";
14
+ RoleType[RoleType["System"] = 8] = "System";
15
+ })(RoleType = exports.RoleType || (exports.RoleType = {}));
16
+ //# sourceMappingURL=RoleType.js.map
@@ -0,0 +1,59 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const request_1 = require("../../../../request");
4
+ const utils_1 = require("../../../../utils");
5
+ const SpoCommand_1 = require("../../../base/SpoCommand");
6
+ const base_permissions_1 = require("../../base-permissions");
7
+ const commands_1 = require("../../commands");
8
+ const RoleType_1 = require("./RoleType");
9
+ class SpoRoleDefinitionGetCommand extends SpoCommand_1.default {
10
+ get name() {
11
+ return commands_1.default.ROLEDEFINITION_GET;
12
+ }
13
+ get description() {
14
+ return 'Gets specified role definition from web by id';
15
+ }
16
+ commandAction(logger, args, cb) {
17
+ if (this.verbose) {
18
+ logger.logToStderr(`Getting role definition from ${args.options.webUrl}...`);
19
+ }
20
+ const requestOptions = {
21
+ url: `${args.options.webUrl}/_api/web/roledefinitions(${args.options.id})`,
22
+ headers: {
23
+ 'accept': 'application/json;odata=nometadata'
24
+ },
25
+ responseType: 'json'
26
+ };
27
+ request_1.default
28
+ .get(requestOptions)
29
+ .then((response) => {
30
+ const permissions = new base_permissions_1.BasePermissions();
31
+ permissions.high = response.BasePermissions.High;
32
+ permissions.low = response.BasePermissions.Low;
33
+ response.BasePermissionsValue = permissions.parse();
34
+ response.RoleTypeKindValue = RoleType_1.RoleType[response.RoleTypeKind];
35
+ logger.log(response);
36
+ cb();
37
+ }, (err) => this.handleRejectedODataJsonPromise(err, logger, cb));
38
+ }
39
+ options() {
40
+ const options = [
41
+ {
42
+ option: '-u, --webUrl <webUrl>'
43
+ },
44
+ {
45
+ option: '-i, --id <id>'
46
+ }
47
+ ];
48
+ const parentOptions = super.options();
49
+ return options.concat(parentOptions);
50
+ }
51
+ validate(args) {
52
+ if (isNaN(args.options.id)) {
53
+ return `${args.options.id} is not a number`;
54
+ }
55
+ return utils_1.validation.isValidSharePointUrl(args.options.webUrl);
56
+ }
57
+ }
58
+ module.exports = new SpoRoleDefinitionGetCommand();
59
+ //# sourceMappingURL=roledefinition-get.js.map
@@ -167,6 +167,7 @@ exports.default = {
167
167
  REPORT_SITEUSAGEPAGES: `${prefix} report siteusagepages`,
168
168
  REPORT_SITEUSAGESITECOUNTS: `${prefix} report siteusagesitecounts`,
169
169
  REPORT_SITEUSAGESTORAGE: `${prefix} report siteusagestorage`,
170
+ ROLEDEFINITION_GET: `${prefix} roledefinition get`,
170
171
  ROLEDEFINITION_LIST: `${prefix} roledefinition list`,
171
172
  ROLEDEFINITION_REMOVE: `${prefix} roledefinition remove`,
172
173
  SEARCH: `${prefix} search`,
@@ -45,19 +45,19 @@ exports.planner = {
45
45
  return odata_1.odata.getAllItems(`${graphResource}/v1.0/groups/${groupId}/planner/plans`, 'none');
46
46
  },
47
47
  /**
48
- * Get Planner plan by name in a specific group.
49
- * @param name Name of the Planner plan. Case insensitive.
48
+ * Get Planner plan by title in a specific group.
49
+ * @param title Title of the Planner plan. Case insensitive.
50
50
  * @param groupId Owner group ID .
51
51
  */
52
- getPlanByName(name, groupId) {
52
+ getPlanByTitle(title, groupId) {
53
53
  return __awaiter(this, void 0, void 0, function* () {
54
54
  const plans = yield this.getPlansByGroupId(groupId);
55
- const filteredPlans = plans.filter(p => p.title && p.title.toLowerCase() === name.toLowerCase());
55
+ const filteredPlans = plans.filter(p => p.title && p.title.toLowerCase() === title.toLowerCase());
56
56
  if (!filteredPlans.length) {
57
- throw Error(`The specified plan '${name}' does not exist.`);
57
+ throw Error(`The specified plan '${title}' does not exist.`);
58
58
  }
59
59
  if (filteredPlans.length > 1) {
60
- throw Error(`Multiple plans with name '${name}' found: ${filteredPlans.map(x => x.id)}.`);
60
+ throw Error(`Multiple plans with title '${title}' found: ${filteredPlans.map(x => x.id)}.`);
61
61
  }
62
62
  return filteredPlans[0];
63
63
  });
@@ -14,16 +14,19 @@ m365 planner bucket add [options]
14
14
  : Name of the bucket to add.
15
15
 
16
16
  `--planId [planId]`
17
- : Plan ID to which the bucket belongs. Specify either `planId` or `planName` but not both.
17
+ : ID of the plan to which the bucket belongs. Specify either `planId` or `planTitle` but not both.
18
+
19
+ `--planTitle [planTitle]`
20
+ : Title of the plan to which the bucket belongs. Specify either `planId` or `planTitle` but not both.
18
21
 
19
22
  `--planName [planName]`
20
- : Plan Name to which the bucket belongs. Specify either `planId` or `planName` but not both.
23
+ : (deprecated. Use `planTitle` instead) Title of the plan to which the bucket belongs.
21
24
 
22
25
  `--ownerGroupId [ownerGroupId]`
23
- : ID of the group to which the plan belongs. Specify `ownerGroupId` or `ownerGroupName` when using `planName`.
26
+ : ID of the group to which the plan belongs. Specify `ownerGroupId` or `ownerGroupName` when using `planTitle`.
24
27
 
25
28
  `--ownerGroupName [ownerGroupName]`
26
- : Name of the group to which the plan belongs. Specify `ownerGroupId` or `ownerGroupName` when using `planName`.
29
+ : Name of the group to which the plan belongs. Specify `ownerGroupId` or `ownerGroupName` when using `planTitle`.
27
30
 
28
31
  `--orderHint [orderHint]`
29
32
  : Hint used to order items of this type in a list view. The format is defined as outlined [here](https://docs.microsoft.com/en-us/graph/api/resources/planner-order-hint-format?view=graph-rest-1.0).
@@ -38,8 +41,8 @@ Adds a Microsoft Planner bucket with the name _My Planner Bucket_ for plan with
38
41
  m365 planner bucket add --name "My Planner Bucket" --planId "xqQg5FS2LkCp935s-FIFm2QAFkHM" --orderHint " !"
39
42
  ```
40
43
 
41
- Adds a Microsoft Planner bucket with the name _My Planner Bucket_ for plan with the name _My Planner Plan_ owned by group _My Planner Group_
44
+ Adds a Microsoft Planner bucket with the name _My Planner Bucket_ for plan with the title _My Planner Plan_ owned by group _My Planner Group_
42
45
 
43
46
  ```sh
44
- m365 planner bucket add --name "My Planner Bucket" --planName "My Planner Plan" --ownerGroupName "My Planner Group"
47
+ m365 planner bucket add --name "My Planner Bucket" --planTitle "My Planner Plan" --ownerGroupName "My Planner Group"
45
48
  ```
@@ -17,16 +17,19 @@ m365 planner bucket get [options]
17
17
  : Name of the bucket to retrieve details. Specify either `id` or `name` but not both.
18
18
 
19
19
  `--planId [planId]`
20
- : Plan ID to which the bucket belongs. Specify either `planId` or `planName` when using `name`.
20
+ : ID of the plan to which the bucket belongs. Specify either `planId` or `planTitle` when using `name`.
21
+
22
+ `--planTitle [planTitle]`
23
+ : Title of the plan to which the bucket belongs. Specify either `planId` or `planTitle` when using `name`.
21
24
 
22
25
  `--planName [planName]`
23
- : Plan Name to which the bucket belongs. Specify either `planId` or `planName` when using `name`.
26
+ : (deprecated. Use `planTitle` instead) Title of the plan to which the bucket belongs.
24
27
 
25
28
  `--ownerGroupId [ownerGroupId]`
26
- : ID of the group to which the plan belongs. Specify `ownerGroupId` or `ownerGroupName` when using `planName`.
29
+ : ID of the group to which the plan belongs. Specify `ownerGroupId` or `ownerGroupName` when using `planTitle`.
27
30
 
28
31
  `--ownerGroupName [ownerGroupName]`
29
- : Name of the group to which the plan belongs. Specify `ownerGroupId` or `ownerGroupName` when using `planName`.
32
+ : Name of the group to which the plan belongs. Specify `ownerGroupId` or `ownerGroupName` when using `planTitle`.
30
33
 
31
34
  --8<-- "docs/cmd/_global.md"
32
35
 
@@ -47,11 +50,11 @@ m365 planner bucket get --name "Planner Bucket A" --planId "xqQg5FS2LkCp935s-FIF
47
50
  Gets the Microsoft Planner bucket in the Plan _My Plan_ owned by group _My Group_
48
51
 
49
52
  ```sh
50
- m365 planner bucket get --name "Planner Bucket A" --planName "My Plan" --ownerGroupName "My Group"
53
+ m365 planner bucket get --name "Planner Bucket A" --planTitle "My Plan" --ownerGroupName "My Group"
51
54
  ```
52
55
 
53
56
  Gets the Microsoft Planner bucket in the Plan _My Plan_ owned by groupId ee0f40fc-b2f7-45c7-b62d-11b90dd2ea8e
54
57
 
55
58
  ```sh
56
- m365 planner bucket get --name "Planner Bucket A" --planName "My Plan" --ownerGroupId "ee0f40fc-b2f7-45c7-b62d-11b90dd2ea8e"
57
- ```
59
+ m365 planner bucket get --name "Planner Bucket A" --planTitle "My Plan" --ownerGroupId "ee0f40fc-b2f7-45c7-b62d-11b90dd2ea8e"
60
+ ```
@@ -11,16 +11,19 @@ m365 planner bucket list [options]
11
11
  ## Options
12
12
 
13
13
  `--planId [planId]`
14
- : ID of the plan to list the buckets of. Specify either `planId` or `planName` but not both.
14
+ : ID of the plan to list the buckets of. Specify either `planId` or `planTitle` but not both.
15
+
16
+ `--planTitle [planTitle]`
17
+ : Title of the plan to list the buckets of. Specify either `planId` or `planTitle` but not both.
15
18
 
16
19
  `--planName [planName]`
17
- : Name of the plan to list the buckets of. Specify either `planId` or `planName` but not both.
20
+ : (deprecated. Use `planTitle` instead) Title of the plan to which the bucket belongs.
18
21
 
19
22
  `--ownerGroupId [ownerGroupId]`
20
- : ID of the group to which the plan belongs. Specify `ownerGroupId` or `ownerGroupName` when using `planName`.
23
+ : ID of the group to which the plan belongs. Specify `ownerGroupId` or `ownerGroupName` when using `planTitle`.
21
24
 
22
25
  `--ownerGroupName [ownerGroupName]`
23
- : Name of the group to which the plan belongs. Specify `ownerGroupId` or `ownerGroupName` when using `planName`.
26
+ : Name of the group to which the plan belongs. Specify `ownerGroupId` or `ownerGroupName` when using `planTitle`.
24
27
 
25
28
  --8<-- "docs/cmd/_global.md"
26
29
 
@@ -35,5 +38,5 @@ m365 planner bucket list --planId "xqQg5FS2LkCp935s-FIFm2QAFkHM"
35
38
  Lists the Microsoft Planner buckets in the Plan _My Plan_ owned by group _My Group_
36
39
 
37
40
  ```sh
38
- m365 planner bucket list --planName "My Plan" --ownerGroupName "My Group"
41
+ m365 planner bucket list --planTitle "My Plan" --ownerGroupName "My Group"
39
42
  ```
@@ -17,16 +17,19 @@ m365 planner bucket remove [options]
17
17
  : Name of the bucket to remove. Specify either `id` or `name` but not both.
18
18
 
19
19
  `--planId [planId]`
20
- : ID of the plan to which the bucket to remove belongs. Specify either `planId` or `planName` when using `name`.
20
+ : ID of the plan to which the bucket to remove belongs. Specify either `planId` or `planTitle` when using `name`.
21
+
22
+ `--planTitle [planTitle]`
23
+ : Title of the plan to which the bucket to remove belongs. Specify either `planId` or `planTitle` when using `name`.
21
24
 
22
25
  `--planName [planName]`
23
- : Name of the plan to which the bucket to remove belongs. Specify either `planId` or `planName` when using `name`.
26
+ : (deprecated. Use `planTitle` instead) Title of the plan to which the bucket belongs.
24
27
 
25
28
  `--ownerGroupId [ownerGroupId]`
26
- : ID of the group to which the plan belongs. Specify either `ownerGroupId` or `ownerGroupName` when using `planName`.
29
+ : ID of the group to which the plan belongs. Specify either `ownerGroupId` or `ownerGroupName` when using `planTitle`.
27
30
 
28
31
  `--ownerGroupName [ownerGroupName]`
29
- : Name of the group to which the plan belongs. Specify either `ownerGroupId` or `ownerGroupName` when using `planName`.
32
+ : Name of the group to which the plan belongs. Specify either `ownerGroupId` or `ownerGroupName` when using `planTitle`.
30
33
 
31
34
  `--confirm`
32
35
  : Don't prompt for confirmation
@@ -56,5 +59,5 @@ m365 planner bucket remove --name "My Bucket" --planId "oUHpnKBFekqfGE_PS6GGUZcA
56
59
  Removes the Microsoft Planner bucket with name _My Bucket_ in the Plan _My Plan_ owned by group _My Group_
57
60
 
58
61
  ```sh
59
- m365 planner bucket remove --name "My Bucket" --planName "My Plan" --ownerGroupName "My Group"
62
+ m365 planner bucket remove --name "My Bucket" --planTitle "My Plan" --ownerGroupName "My Group"
60
63
  ```
@@ -17,16 +17,19 @@ m365 planner bucket set [options]
17
17
  : Name of the bucket. Specify either `id` or `name` but not both.
18
18
 
19
19
  `--planId [planId]`
20
- : ID of the plan to update the bucket of. Specify either `planId` or `planName` when using `name`.
20
+ : ID of the plan to update the bucket of. Specify either `planId` or `planTitle` when using `name`.
21
+
22
+ `--planTitle [planTitle]`
23
+ : Title of the plan to update the bucket of. Specify either `planId` or `planTitle` when using `name`. Always use in combination with either `ownerGroupId` or `ownerGroupName`.
21
24
 
22
25
  `--planName [planName]`
23
- : Name of the plan to update the bucket of. Specify either `planId` or `planName` when using `name`. Always use in combination with either `ownerGroupId` or `ownerGroupName`.
26
+ : (deprecated. Use `planTitle` instead) Title of the plan to which the bucket belongs.
24
27
 
25
28
  `--ownerGroupId [ownerGroupId]`
26
- : ID of the group to which the plan belongs. Specify `ownerGroupId` or `ownerGroupName` when using `planName`.
29
+ : ID of the group to which the plan belongs. Specify `ownerGroupId` or `ownerGroupName` when using `planTitle`.
27
30
 
28
31
  `--ownerGroupName [ownerGroupName]`
29
- : Name of the group to which the plan belongs. Specify `ownerGroupId` or `ownerGroupName` when using `planName`.
32
+ : Name of the group to which the plan belongs. Specify `ownerGroupId` or `ownerGroupName` when using `planTitle`.
30
33
 
31
34
  `--newName [newName]`
32
35
  : New name of the bucket.
@@ -47,11 +50,11 @@ m365 planner bucket set --id "vncYUXCRBke28qMLB-d4xJcACtNz" --newName "New bucke
47
50
  Updates the Microsoft Planner bucket named _My Bucket_ in the Plan _My Plan_ owned by group _My Group_
48
51
 
49
52
  ```sh
50
- m365 planner bucket set --name "My Bucket" --planName "My Plan" --ownerGroupName "My Group" --newName "New bucket name"
53
+ m365 planner bucket set --name "My Bucket" --planTitle "My Plan" --ownerGroupName "My Group" --newName "New bucket name"
51
54
  ```
52
55
 
53
56
  Updates the Microsoft Planner bucket named _My Bucket_ in the Plan _My Plan_ owned by group with ID _00000000-0000-0000-0000-000000000000_
54
57
 
55
58
  ```sh
56
- m365 planner bucket set --name "My Bucket" --planName "My Plan" --ownerGroupId 00000000-0000-0000-0000-000000000000 --newName "New bucket name"
59
+ m365 planner bucket set --name "My Bucket" --planTitle "My Plan" --ownerGroupId 00000000-0000-0000-0000-000000000000 --newName "New bucket name"
57
60
  ```
@@ -14,22 +14,25 @@ m365 planner task add [options]
14
14
  : Title of the task to add.
15
15
 
16
16
  `--planId [planId]`
17
- : Plan ID to which the task belongs. Specify either `planId` or `planName` but not both.
17
+ : ID of the plan to which the task belongs. Specify either `planId` or `planTitle` but not both.
18
+
19
+ `--planTitle [planTitle]`
20
+ : Title of the plan to which the task belongs. Specify either `planId` or `planTitle` but not both.
18
21
 
19
22
  `--planName [planName]`
20
- : Plan Name to which the task belongs. Specify either `planId` or `planName` but not both.
23
+ : (deprecated. Use `planTitle` instead) Title of the plan to which the bucket belongs.
21
24
 
22
25
  `--ownerGroupId [ownerGroupId]`
23
- : ID of the group to which the plan belongs. Specify `ownerGroupId` or `ownerGroupName` when using `planName`.
26
+ : ID of the group to which the plan belongs. Specify `ownerGroupId` or `ownerGroupName` when using `planTitle`.
24
27
 
25
28
  `--ownerGroupName [ownerGroupName]`
26
- : Name of the group to which the plan belongs. Specify `ownerGroupId` or `ownerGroupName` when using `planName`.
29
+ : Name of the group to which the plan belongs. Specify `ownerGroupId` or `ownerGroupName` when using `planTitle`.
27
30
 
28
31
  `--bucketId [bucketId]`
29
- : Bucket ID to which the task belongs. The bucket needs to exist in the selected plan. Specify either `bucketId` or `bucketName` but not both.
32
+ : ID of the bucket to which the task belongs. The bucket needs to exist in the selected plan. Specify either `bucketId` or `bucketName` but not both.
30
33
 
31
34
  `--bucketName [bucketName]`
32
- : Bucket Name to which the task belongs. The bucket needs to exist in the selected plan. Specify either `bucketId` or `bucketName` but not both.
35
+ : Name of the bucket to which the task belongs. The bucket needs to exist in the selected plan. Specify either `bucketId` or `bucketName` but not both.
33
36
 
34
37
  `--startDateTime [startDateTime]`
35
38
  : The date and time when the task started. This should be defined as a valid ISO 8601 string. `2021-12-16T18:28:48.6964197Z`
@@ -89,10 +92,10 @@ Adds a Microsoft Planner task with the name _My Planner Task_ for plan with the
89
92
  m365 planner task add --title "My Planner Task" --planId "8QZEH7b3wkSbGQobscsM5gADCBa" --bucketId "IK8tuFTwQEa5vTonM7ZMRZgAKdna"
90
93
  ```
91
94
 
92
- Adds a Completed Microsoft Planner task with the name _My Planner Task_ for plan with the name _My Planner Plan_ owned by group _My Planner Group_ and for the bucket with the ID _IK8tuFTwQEa5vTonM7ZMRZgAKdna_
95
+ 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_
93
96
 
94
97
  ```sh
95
- m365 planner task add --title "My Planner task" --planName "My Planner Plan" --ownerGroupName "My Planner Group" --bucketId "IK8tuFTwQEa5vTonM7ZMRZgAKdna" --percentComplete 100
98
+ m365 planner task add --title "My Planner task" --planTitle "My Planner Plan" --ownerGroupName "My Planner Group" --bucketId "IK8tuFTwQEa5vTonM7ZMRZgAKdna" --percentComplete 100
96
99
  ```
97
100
 
98
101
  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 the users _Allan.Carroll@contoso.com_ and _Ida.Stevens@contoso.com_ and receive a due date for _2021-12-16_
@@ -20,22 +20,25 @@ m365 planner task get [options]
20
20
  : (deprecated. Use `id` instead) ID of the task.
21
21
 
22
22
  `--bucketId [bucketId]`
23
- : Bucket ID to which the task belongs. Specify `bucketId` or `bucketName` when using `title`.
23
+ : ID of the bucket to which the task belongs. Specify `bucketId` or `bucketName` when using `title`.
24
24
 
25
25
  `--bucketName [bucketName]`
26
- : Bucket Name to which the task belongs. Specify `bucketId` or `bucketName` when using `title`.
26
+ : Name of the bucket to which the task belongs. Specify `bucketId` or `bucketName` when using `title`.
27
27
 
28
28
  `--planId [planId]`
29
- : Plan ID to which the task belongs. Specify `planId` or `planName` when using `bucketName`.
29
+ : ID of the plan to which the task belongs. Specify `planId` or `planTitle` when using `bucketName`.
30
+
31
+ `--planTitle [planTitle]`
32
+ : Title of the plan to which the task belongs. Specify `planId` or `planTitle` when using `bucketName`.
30
33
 
31
34
  `--planName [planName]`
32
- : Plan Name to which the task belongs. Specify `planId` or `planName` when using `bucketName`.
35
+ : (deprecated. Use `planTitle` instead) Title of the plan to which the bucket belongs.
33
36
 
34
37
  `--ownerGroupId [ownerGroupId]`
35
- : ID of the group to which the plan belongs. Specify `ownerGroupId` or `ownerGroupName` when using `planName`.
38
+ : ID of the group to which the plan belongs. Specify `ownerGroupId` or `ownerGroupName` when using `planTitle`.
36
39
 
37
40
  `--ownerGroupName [ownerGroupName]`
38
- : Name of the group to which the plan belongs. Specify `ownerGroupId` or `ownerGroupName` when using `planName`.
41
+ : Name of the group to which the plan belongs. Specify `ownerGroupId` or `ownerGroupName` when using `planTitle`.
39
42
 
40
43
  --8<-- "docs/cmd/_global.md"
41
44
 
@@ -47,8 +50,8 @@ Retrieve the specified planner task by id
47
50
  m365 planner task get --id "vzCcZoOv-U27PwydxHB8opcADJo-"
48
51
  ```
49
52
 
50
- Retrieve the specified planner task with the title _My Planner Task_ from the bucket named _My Planner Bucket_ based on the plan with the name _My Planner Plan_ owned by the group _My Planner Group_
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_.
51
54
 
52
55
  ```sh
53
- m365 planner task get --title "My Planner Task" --bucketName "My Planner Bucket" --planName "My Planner Plan" --ownerGroupName "My Planner Group"
56
+ m365 planner task get --title "My Planner Task" --bucketName "My Planner Bucket" --planTitle "My Planner Plan" --ownerGroupName "My Planner Group"
54
57
  ```