@pnp/cli-microsoft365 11.2.0-beta.e0616e6 → 11.3.0-beta.ad8e99a

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 (51) hide show
  1. package/allCommands.json +1 -1
  2. package/allCommandsFull.json +1 -1
  3. package/dist/m365/onenote/commands/notebook/notebook-add.js +4 -3
  4. package/dist/m365/onenote/commands/notebook/notebook-list.js +6 -17
  5. package/dist/m365/onenote/commands/page/page-list.js +5 -8
  6. package/dist/m365/spfx/commands/project/project-doctor/{doctor-1.22.0-beta.1.js → doctor-1.22.0.js} +3 -3
  7. package/dist/m365/spfx/commands/project/project-doctor/doctor-1.22.1.js +21 -0
  8. package/dist/m365/spfx/commands/project/project-doctor.js +2 -1
  9. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN001034_DEP_microsoft_sp_adaptive_card_extension_base.js +1 -1
  10. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN002033_DEVDEP_css_loader.js +10 -0
  11. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN002034_DEVDEP_microsoft_spfx_heft_plugins.js +10 -0
  12. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN002035_DEVDEP_types_heft_jest.js +10 -0
  13. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN014003_CODE_launch.js +7 -44
  14. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN021005_PKG_scripts_test.js +18 -9
  15. package/dist/m365/spfx/commands/project/project-upgrade/rules/{FN021008_PKG_scripts_start.js → FN021007_PKG_scripts_start.js} +3 -3
  16. package/dist/m365/spfx/commands/project/project-upgrade/rules/{FN021012_PKG_scripts_eject_webpack.js → FN021008_PKG_scripts_eject_webpack.js} +3 -3
  17. package/dist/m365/spfx/commands/project/project-upgrade/rules/{FN021013_PKG_overrides_rushstack_heft.js → FN021009_PKG_overrides_rushstack_heft.js} +3 -3
  18. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN025002_ESLINTRCJS_rushstack_import_requires_chunk_name.js +57 -0
  19. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN025003_ESLINTRCJS_rushstack_pair_react_dom_render_unmount.js +57 -0
  20. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN025004_ESLINTRCJS_microsoft_spfx_import_requires_chunk_name.js +50 -0
  21. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN025005_ESLINTRCJS_microsoft_spfx_pair_react_dom_render_unmount.js +50 -0
  22. package/dist/m365/spfx/commands/project/project-upgrade/{upgrade-1.22.0-beta.1.js → upgrade-1.22.0.js} +80 -155
  23. package/dist/m365/spfx/commands/project/project-upgrade/upgrade-1.22.1.js +55 -0
  24. package/dist/m365/spfx/commands/project/project-upgrade/upgrade-1.3.4.js +42 -1
  25. package/dist/m365/spfx/commands/project/project-upgrade.js +12 -11
  26. package/dist/m365/spfx/commands/spfx-doctor.js +43 -3
  27. package/dist/m365/spo/commands/applicationcustomizer/applicationcustomizer-add.js +4 -0
  28. package/dist/m365/spo/commands/applicationcustomizer/applicationcustomizer-set.js +8 -2
  29. package/dist/m365/spo/commands/commandset/commandset-add.js +4 -0
  30. package/dist/m365/spo/commands/commandset/commandset-set.js +8 -1
  31. package/dist/m365/teams/commands/channel/channel-add.js +13 -33
  32. package/dist/utils/stringUtil.js +4 -0
  33. package/docs/docs/cmd/entra/groupsettingtemplate/groupsettingtemplate-get.mdx +20 -1
  34. package/docs/docs/cmd/entra/groupsettingtemplate/groupsettingtemplate-list.mdx +22 -1
  35. package/docs/docs/cmd/login.mdx +35 -11
  36. package/docs/docs/cmd/onenote/notebook/notebook-add.mdx +17 -0
  37. package/docs/docs/cmd/onenote/notebook/notebook-list.mdx +17 -0
  38. package/docs/docs/cmd/onenote/page/page-list.mdx +18 -1
  39. package/docs/docs/cmd/spo/applicationcustomizer/applicationcustomizer-add.mdx +3 -0
  40. package/docs/docs/cmd/spo/applicationcustomizer/applicationcustomizer-set.mdx +3 -0
  41. package/docs/docs/cmd/spo/commandset/commandset-add.mdx +3 -0
  42. package/docs/docs/cmd/spo/commandset/commandset-set.mdx +3 -0
  43. package/npm-shrinkwrap.json +1359 -666
  44. package/package.json +17 -17
  45. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN002033_DEVDEP_jest_junit.js +0 -10
  46. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN015012_FILE_config_heft_json.js +0 -10
  47. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN015013_FILE_config_jest_config_json.js +0 -10
  48. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN021007_PKG_scripts_deploy.js +0 -45
  49. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN021009_PKG_scripts_build_watch.js +0 -45
  50. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN021010_PKG_scripts_package_solution.js +0 -45
  51. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN021011_PKG_scripts_deploy_azure_storage.js +0 -45
@@ -8,8 +8,7 @@ import request from '../../../../request.js';
8
8
  import { validation } from '../../../../utils/validation.js';
9
9
  import GraphCommand from "../../../base/GraphCommand.js";
10
10
  import commands from '../../commands.js';
11
- import { cli } from '../../../../cli/cli.js';
12
- import { formatting } from '../../../../utils/formatting.js';
11
+ import { teams } from '../../../../utils/teams.js';
13
12
  class TeamsChannelAddCommand extends GraphCommand {
14
13
  get name() {
15
14
  return commands.CHANNEL_ADD;
@@ -25,30 +24,21 @@ class TeamsChannelAddCommand extends GraphCommand {
25
24
  __classPrivateFieldGet(this, _TeamsChannelAddCommand_instances, "m", _TeamsChannelAddCommand_initValidators).call(this);
26
25
  __classPrivateFieldGet(this, _TeamsChannelAddCommand_instances, "m", _TeamsChannelAddCommand_initOptionSets).call(this);
27
26
  }
27
+ async commandAction(logger, args) {
28
+ try {
29
+ const teamId = await this.getTeamId(args);
30
+ const res = await this.createChannel(args, teamId);
31
+ await logger.log(res);
32
+ }
33
+ catch (err) {
34
+ this.handleRejectedODataJsonPromise(err);
35
+ }
36
+ }
28
37
  async getTeamId(args) {
29
38
  if (args.options.teamId) {
30
39
  return args.options.teamId;
31
40
  }
32
- const teamRequestOptions = {
33
- url: `${this.resource}/v1.0/me/joinedTeams`,
34
- headers: {
35
- accept: 'application/json;odata.metadata=none'
36
- },
37
- responseType: 'json'
38
- };
39
- const response = await request.get(teamRequestOptions);
40
- const matchingTeams = response.value
41
- .filter(team => team.displayName === args.options.teamName)
42
- .map(team => team.id);
43
- if (matchingTeams.length < 1) {
44
- throw `The specified team does not exist in the Microsoft Teams`;
45
- }
46
- if (matchingTeams.length > 1) {
47
- const resultAsKeyValuePair = formatting.convertArrayToHashTable('id', response.value);
48
- const result = await cli.handleMultipleResultsFound(`Multiple Microsoft Teams teams with name ${args.options.teamName} found.`, resultAsKeyValuePair);
49
- return result.id;
50
- }
51
- return matchingTeams[0];
41
+ return await teams.getTeamIdByDisplayName(args.options.teamName);
52
42
  }
53
43
  async createChannel(args, teamId) {
54
44
  const requestOptions = {
@@ -68,23 +58,13 @@ class TeamsChannelAddCommand extends GraphCommand {
68
58
  requestOptions.data.members = [
69
59
  {
70
60
  '@odata.type': '#microsoft.graph.aadUserConversationMember',
71
- 'user@odata.bind': `https://graph.microsoft.com/v1.0/users('${args.options.owner}')`,
61
+ 'user@odata.bind': `${this.resource}/v1.0/users('${args.options.owner}')`,
72
62
  roles: ['owner']
73
63
  }
74
64
  ];
75
65
  }
76
66
  return request.post(requestOptions);
77
67
  }
78
- async commandAction(logger, args) {
79
- try {
80
- const teamId = await this.getTeamId(args);
81
- const res = await this.createChannel(args, teamId);
82
- await logger.log(res);
83
- }
84
- catch (err) {
85
- this.handleRejectedODataJsonPromise(err);
86
- }
87
- }
88
68
  }
89
69
  _TeamsChannelAddCommand_instances = new WeakSet(), _TeamsChannelAddCommand_initTelemetry = function _TeamsChannelAddCommand_initTelemetry() {
90
70
  this.telemetry.push((args) => {
@@ -0,0 +1,4 @@
1
+ export const stringUtil = {
2
+ normalizeLineEndings: (str) => str?.replace(/\r\n/g, '\n')
3
+ };
4
+ //# sourceMappingURL=stringUtil.js.map
@@ -24,6 +24,25 @@ m365 entra groupsettingtemplate get [options]
24
24
 
25
25
  <Global />
26
26
 
27
+ ## Permissions
28
+
29
+ <Tabs>
30
+ <TabItem value="Delegated">
31
+
32
+ | Resource | Permissions |
33
+ |------------------|------------------------|
34
+ | Microsoft Graph | GroupSettings.Read.All |
35
+
36
+ </TabItem>
37
+ <TabItem value="Application">
38
+
39
+ | Resource | Permissions |
40
+ |------------------|------------------------|
41
+ | Microsoft Graph | GroupSettings.Read.All |
42
+
43
+ </TabItem>
44
+ </Tabs>
45
+
27
46
  ## Examples
28
47
 
29
48
  Get information about the group setting template with id _62375ab9-6b52-47ed-826b-58e47e0e304b_
@@ -97,4 +116,4 @@ m365 entra groupsettingtemplate get --displayName Group.Unified
97
116
  ```
98
117
 
99
118
  </TabItem>
100
- </Tabs>
119
+ </Tabs>
@@ -16,6 +16,27 @@ m365 entra groupsettingtemplate list [options]
16
16
 
17
17
  <Global />
18
18
 
19
+ ## Permissions
20
+
21
+ ## Permissions
22
+
23
+ <Tabs>
24
+ <TabItem value="Delegated">
25
+
26
+ | Resource | Permissions |
27
+ |------------------|------------------------|
28
+ | Microsoft Graph | GroupSettings.Read.All |
29
+
30
+ </TabItem>
31
+ <TabItem value="Application">
32
+
33
+ | Resource | Permissions |
34
+ |------------------|------------------------|
35
+ | Microsoft Graph | GroupSettings.Read.All |
36
+
37
+ </TabItem>
38
+ </Tabs>
39
+
19
40
  ## Examples
20
41
 
21
42
  List all group setting templates in the tenant
@@ -83,4 +104,4 @@ m365 entra groupsettingtemplate list
83
104
  ```
84
105
 
85
106
  </TabItem>
86
- </Tabs>
107
+ </Tabs>
@@ -118,54 +118,72 @@ Log in to Microsoft 365 using your own Microsoft Entra application and a persona
118
118
  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'
119
119
  ```
120
120
 
121
- Log in to Microsoft 365 using a user name and password with `clientId` set in the configuration.
121
+ Log in to Microsoft 365 using a user name and password by providing the application and tenant identifiers explicitly.
122
122
 
123
123
  ```sh
124
- m365 login --authType password --userName user@contoso.com --password pass@word1
124
+ m365 login --authType password --appId 31359c7f-bd7e-475c-86db-fdb8c937548c --tenant 31359c7f-bd7e-475c-86db-fdb8c937548a --userName user@contoso.com --password pass@word1
125
125
  ```
126
126
 
127
- Log in to Microsoft 365 using a PEM certificate with `clientId` set in the configuration.
127
+ Log in to Microsoft 365 using a PEM certificate with `CLIMICROSOFT365_ENTRAAPPID` and `CLIMICROSOFT365_TENANT` environment variables set.
128
128
 
129
129
  ```sh
130
130
  m365 login --authType certificate --certificateFile /Users/user/dev/localhost.pem
131
131
  ```
132
132
 
133
- Log in to Microsoft 365 using a PEM certificate with `clientId` set in the configuration. Use the specified thumbprint.
133
+ Log in to Microsoft 365 using a PEM certificate and a specific thumbprint with `CLIMICROSOFT365_ENTRAAPPID` and `CLIMICROSOFT365_TENANT` environment variables set.
134
134
 
135
135
  ```sh
136
- m365 login --authType certificate --certificateFile /Users/user/dev/localhost.pem --thumbprint 47C4885736C624E90491F32B98855AA8A7562AF1
136
+ m365 login --authType certificate --certificateFile /Users/user/dev/localhost.pem --thumbprint 47C4885736C624E90491F32B98855AA8A7562AF1
137
137
  ```
138
138
 
139
- Log in to Microsoft 365 using a personal information exchange (.pfx) file with `CLIMICROSOFT365_ENTRAAPPID` environment variable set.
139
+ Log in to Microsoft 365 using a PEM certificate by providing the application and tenant identifiers explicitly.
140
+
141
+ ```sh
142
+ m365 login --authType certificate --appId 31359c7f-bd7e-475c-86db-fdb8c937548c --tenant 31359c7f-bd7e-475c-86db-fdb8c937548a --certificateFile /Users/user/dev/localhost.pem
143
+ ```
144
+
145
+ Log in to Microsoft 365 using a personal information exchange (.pfx) file with `CLIMICROSOFT365_ENTRAAPPID` and `CLIMICROSOFT365_TENANT` environment variables set.
140
146
 
141
147
  ```sh
142
148
  m365 login --authType certificate --certificateFile /Users/user/dev/localhost.pfx --password 'pass@word1'
143
149
  ```
144
150
 
145
- Log in to Microsoft 365 using a personal information exchange (.pfx) file protected with an empty password and `CLIMICROSOFT365_ENTRAAPPID` environment variable set.
151
+ Log in to Microsoft 365 using a personal information exchange (.pfx) file protected with an empty password with `CLIMICROSOFT365_ENTRAAPPID` and `CLIMICROSOFT365_TENANT` environment variables set.
146
152
 
147
153
  ```sh
148
154
  m365 login --authType certificate --certificateFile /Users/user/dev/localhost.pfx --password
149
155
  ```
150
156
 
151
- Log in to Microsoft 365 using a personal information exchange (.pfx) file not protected with a password and `CLIMICROSOFT365_ENTRAAPPID` environment variable set.
157
+ Log in to Microsoft 365 using a personal information exchange (.pfx) file not protected with a password with `CLIMICROSOFT365_ENTRAAPPID` and `CLIMICROSOFT365_TENANT` environment variables set.
152
158
 
153
159
  ```sh
154
160
  m365 login --authType certificate --certificateFile /Users/user/dev/localhost.pfx
155
161
  ```
156
162
 
157
- Log in to Microsoft 365 using a personal information exchange (.pfx) file. Use the specified thumbprint and `CLIMICROSOFT365_ENTRAAPPID` environment variable set.
163
+ Log in to Microsoft 365 using a personal information exchange (.pfx) file and a specific thumbprint with `CLIMICROSOFT365_ENTRAAPPID` and `CLIMICROSOFT365_TENANT` environment variables set.
158
164
 
159
165
  ```sh
160
166
  m365 login --authType certificate --certificateFile /Users/user/dev/localhost.pfx --thumbprint 47C4885736C624E90491F32B98855AA8A7562AF1 --password 'pass@word1'
161
167
  ```
162
168
 
163
- Log in to Microsoft 365 using a certificate from a base64-encoded string with `CLIMICROSOFT365_ENTRAAPPID` environment variable set.
169
+ Log in to Microsoft 365 using a personal information exchange (.pfx) file by providing the application and tenant identifiers explicitly.
170
+
171
+ ```sh
172
+ 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'
173
+ ```
174
+
175
+ Log in to Microsoft 365 using a certificate from a base64-encoded string with `CLIMICROSOFT365_ENTRAAPPID` and `CLIMICROSOFT365_TENANT` environment variables set.
164
176
 
165
177
  ```sh
166
178
  m365 login --authType certificate --certificateBase64Encoded MIII2QIBAzCCCJ8GCSqGSIb3DQEHAaCCCJAEg...eX1N5AgIIAA== --thumbprint D0C9B442DE249F55D10CDA1A2418952DC7D407A3
167
179
  ```
168
180
 
181
+ Log in to Microsoft 365 using a certificate from a base64-encoded string by providing the application and tenant identifiers explicitly.
182
+
183
+ ```sh
184
+ m365 login --authType certificate --appId 31359c7f-bd7e-475c-86db-fdb8c937548c --tenant 31359c7f-bd7e-475c-86db-fdb8c937548a --certificateBase64Encoded MIII2QIBAzCCCJ8GCSqGSIb3DQEHAaCCCJAEg...eX1N5AgIIAA== --thumbprint D0C9B442DE249F55D10CDA1A2418952DC7D407A3
185
+ ```
186
+
169
187
  Log in to Microsoft 365 using a system assigned managed identity with `clientId` set in the configuration. Applies to Azure resources with managed identity enabled, such as Azure Virtual Machines, Azure App Service or Azure Functions.
170
188
 
171
189
  ```sh
@@ -196,12 +214,18 @@ Log in to Microsoft 365 using the interactive browser authentication with `clien
196
214
  m365 login --authType browser
197
215
  ```
198
216
 
199
- Log in to Microsoft 365 using a client secret with `clientId` set in the configuration.
217
+ Log in to Microsoft 365 using a client secret with `CLIMICROSOFT365_ENTRAAPPID` and `CLIMICROSOFT365_TENANT` environment variables set.
200
218
 
201
219
  ```sh
202
220
  m365 login --authType secret --secret topSeCr3t@007
203
221
  ```
204
222
 
223
+ Log in to Microsoft 365 using a client secret by providing the application and tenant identifiers explicitly.
224
+
225
+ ```sh
226
+ m365 login --authType secret --appId 31359c7f-bd7e-475c-86db-fdb8c937548c --tenant 31359c7f-bd7e-475c-86db-fdb8c937548a --secret topSeCr3t@007
227
+ ```
228
+
205
229
  Ensures that the user is signed in, initiates the login flow if the user isn't signed in
206
230
 
207
231
  ```sh
@@ -36,6 +36,23 @@ m365 onenote notebook add [options]
36
36
 
37
37
  <Global />
38
38
 
39
+ ## Permissions
40
+
41
+ <Tabs>
42
+ <TabItem value="Delegated">
43
+
44
+ | Resource | Permissions |
45
+ |-----------------|------------------------------------------------------------------|
46
+ | Microsoft Graph | Notes.Create, Sites.Read.All, User.ReadBasic.All, Group.Read.All |
47
+
48
+ </TabItem>
49
+ <TabItem value="Application">
50
+
51
+ This command does not support application permissions.
52
+
53
+ </TabItem>
54
+ </Tabs>
55
+
39
56
  ## Examples
40
57
 
41
58
  Create a Microsoft OneNote notebook for the currently logged in user
@@ -33,6 +33,23 @@ m365 onenote notebook list [options]
33
33
 
34
34
  <Global />
35
35
 
36
+ ## Permissions
37
+
38
+ <Tabs>
39
+ <TabItem value="Delegated">
40
+
41
+ | Resource | Permissions |
42
+ |-----------------|--------------------------------------------------------------------|
43
+ | Microsoft Graph | Notes.Read.All, Sites.Read.All, User.ReadBasic.All, Group.Read.All |
44
+
45
+ </TabItem>
46
+ <TabItem value="Application">
47
+
48
+ This command does not support application permissions.
49
+
50
+ </TabItem>
51
+ </Tabs>
52
+
36
53
  ## Examples
37
54
 
38
55
  List Microsoft OneNote notebooks for the currently logged in user
@@ -35,7 +35,24 @@ m365 onenote page list [options]
35
35
 
36
36
  ## Remarks
37
37
 
38
- When we don't specify either `userId`, `userName`, `groupId`, `groupName` or `webUrl`, the OneNote pages will be retrieved of the currently logged in user.
38
+ When you don't specify either `userId`, `userName`, `groupId`, `groupName` or `webUrl`, the OneNote pages will be retrieved of the currently logged in user.
39
+
40
+ ## Permissions
41
+
42
+ <Tabs>
43
+ <TabItem value="Delegated">
44
+
45
+ | Resource | Permissions |
46
+ |-----------------|--------------------------------------------------------------------|
47
+ | Microsoft Graph | Notes.Read.All, Sites.Read.All, User.ReadBasic.All, Group.Read.All |
48
+
49
+ </TabItem>
50
+ <TabItem value="Application">
51
+
52
+ This command does not support application permissions.
53
+
54
+ </TabItem>
55
+ </Tabs>
39
56
 
40
57
  ## Examples
41
58
 
@@ -22,6 +22,9 @@ m365 spo applicationcustomizer add [options]
22
22
  `-i, --clientSideComponentId <clientSideComponentId>`
23
23
  : Client-side component ID of the application customizer (GUID).
24
24
 
25
+ `--description [description]`
26
+ : Description of the application customizer.
27
+
25
28
  `--clientSideComponentProperties [clientSideComponentProperties]`
26
29
  : JSON string with application customizer properties.
27
30
 
@@ -28,6 +28,9 @@ m365 spo applicationcustomizer set [options]
28
28
  `--newTitle [newTitle]`
29
29
  : The new title of the Application Customizer.
30
30
 
31
+ `--description [description]`
32
+ : Description of the application customizer. Specify an empty string to clear.
33
+
31
34
  `-p, --clientSideComponentProperties [clientSideComponentProperties]`
32
35
  : The Client Side Component properties of the Application Customizer.
33
36
 
@@ -27,6 +27,9 @@ m365 spo commandset add [options]
27
27
  `-i, --clientSideComponentId <clientSideComponentId>`
28
28
  : The Client Side Component Id (GUID) of the ListView Command Set.
29
29
 
30
+ `--description [description]`
31
+ : Description of the ListView Command Set.
32
+
30
33
  `--clientSideComponentProperties [clientSideComponentProperties]`
31
34
  : The Client Side Component properties of the ListView Command Set.
32
35
 
@@ -31,6 +31,9 @@ m365 spo commandset set [options]
31
31
  `--newTitle [newTitle]`
32
32
  : The new title of the ListView Command Set.
33
33
 
34
+ `--description [description]`
35
+ : Description of the ListView Command Set. Specify an empty string to clear.
36
+
34
37
  `-l, --listType [listType]`
35
38
  : The list or library type to register the Command Set on. Allowed values are: `List`, `Library` or `SitePages`.
36
39