@pnp/cli-microsoft365 6.11.0-beta.7edcad2 → 6.11.0-beta.ee225fb

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 (28) hide show
  1. package/dist/m365/cli/commands/config/config-list.js +29 -0
  2. package/dist/m365/cli/commands.js +1 -0
  3. package/dist/m365/planner/commands/bucket/bucket-add.js +2 -2
  4. package/dist/m365/planner/commands/bucket/bucket-get.js +2 -2
  5. package/dist/m365/planner/commands/bucket/bucket-list.js +2 -2
  6. package/dist/m365/planner/commands/bucket/bucket-remove.js +2 -2
  7. package/dist/m365/planner/commands/bucket/bucket-set.js +2 -2
  8. package/dist/m365/planner/commands/plan/plan-get.js +1 -2
  9. package/dist/m365/planner/commands/plan/plan-list.js +4 -5
  10. package/dist/m365/planner/commands/plan/plan-set.js +2 -2
  11. package/dist/m365/spo/commands/navigation/navigation-node-set.js +2 -2
  12. package/dist/utils/planner.js +6 -3
  13. package/docs/docs/cmd/aad/user/user-set.mdx +1 -1
  14. package/docs/docs/cmd/cli/config/config-list.mdx +78 -0
  15. package/docs/docs/cmd/flow/flow-enable.mdx +2 -2
  16. package/docs/docs/cmd/login.mdx +6 -0
  17. package/docs/docs/cmd/pp/dataverse/dataverse-table-get.mdx +2 -2
  18. package/docs/docs/cmd/pp/dataverse/dataverse-table-list.mdx +2 -2
  19. package/docs/docs/cmd/pp/dataverse/dataverse-table-remove.mdx +3 -3
  20. package/docs/docs/cmd/spo/listitem/listitem-attachment-list.mdx +1 -1
  21. package/docs/docs/cmd/spo/tenant/tenant-applicationcustomizer-add.mdx +1 -1
  22. package/docs/docs/cmd/spo/tenant/tenant-applicationcustomizer-list.mdx +1 -1
  23. package/docs/docs/cmd/spo/tenant/tenant-applicationcustomizer-remove.mdx +1 -1
  24. package/docs/docs/cmd/spo/tenant/tenant-commandset-add.mdx +1 -1
  25. package/docs/docs/cmd/spo/tenant/tenant-commandset-remove.mdx +1 -1
  26. package/docs/docs/cmd/spo/tenant/tenant-commandset-set.mdx +1 -1
  27. package/docs/docs/cmd/yammer/network/network-list.mdx +1 -1
  28. package/package.json +1 -1
@@ -0,0 +1,29 @@
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
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ const Cli_1 = require("../../../../cli/Cli");
13
+ const AnonymousCommand_1 = require("../../../base/AnonymousCommand");
14
+ const commands_1 = require("../../commands");
15
+ class CliConfigListCommand extends AnonymousCommand_1.default {
16
+ get name() {
17
+ return commands_1.default.CONFIG_LIST;
18
+ }
19
+ get description() {
20
+ return 'List all self set CLI for Microsoft 365 configurations';
21
+ }
22
+ commandAction(logger) {
23
+ return __awaiter(this, void 0, void 0, function* () {
24
+ logger.log(Cli_1.Cli.getInstance().config.all);
25
+ });
26
+ }
27
+ }
28
+ module.exports = new CliConfigListCommand();
29
+ //# sourceMappingURL=config-list.js.map
@@ -8,6 +8,7 @@ exports.default = {
8
8
  COMPLETION_SH_SETUP: `${prefix} completion sh setup`,
9
9
  COMPLETION_SH_UPDATE: `${prefix} completion sh update`,
10
10
  CONFIG_GET: `${prefix} config get`,
11
+ CONFIG_LIST: `${prefix} config list`,
11
12
  CONFIG_RESET: `${prefix} config reset`,
12
13
  CONFIG_SET: `${prefix} config set`,
13
14
  CONSENT: `${prefix} consent`,
@@ -73,8 +73,8 @@ class PlannerBucketAddCommand extends GraphCommand_1.default {
73
73
  const plan = yield planner_1.planner.getPlanByTitle(args.options.planTitle, groupId);
74
74
  return plan.id;
75
75
  }
76
- const plans = yield planner_1.planner.getPlansByRosterId(args.options.rosterId);
77
- return plans[0].id;
76
+ const plan = yield planner_1.planner.getPlanByRosterId(args.options.rosterId);
77
+ return plan.id;
78
78
  });
79
79
  }
80
80
  getGroupId(args) {
@@ -84,8 +84,8 @@ class PlannerBucketGetCommand extends GraphCommand_1.default {
84
84
  const plan = yield planner_1.planner.getPlanByTitle(planTitle, groupId);
85
85
  return plan.id;
86
86
  }
87
- const plans = yield planner_1.planner.getPlansByRosterId(rosterId);
88
- return plans[0].id;
87
+ const plan = yield planner_1.planner.getPlanByRosterId(rosterId);
88
+ return plan.id;
89
89
  });
90
90
  }
91
91
  getBucketById(id) {
@@ -61,8 +61,8 @@ class PlannerBucketListCommand extends GraphCommand_1.default {
61
61
  const plan = yield planner_1.planner.getPlanByTitle(args.options.planTitle, groupId);
62
62
  return plan.id;
63
63
  }
64
- const plans = yield planner_1.planner.getPlansByRosterId(args.options.rosterId);
65
- return plans[0].id;
64
+ const plan = yield planner_1.planner.getPlanByRosterId(args.options.rosterId);
65
+ return plan.id;
66
66
  });
67
67
  }
68
68
  getGroupId(args) {
@@ -114,8 +114,8 @@ class PlannerBucketRemoveCommand extends GraphCommand_1.default {
114
114
  const plan = yield planner_1.planner.getPlanByTitle(planTitle, groupId);
115
115
  return plan.id;
116
116
  }
117
- const plans = yield planner_1.planner.getPlansByRosterId(rosterId);
118
- return plans[0].id;
117
+ const plan = yield planner_1.planner.getPlanByRosterId(rosterId);
118
+ return plan.id;
119
119
  });
120
120
  }
121
121
  getGroupId(args) {
@@ -105,8 +105,8 @@ class PlannerBucketSetCommand extends GraphCommand_1.default {
105
105
  const plan = yield planner_1.planner.getPlanByTitle(planTitle, groupId);
106
106
  return plan.id;
107
107
  }
108
- const plans = yield planner_1.planner.getPlansByRosterId(rosterId);
109
- return plans[0].id;
108
+ const plan = yield planner_1.planner.getPlanByRosterId(rosterId);
109
+ return plan.id;
110
110
  });
111
111
  }
112
112
  getGroupId(args) {
@@ -50,8 +50,7 @@ class PlannerPlanGetCommand extends GraphCommand_1.default {
50
50
  else {
51
51
  let plan = {};
52
52
  if (args.options.rosterId) {
53
- const plans = yield planner_1.planner.getPlansByRosterId(args.options.rosterId);
54
- plan = plans[0];
53
+ plan = yield planner_1.planner.getPlanByRosterId(args.options.rosterId);
55
54
  }
56
55
  else {
57
56
  let groupId = undefined;
@@ -41,17 +41,16 @@ class PlannerPlanListCommand extends GraphCommand_1.default {
41
41
  commandAction(logger, args) {
42
42
  return __awaiter(this, void 0, void 0, function* () {
43
43
  try {
44
- let plannerPlans = null;
44
+ let plannerPlans = [];
45
45
  if (args.options.ownerGroupId || args.options.ownerGroupName) {
46
46
  const groupId = yield this.getGroupId(args);
47
47
  plannerPlans = yield planner_1.planner.getPlansByGroupId(groupId);
48
48
  }
49
49
  else {
50
- plannerPlans = yield planner_1.planner.getPlansByRosterId(args.options.rosterId);
51
- }
52
- if (plannerPlans && plannerPlans.length > 0) {
53
- logger.log(plannerPlans);
50
+ const plan = yield planner_1.planner.getPlanByRosterId(args.options.rosterId);
51
+ plannerPlans.push(plan);
54
52
  }
53
+ logger.log(plannerPlans);
55
54
  }
56
55
  catch (err) {
57
56
  this.handleRejectedODataJsonPromise(err);
@@ -61,8 +61,8 @@ class PlannerPlanSetCommand extends GraphCommand_1.default {
61
61
  }
62
62
  let groupId = '';
63
63
  if (args.options.rosterId) {
64
- const plans = yield planner_1.planner.getPlansByRosterId(args.options.rosterId);
65
- return plans[0].id;
64
+ const plan = yield planner_1.planner.getPlanByRosterId(args.options.rosterId);
65
+ return plan.id;
66
66
  }
67
67
  else {
68
68
  groupId = yield this.getGroupId(args);
@@ -132,8 +132,8 @@ _SpoNavigationNodeSetCommand_instances = new WeakSet(), _SpoNavigationNodeSetCom
132
132
  if (isValidSharePointUrl !== true) {
133
133
  return isValidSharePointUrl;
134
134
  }
135
- if (args.options.audienceIds === undefined && !args.options.url && args.options.isExternal === undefined && !args.options.title && args.options.openInNewWindow === undefined) {
136
- return `Please specify atleast one property to update.`;
135
+ if (args.options.audienceIds === undefined && args.options.url === undefined && args.options.isExternal === undefined && !args.options.title && args.options.openInNewWindow === undefined) {
136
+ return `Please specify at least one property to update.`;
137
137
  }
138
138
  if (args.options.audienceIds) {
139
139
  const audienceIdsSplitted = args.options.audienceIds.split(',');
@@ -45,11 +45,14 @@ exports.planner = {
45
45
  return odata_1.odata.getAllItems(`${graphResource}/v1.0/groups/${groupId}/planner/plans`, metadata);
46
46
  },
47
47
  /**
48
- * Get all Planner plans for a specific roster.
48
+ * Get the Planner plan for a specific Roster.
49
49
  * @param rosterId Roster ID.
50
50
  */
51
- getPlansByRosterId(rosterId, metadata = 'none') {
52
- return odata_1.odata.getAllItems(`${graphResource}/beta/planner/rosters/${rosterId}/plans`, metadata);
51
+ getPlanByRosterId(rosterId, metadata = 'none') {
52
+ return __awaiter(this, void 0, void 0, function* () {
53
+ const plans = yield odata_1.odata.getAllItems(`${graphResource}/beta/planner/rosters/${rosterId}/plans`, metadata);
54
+ return plans[0];
55
+ });
53
56
  },
54
57
  /**
55
58
  * Get Planner plan by title in a specific group.
@@ -87,7 +87,7 @@ If the user with the specified ID or username doesn't exist, or if the specified
87
87
  Update specific property _department_ of user with id _1caf7dcd-7e83-4c3a-94f7-932a1299c844_
88
88
 
89
89
  ```sh
90
- m365 aad user set --objectId 1caf7dcd-7e83-4c3a-94f7-932a1299c844 --Department IT
90
+ m365 aad user set --objectId 1caf7dcd-7e83-4c3a-94f7-932a1299c844 --department IT
91
91
  ```
92
92
 
93
93
  Update multiple properties of user by name
@@ -0,0 +1,78 @@
1
+ import CLISettings from '/docs/_clisettings.mdx';
2
+ import Global from '/docs/cmd/_global.mdx';
3
+ import Tabs from '@theme/Tabs';
4
+ import TabItem from '@theme/TabItem';
5
+
6
+ # cli config list
7
+
8
+ List all self set CLI for Microsoft 365 configurations
9
+
10
+ ## Usage
11
+
12
+ ```sh
13
+ m365 cli config list [options]
14
+ ```
15
+
16
+ ## Options
17
+
18
+ <Global />
19
+
20
+ ## Available settings
21
+
22
+ Following is the list of configuration settings available in CLI for Microsoft 365.
23
+
24
+ <CLISettings />
25
+
26
+ ## Examples
27
+
28
+ List all self set configuration keys with their value
29
+
30
+ ```sh
31
+ m365 cli config list
32
+ ```
33
+
34
+ ## Response
35
+
36
+ <Tabs>
37
+ <TabItem value="JSON">
38
+
39
+ ```json
40
+ {
41
+ "errorOutput": "stdout"
42
+ }
43
+ ```
44
+
45
+ </TabItem>
46
+ <TabItem value="Text">
47
+
48
+ ```text
49
+ errorOutput: stdout
50
+ ```
51
+
52
+ </TabItem>
53
+ <TabItem value="CSV">
54
+
55
+ ```csv
56
+ errorOutput
57
+ stdout
58
+ ```
59
+
60
+ </TabItem>
61
+ <TabItem value="Markdown">
62
+
63
+ ```md
64
+ # cli config list
65
+
66
+ Date: 29/6/2023
67
+
68
+ Property | Value
69
+ ---------|-------
70
+ errorOutput | stdout
71
+ ```
72
+
73
+ </TabItem>
74
+ </Tabs>
75
+
76
+ ## More information
77
+
78
+ - [Configuring the CLI for Microsoft 365](../../../user-guide/configuring-cli.mdx)
@@ -44,13 +44,13 @@ If the Power Automate flow with the name you specified doesn't exist, you will g
44
44
  Enables Power Automate flow owned by the currently signed-in user
45
45
 
46
46
  ```sh
47
- m365 flow enable --environment Default-d87a7535-dd31-4437-bfe1-95340acd55c5 --name 3989cb59-ce1a-4a5c-bb78-257c5c39381d
47
+ m365 flow enable --environmentName Default-d87a7535-dd31-4437-bfe1-95340acd55c5 --name 3989cb59-ce1a-4a5c-bb78-257c5c39381d
48
48
  ```
49
49
 
50
50
  Enables Power Automate flow owned by another user
51
51
 
52
52
  ```sh
53
- m365 flow enable --environment Default-d87a7535-dd31-4437-bfe1-95340acd55c5 --name 3989cb59-ce1a-4a5c-bb78-257c5c39381d --asAdmin
53
+ m365 flow enable --environmentName Default-d87a7535-dd31-4437-bfe1-95340acd55c5 --name 3989cb59-ce1a-4a5c-bb78-257c5c39381d --asAdmin
54
54
  ```
55
55
 
56
56
  ## Response
@@ -157,6 +157,12 @@ Log in to Microsoft 365 using your own Azure AD application that's restricted on
157
157
  m365 login --appId 31359c7f-bd7e-475c-86db-fdb8c937548c --tenant 31359c7f-bd7e-475c-86db-fdb8c937548a
158
158
  ```
159
159
 
160
+ Log in to Microsoft 365 using your own Azure AD application and a personal information exchange (.pfx) file
161
+
162
+ ```sh
163
+ m365 login --authType certificate --appId 31359c7f-bd7e-475c-86db-fdb8c937548c --tenant 31359c7f-bd7e-475c-86db-fdb8c937548a --certificateFile /Users/user/dev/localhost.pfx --password 'pass@word1'
164
+ ```
165
+
160
166
  Log in to Microsoft 365 using the interactive browser authentication. Uses the identity of the current user.
161
167
 
162
168
  ```sh
@@ -32,13 +32,13 @@ m365 pp dataverse table get [options]
32
32
  List a table for the given environment
33
33
 
34
34
  ```sh
35
- m365 pp dataverse table get -e "Default-2ca3eaa5-140f-4175-8261-3272edf9f339" --name "aaduser"
35
+ m365 pp dataverse table get --environment "Default-2ca3eaa5-140f-4175-8261-3272edf9f339" --name "aaduser"
36
36
  ```
37
37
 
38
38
  List a table for the given environment as Admin
39
39
 
40
40
  ```sh
41
- m365 pp dataverse table get -e "Default-2ca3eaa5-140f-4175-8261-3272edf9f339" --name "aaduser" --asAdmin
41
+ m365 pp dataverse table get --environment "Default-2ca3eaa5-140f-4175-8261-3272edf9f339" --name "aaduser" --asAdmin
42
42
  ```
43
43
 
44
44
  ## Response
@@ -29,13 +29,13 @@ m365 pp dataverse table list [options]
29
29
  List all tables for the given environment
30
30
 
31
31
  ```sh
32
- m365 pp dataverse table list -e "Default-2ca3eaa5-140f-4175-8261-3272edf9f339"
32
+ m365 pp dataverse table list --environment "Default-2ca3eaa5-140f-4175-8261-3272edf9f339"
33
33
  ```
34
34
 
35
35
  List all tables for the given environment as Admin
36
36
 
37
37
  ```sh
38
- m365 pp dataverse table list -e "Default-2ca3eaa5-140f-4175-8261-3272edf9f339" --asAdmin
38
+ m365 pp dataverse table list --environment "Default-2ca3eaa5-140f-4175-8261-3272edf9f339" --asAdmin
39
39
  ```
40
40
 
41
41
  ## Response
@@ -33,19 +33,19 @@ m365 pp dataverse table remove [options]
33
33
  Removes a dataverse table in a given environment
34
34
 
35
35
  ```sh
36
- m365 pp dataverse table remove -e "Default-2ca3eaa5-140f-4175-8261-3272edf9f339" --name "aaduser"
36
+ m365 pp dataverse table remove --environment "Default-2ca3eaa5-140f-4175-8261-3272edf9f339" --name "aaduser"
37
37
  ```
38
38
 
39
39
  Removes a dataverse table in a given environment as Admin
40
40
 
41
41
  ```sh
42
- m365 pp dataverse table remove -e "Default-2ca3eaa5-140f-4175-8261-3272edf9f339" --name "aaduser" --asAdmin
42
+ m365 pp dataverse table remove --environment "Default-2ca3eaa5-140f-4175-8261-3272edf9f339" --name "aaduser" --asAdmin
43
43
  ```
44
44
 
45
45
  Removes a dataverse table in a given environment without prompting for confirmation
46
46
 
47
47
  ```sh
48
- m365 pp dataverse table remove -e "Default-2ca3eaa5-140f-4175-8261-3272edf9f339" --name "aaduser" --confirm
48
+ m365 pp dataverse table remove --environment "Default-2ca3eaa5-140f-4175-8261-3272edf9f339" --name "aaduser" --confirm
49
49
  ```
50
50
 
51
51
  ## Response
@@ -28,7 +28,7 @@ m365 spo listitem attachment list [options]
28
28
  : Server- or site-relative URL of the list. Specify either `listTitle`, `listId` or `listUrl`
29
29
 
30
30
  `--itemId <itemId>`
31
- : ID of the list item to in question
31
+ : ID of the list item
32
32
  ```
33
33
 
34
34
  <Global />
@@ -2,7 +2,7 @@ import Global from '/docs/cmd/_global.mdx';
2
2
 
3
3
  # spo tenant applicationcustomizer add
4
4
 
5
- Add an application customizer as a tenant wide extension.
5
+ Add an application customizer as a tenant wide extension
6
6
 
7
7
  ## Usage
8
8
 
@@ -4,7 +4,7 @@ import TabItem from '@theme/TabItem';
4
4
 
5
5
  # spo tenant applicationcustomizer list
6
6
 
7
- Retrieves a list of application customizers that are installed tenant-wide.
7
+ Retrieves a list of application customizers that are installed tenant-wide
8
8
 
9
9
  ## Usage
10
10
 
@@ -2,7 +2,7 @@ import Global from '/docs/cmd/_global.mdx';
2
2
 
3
3
  # spo tenant applicationcustomizer remove
4
4
 
5
- Removes an application customizer that is installed tenant wide.
5
+ Removes an application customizer that is installed tenant wide
6
6
 
7
7
  ## Usage
8
8
 
@@ -4,7 +4,7 @@ import TabItem from '@theme/TabItem';
4
4
 
5
5
  # spo tenant commandset add
6
6
 
7
- Add a ListView Command Set as a tenant-wide extension.
7
+ Add a ListView Command Set as a tenant-wide extension
8
8
 
9
9
  ## Usage
10
10
 
@@ -2,7 +2,7 @@ import Global from '/docs/cmd/_global.mdx';
2
2
 
3
3
  # spo tenant commandset remove
4
4
 
5
- Removes a ListView Command Set that is installed tenant wide.
5
+ Removes a ListView Command Set that is installed tenant wide
6
6
 
7
7
  ## Usage
8
8
 
@@ -2,7 +2,7 @@ import Global from '/docs/cmd/_global.mdx';
2
2
 
3
3
  # spo tenant commandset set
4
4
 
5
- Updates a ListView Command Set that is installed tenant wide.
5
+ Updates a ListView Command Set that is installed tenant wide
6
6
 
7
7
  ## Usage
8
8
 
@@ -2,7 +2,7 @@ import Global from '/docs/cmd/_global.mdx';
2
2
  import Tabs from '@theme/Tabs';
3
3
  import TabItem from '@theme/TabItem';
4
4
 
5
- # Yammer network list
5
+ # yammer network list
6
6
 
7
7
  Returns a list of networks to which the current user has access
8
8
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pnp/cli-microsoft365",
3
- "version": "6.11.0-beta.7edcad2",
3
+ "version": "6.11.0-beta.ee225fb",
4
4
  "description": "Manage Microsoft 365 and SharePoint Framework projects on any platform",
5
5
  "license": "MIT",
6
6
  "main": "./dist/api.js",