@pnp/cli-microsoft365 11.7.0-beta.b9f508d → 11.7.0-beta.ba78c1f

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 (79) hide show
  1. package/.devproxy/api-specs/sharepoint.yaml +53 -0
  2. package/allCommands.json +1 -1
  3. package/allCommandsFull.json +1 -1
  4. package/dist/m365/context/commands/option/option-list.js +6 -1
  5. package/dist/m365/entra/commands/resourcenamespace/resourcenamespace-list.js +6 -0
  6. package/dist/m365/external/commands/connection/connection-list.js +6 -0
  7. package/dist/m365/outlook/commands/calendar/calendar-set.js +132 -0
  8. package/dist/m365/outlook/commands/calendargroup/calendargroup-get.js +114 -0
  9. package/dist/m365/outlook/commands/calendargroup/calendargroup-set.js +115 -0
  10. package/dist/m365/outlook/commands.js +3 -0
  11. package/dist/m365/spfx/commands/SpfxCompatibilityMatrix.js +21 -6
  12. package/dist/m365/spfx/commands/project/project-doctor/doctor-1.23.0-rc.0.js +19 -0
  13. package/dist/m365/spfx/commands/project/project-doctor.js +2 -1
  14. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN002021_DEVDEP_rushstack_eslint_config.js +2 -2
  15. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN002032_DEVDEP_typescript_eslint_parser.js +2 -2
  16. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN015008_FILE_eslintrc_js.js +1 -1
  17. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN015016_FILE_eslint_config_js.js +10 -0
  18. package/dist/m365/spfx/commands/project/project-upgrade/upgrade-1.23.0-rc.0.js +84 -0
  19. package/dist/m365/spfx/commands/project/project-upgrade.js +12 -11
  20. package/dist/m365/spo/commands/applicationcustomizer/applicationcustomizer-add.js +13 -1
  21. package/dist/m365/spo/commands/applicationcustomizer/applicationcustomizer-set.js +24 -3
  22. package/dist/m365/spo/commands/brandcenter/brandcenter-colors-list.js +59 -0
  23. package/dist/m365/spo/commands/file/file-archive.js +83 -0
  24. package/dist/m365/spo/commands/propertybag/propertybag-set.js +3 -9
  25. package/dist/m365/spo/commands/tenant/tenant-applicationcustomizer-add.js +20 -0
  26. package/dist/m365/spo/commands/tenant/tenant-applicationcustomizer-set.js +27 -2
  27. package/dist/m365/spo/commands/tenant/tenant-settings-set.js +5 -1
  28. package/dist/m365/spo/commands.js +2 -0
  29. package/dist/request.js +0 -16
  30. package/docs/docs/cmd/entra/m365group/m365group-user-add.mdx +21 -0
  31. package/docs/docs/cmd/entra/m365group/m365group-user-list.mdx +19 -0
  32. package/docs/docs/cmd/entra/m365group/m365group-user-remove.mdx +21 -0
  33. package/docs/docs/cmd/entra/m365group/m365group-user-set.mdx +21 -0
  34. package/docs/docs/cmd/entra/roledefinition/roledefinition-add.mdx +19 -0
  35. package/docs/docs/cmd/entra/roledefinition/roledefinition-get.mdx +19 -0
  36. package/docs/docs/cmd/entra/roledefinition/roledefinition-list.mdx +19 -0
  37. package/docs/docs/cmd/entra/roledefinition/roledefinition-remove.mdx +21 -0
  38. package/docs/docs/cmd/entra/roledefinition/roledefinition-set.mdx +21 -0
  39. package/docs/docs/cmd/entra/siteclassification/siteclassification-disable.mdx +21 -0
  40. package/docs/docs/cmd/entra/siteclassification/siteclassification-enable.mdx +21 -0
  41. package/docs/docs/cmd/entra/siteclassification/siteclassification-get.mdx +19 -0
  42. package/docs/docs/cmd/entra/siteclassification/siteclassification-set.mdx +20 -0
  43. package/docs/docs/cmd/entra/user/user-groupmembership-list.mdx +19 -0
  44. package/docs/docs/cmd/entra/user/user-guest-add.mdx +19 -0
  45. package/docs/docs/cmd/entra/user/user-password-validate.mdx +12 -0
  46. package/docs/docs/cmd/entra/user/user-recyclebinitem-clear.mdx +21 -0
  47. package/docs/docs/cmd/entra/user/user-recyclebinitem-list.mdx +19 -0
  48. package/docs/docs/cmd/entra/user/user-recyclebinitem-remove.mdx +21 -0
  49. package/docs/docs/cmd/entra/user/user-recyclebinitem-restore.mdx +19 -0
  50. package/docs/docs/cmd/entra/user/user-registrationdetails-list.mdx +19 -0
  51. package/docs/docs/cmd/entra/user/user-session-revoke.mdx +21 -0
  52. package/docs/docs/cmd/entra/user/user-signin-list.mdx +19 -0
  53. package/docs/docs/cmd/exo/approleassignment/approleassignment-add.mdx +19 -0
  54. package/docs/docs/cmd/external/connection/connection-add.mdx +21 -0
  55. package/docs/docs/cmd/external/connection/connection-doctor.mdx +19 -0
  56. package/docs/docs/cmd/external/connection/connection-get.mdx +19 -0
  57. package/docs/docs/cmd/external/connection/connection-list.mdx +19 -0
  58. package/docs/docs/cmd/external/connection/connection-remove.mdx +21 -0
  59. package/docs/docs/cmd/external/connection/connection-schema-add.mdx +21 -0
  60. package/docs/docs/cmd/external/connection/connection-urltoitemresolver-add.mdx +21 -0
  61. package/docs/docs/cmd/external/item/item-add.mdx +19 -0
  62. package/docs/docs/cmd/file/convert/convert-pdf.mdx +21 -0
  63. package/docs/docs/cmd/file/file-add.mdx +21 -0
  64. package/docs/docs/cmd/file/file-copy.mdx +21 -0
  65. package/docs/docs/cmd/file/file-list.mdx +19 -0
  66. package/docs/docs/cmd/file/file-move.mdx +21 -0
  67. package/docs/docs/cmd/outlook/calendar/calendar-set.mdx +178 -0
  68. package/docs/docs/cmd/outlook/calendargroup/calendargroup-get.mdx +125 -0
  69. package/docs/docs/cmd/outlook/calendargroup/calendargroup-set.mdx +83 -0
  70. package/docs/docs/cmd/spfx/project/project-upgrade.mdx +1 -1
  71. package/docs/docs/cmd/spo/applicationcustomizer/applicationcustomizer-add.mdx +14 -11
  72. package/docs/docs/cmd/spo/applicationcustomizer/applicationcustomizer-set.mdx +9 -6
  73. package/docs/docs/cmd/spo/brandcenter/brandcenter-colors-list.mdx +115 -0
  74. package/docs/docs/cmd/spo/file/file-archive.mdx +68 -0
  75. package/docs/docs/cmd/spo/propertybag/propertybag-set.mdx +1 -1
  76. package/docs/docs/cmd/spo/tenant/tenant-applicationcustomizer-add.mdx +13 -10
  77. package/docs/docs/cmd/spo/tenant/tenant-applicationcustomizer-set.mdx +7 -4
  78. package/docs/docs/cmd/spo/tenant/tenant-settings-set.mdx +3 -0
  79. package/package.json +1 -1
@@ -2,7 +2,7 @@ import fs from 'fs';
2
2
  import os from 'os';
3
3
  import path from 'path';
4
4
  // uncomment to support upgrading to preview releases
5
- // import { prerelease } from 'semver';
5
+ import { prerelease } from 'semver';
6
6
  import { z } from 'zod';
7
7
  import { CommandError, globalOptionsZod } from '../../../../Command.js';
8
8
  import { fsUtil } from '../../../../utils/fsUtil.js';
@@ -85,7 +85,8 @@ class SpfxProjectUpgradeCommand extends BaseProjectCommand {
85
85
  '1.21.1',
86
86
  '1.22.0',
87
87
  '1.22.1',
88
- '1.22.2'
88
+ '1.22.2',
89
+ '1.23.0-rc.0'
89
90
  ];
90
91
  }
91
92
  async commandAction(logger, args) {
@@ -95,15 +96,15 @@ class SpfxProjectUpgradeCommand extends BaseProjectCommand {
95
96
  }
96
97
  this.toVersion = args.options.toVersion ? args.options.toVersion : this.supportedVersions[this.supportedVersions.length - 1];
97
98
  // uncomment to support upgrading to preview releases
98
- // if (!args.options.toVersion &&
99
- // !args.options.preview &&
100
- // prerelease(this.toVersion)) {
101
- // // no version and no preview specified while the current version to
102
- // // upgrade to is a prerelease so let's grab the first non-preview version
103
- // // since we're supporting only one preview version, it's sufficient for
104
- // // us to take second to last version
105
- // this.toVersion = this.supportedVersions[this.supportedVersions.length - 2];
106
- // }
99
+ if (!args.options.toVersion &&
100
+ !args.options.preview &&
101
+ prerelease(this.toVersion)) {
102
+ // no version and no preview specified while the current version to
103
+ // upgrade to is a prerelease so let's grab the first non-preview version
104
+ // since we're supporting only one preview version, it's sufficient for
105
+ // us to take second to last version
106
+ this.toVersion = this.supportedVersions[this.supportedVersions.length - 2];
107
+ }
107
108
  this.packageManager = args.options.packageManager || 'npm';
108
109
  this.shell = args.options.shell || 'powershell';
109
110
  if (this.supportedVersions.indexOf(this.toVersion) < 0) {
@@ -31,7 +31,8 @@ class SpoApplicationCustomizerAddCommand extends SpoCommand {
31
31
  Name: args.options.title,
32
32
  Description: args.options.description,
33
33
  Location: 'ClientSideExtension.ApplicationCustomizer',
34
- ClientSideComponentId: args.options.clientSideComponentId
34
+ ClientSideComponentId: args.options.clientSideComponentId,
35
+ HostProperties: args.options.hostProperties || ''
35
36
  };
36
37
  if (args.options.clientSideComponentProperties) {
37
38
  requestBody.ClientSideComponentProperties = args.options.clientSideComponentProperties;
@@ -59,6 +60,8 @@ _a = SpoApplicationCustomizerAddCommand, _SpoApplicationCustomizerAddCommand_ins
59
60
  option: '--description [description]'
60
61
  }, {
61
62
  option: '--clientSideComponentProperties [clientSideComponentProperties]'
63
+ }, {
64
+ option: '--hostProperties [hostProperties]'
62
65
  }, {
63
66
  option: '-s, --scope [scope]', autocomplete: _a.scopes
64
67
  });
@@ -67,6 +70,7 @@ _a = SpoApplicationCustomizerAddCommand, _SpoApplicationCustomizerAddCommand_ins
67
70
  Object.assign(this.telemetryProperties, {
68
71
  description: typeof args.options.description !== 'undefined',
69
72
  clientSideComponentProperties: typeof args.options.clientSideComponentProperties !== 'undefined',
73
+ hostProperties: typeof args.options.hostProperties !== 'undefined',
70
74
  scope: typeof args.options.scope !== 'undefined'
71
75
  });
72
76
  });
@@ -89,6 +93,14 @@ _a = SpoApplicationCustomizerAddCommand, _SpoApplicationCustomizerAddCommand_ins
89
93
  return `An error has occurred while parsing clientSideComponentProperties: ${e}`;
90
94
  }
91
95
  }
96
+ if (args.options.hostProperties) {
97
+ try {
98
+ JSON.parse(args.options.hostProperties);
99
+ }
100
+ catch (e) {
101
+ return `An error has occurred while parsing hostProperties: ${e}`;
102
+ }
103
+ }
92
104
  if (args.options.scope && _a.scopes.indexOf(args.options.scope) < 0) {
93
105
  return `${args.options.scope} is not a valid value for allowedMembers. Valid values are ${_a.scopes.join(', ')}`;
94
106
  }
@@ -37,11 +37,13 @@ class SpoApplicationCustomizerSetCommand extends SpoCommand {
37
37
  }
38
38
  }
39
39
  async updateAppCustomizer(logger, options, appCustomizer) {
40
- const { clientSideComponentProperties, webUrl, newTitle, description } = options;
40
+ const { clientSideComponentProperties, hostProperties, webUrl, newTitle, description } = options;
41
41
  if (this.verbose) {
42
42
  await logger.logToStderr(`Updating application customizer with ID '${appCustomizer.Id}' on the site '${webUrl}'...`);
43
43
  }
44
- const requestBody = {};
44
+ const requestBody = {
45
+ HostProperties: hostProperties
46
+ };
45
47
  if (newTitle) {
46
48
  requestBody.Title = newTitle;
47
49
  }
@@ -106,6 +108,8 @@ _SpoApplicationCustomizerSetCommand_instances = new WeakSet(), _SpoApplicationCu
106
108
  option: '--description [description]'
107
109
  }, {
108
110
  option: '-p, --clientSideComponentProperties [clientSideComponentProperties]'
111
+ }, {
112
+ option: '--hostProperties [hostProperties]'
109
113
  }, {
110
114
  option: '-s, --scope [scope]', autocomplete: this.allowedScopes
111
115
  });
@@ -118,6 +122,7 @@ _SpoApplicationCustomizerSetCommand_instances = new WeakSet(), _SpoApplicationCu
118
122
  newTitle: typeof args.options.newTitle !== 'undefined',
119
123
  description: typeof args.options.description !== 'undefined',
120
124
  clientSideComponentProperties: typeof args.options.clientSideComponentProperties !== 'undefined',
125
+ hostProperties: typeof args.options.hostProperties !== 'undefined',
121
126
  scope: typeof args.options.scope !== 'undefined'
122
127
  });
123
128
  });
@@ -132,7 +137,23 @@ _SpoApplicationCustomizerSetCommand_instances = new WeakSet(), _SpoApplicationCu
132
137
  if (args.options.scope && this.allowedScopes.indexOf(args.options.scope) === -1) {
133
138
  return `'${args.options.scope}' is not a valid application customizer scope. Allowed values are: ${this.allowedScopes.join(',')}`;
134
139
  }
135
- if (!args.options.newTitle && args.options.description === undefined && !args.options.clientSideComponentProperties) {
140
+ if (args.options.clientSideComponentProperties) {
141
+ try {
142
+ JSON.parse(args.options.clientSideComponentProperties);
143
+ }
144
+ catch (e) {
145
+ return `An error has occurred while parsing clientSideComponentProperties: ${e}`;
146
+ }
147
+ }
148
+ if (args.options.hostProperties) {
149
+ try {
150
+ JSON.parse(args.options.hostProperties);
151
+ }
152
+ catch (e) {
153
+ return `An error has occurred while parsing hostProperties: ${e}`;
154
+ }
155
+ }
156
+ if (!args.options.newTitle && args.options.description === undefined && !args.options.clientSideComponentProperties && args.options.hostProperties === undefined) {
136
157
  return `Please specify an option to be updated`;
137
158
  }
138
159
  return validation.isValidSharePointUrl(args.options.webUrl);
@@ -0,0 +1,59 @@
1
+ import commands from '../../commands.js';
2
+ import { globalOptionsZod } from '../../../../Command.js';
3
+ import request from '../../../../request.js';
4
+ import { odata } from '../../../../utils/odata.js';
5
+ import { spo } from '../../../../utils/spo.js';
6
+ import SpoCommand from '../../../base/SpoCommand.js';
7
+ const options = globalOptionsZod.strict();
8
+ class SpoBrandCenterColorsListCommand extends SpoCommand {
9
+ get name() {
10
+ return commands.BRANDCENTER_COLORS_LIST;
11
+ }
12
+ get description() {
13
+ return 'Lists the brand center colors';
14
+ }
15
+ defaultProperties() {
16
+ return ['ColorCode', 'Title', 'IsVisible'];
17
+ }
18
+ get schema() {
19
+ return options;
20
+ }
21
+ async commandAction(logger) {
22
+ if (this.verbose) {
23
+ await logger.logToStderr(`Retrieving brand center colors...`);
24
+ }
25
+ try {
26
+ const spoUrl = await spo.getSpoUrl(logger, this.verbose);
27
+ const configRequestOptions = {
28
+ url: `${spoUrl}/_api/Brandcenter/Configuration`,
29
+ headers: {
30
+ accept: 'application/json;odata=nometadata'
31
+ },
32
+ responseType: 'json'
33
+ };
34
+ const config = await request.get(configRequestOptions);
35
+ if (!config.BrandColorsListUrl) {
36
+ if (this.verbose) {
37
+ await logger.logToStderr('Brand colors list not found.');
38
+ }
39
+ await logger.log([]);
40
+ return;
41
+ }
42
+ if (this.verbose) {
43
+ await logger.logToStderr(`Brand colors list found at '${config.BrandColorsListUrl.DecodedUrl}'.`);
44
+ }
45
+ const items = await odata.getAllItems(`${config.SiteUrl}/_api/web/lists(guid'${config.BrandColorsListId}')/items?$select=OData__SPColorTitle,OData__SPColorCode,OData__SPColorVisible`);
46
+ const result = items.map(item => ({
47
+ Title: item.OData__SPColorTitle,
48
+ ColorCode: item.OData__SPColorCode,
49
+ IsVisible: item.OData__SPColorVisible
50
+ }));
51
+ await logger.log(result);
52
+ }
53
+ catch (err) {
54
+ this.handleRejectedODataJsonPromise(err);
55
+ }
56
+ }
57
+ }
58
+ export default new SpoBrandCenterColorsListCommand();
59
+ //# sourceMappingURL=brandcenter-colors-list.js.map
@@ -0,0 +1,83 @@
1
+ import commands from '../../commands.js';
2
+ import SpoCommand from '../../../base/SpoCommand.js';
3
+ import { globalOptionsZod } from '../../../../Command.js';
4
+ import { z } from 'zod';
5
+ import { validation } from '../../../../utils/validation.js';
6
+ import { cli } from '../../../../cli/cli.js';
7
+ import { urlUtil } from '../../../../utils/urlUtil.js';
8
+ import request from '../../../../request.js';
9
+ import { formatting } from '../../../../utils/formatting.js';
10
+ export const options = z.strictObject({
11
+ ...globalOptionsZod.shape,
12
+ webUrl: z.string()
13
+ .refine(url => validation.isValidSharePointUrl(url) === true, {
14
+ error: e => `'${e.input}' is not a valid SharePoint Online site URL.`
15
+ })
16
+ .alias('u'),
17
+ url: z.string().optional(),
18
+ id: z.uuid().optional().alias('i'),
19
+ force: z.boolean().optional().alias('f')
20
+ });
21
+ class SpoFileArchiveCommand extends SpoCommand {
22
+ get name() {
23
+ return commands.FILE_ARCHIVE;
24
+ }
25
+ get description() {
26
+ return 'Archives a file';
27
+ }
28
+ get schema() {
29
+ return options;
30
+ }
31
+ getRefinedSchema(schema) {
32
+ return schema
33
+ .refine(options => [options.url, options.id].filter(o => o !== undefined).length === 1, {
34
+ error: `Specify 'url' or 'id', but not both.`
35
+ });
36
+ }
37
+ getExcludedOptionsWithUrls() {
38
+ return ['url'];
39
+ }
40
+ async commandAction(logger, args) {
41
+ const { webUrl, url, id, force, verbose } = args.options;
42
+ if (!force) {
43
+ const result = await cli.promptForConfirmation({ message: `Are you sure you would like to archive this item? You will be able to reactivate it instantly for the first 7 days. After that, it will take up to 24 hours to reactivate.` });
44
+ if (!result) {
45
+ return;
46
+ }
47
+ }
48
+ try {
49
+ if (verbose) {
50
+ await logger.logToStderr(`Archiving file ${url || id} at site ${webUrl}...`);
51
+ }
52
+ let requestUrl = `${webUrl}/_api/web`;
53
+ if (id) {
54
+ requestUrl += `/GetFileById('${formatting.encodeQueryParameter(id)}')`;
55
+ }
56
+ else if (url) {
57
+ const serverRelativePath = urlUtil.getServerRelativePath(webUrl, url);
58
+ requestUrl += `/GetFileByServerRelativePath(DecodedUrl='${formatting.encodeQueryParameter(serverRelativePath)}')`;
59
+ }
60
+ requestUrl += '?$select=ListId,ListItemAllFields/Id&$expand=ListItemAllFields';
61
+ const fileInfo = await request.get({
62
+ url: requestUrl,
63
+ headers: {
64
+ accept: 'application/json;odata=nometadata'
65
+ },
66
+ responseType: 'json'
67
+ });
68
+ const requestOptions = {
69
+ url: `${webUrl}/_api/Lists(guid'${fileInfo.ListId}')/items(${fileInfo.ListItemAllFields.Id})/Archive`,
70
+ headers: {
71
+ accept: 'application/json;odata=nometadata'
72
+ },
73
+ responseType: 'json'
74
+ };
75
+ await request.post(requestOptions);
76
+ }
77
+ catch (err) {
78
+ this.handleRejectedODataJsonPromise(err);
79
+ }
80
+ }
81
+ }
82
+ export default new SpoFileArchiveCommand();
83
+ //# sourceMappingURL=file-archive.js.map
@@ -28,12 +28,6 @@ class SpoPropertyBagSetCommand extends SpoPropertyBagBaseCommand {
28
28
  this.formDigestValue = contextResponse.FormDigestValue;
29
29
  let identityResp = await spo.getCurrentWebIdentity(args.options.webUrl, this.formDigestValue);
30
30
  const webIdentityResp = identityResp;
31
- // Check if web no script enabled or not
32
- // Cannot set property bag value if no script is enabled
33
- const isNoScriptSite = await this.isNoScriptSite(identityResp, args.options, logger);
34
- if (isNoScriptSite) {
35
- throw 'Site has NoScript enabled, and setting property bag values is not supported';
36
- }
37
31
  const opts = args.options;
38
32
  if (opts.folder) {
39
33
  // get the folder guid instead of the web guid
@@ -42,15 +36,15 @@ class SpoPropertyBagSetCommand extends SpoPropertyBagBaseCommand {
42
36
  await this.setProperty(identityResp, args.options, logger);
43
37
  }
44
38
  catch (err) {
39
+ if (err.toString().indexOf('E_ACCESSDENIED') > -1) {
40
+ await logger.logToStderr('Tip: If a site has NoScript enabled, setting the property bag value may result in exceptions.');
41
+ }
45
42
  this.handleRejectedPromise(err);
46
43
  }
47
44
  }
48
45
  setProperty(identityResp, options, logger) {
49
46
  return SpoPropertyBagBaseCommand.setProperty(options.key, options.value, options.webUrl, this.formDigestValue, identityResp, logger, this.debug, options.folder);
50
47
  }
51
- isNoScriptSite(webIdentityResp, options, logger) {
52
- return SpoPropertyBagBaseCommand.isNoScriptSite(options.webUrl, this.formDigestValue, webIdentityResp, logger, this.debug);
53
- }
54
48
  }
55
49
  _SpoPropertyBagSetCommand_instances = new WeakSet(), _SpoPropertyBagSetCommand_initTelemetry = function _SpoPropertyBagSetCommand_initTelemetry() {
56
50
  this.telemetry.push((args) => {
@@ -120,6 +120,7 @@ class SpoTenantApplicationCustomizerAddCommand extends SpoCommand {
120
120
  TenantWideExtensionSequence: 0,
121
121
  TenantWideExtensionListTemplate: 0,
122
122
  TenantWideExtensionComponentProperties: options.clientSideComponentProperties || '',
123
+ TenantWideExtensionHostProperties: options.hostProperties || '',
123
124
  TenantWideExtensionWebTemplate: options.webTemplate || '',
124
125
  TenantWideExtensionDisabled: false,
125
126
  verbose: this.verbose,
@@ -133,6 +134,7 @@ _SpoTenantApplicationCustomizerAddCommand_instances = new WeakSet(), _SpoTenantA
133
134
  this.telemetry.push((args) => {
134
135
  Object.assign(this.telemetryProperties, {
135
136
  clientSideComponentProperties: typeof args.options.clientSideComponentProperties !== 'undefined',
137
+ hostProperties: typeof args.options.hostProperties !== 'undefined',
136
138
  webTemplate: typeof args.options.webTemplate !== 'undefined'
137
139
  });
138
140
  });
@@ -143,6 +145,8 @@ _SpoTenantApplicationCustomizerAddCommand_instances = new WeakSet(), _SpoTenantA
143
145
  option: '-i, --clientSideComponentId <clientSideComponentId>'
144
146
  }, {
145
147
  option: '-p, --clientSideComponentProperties [clientSideComponentProperties]'
148
+ }, {
149
+ option: '--hostProperties [hostProperties]'
146
150
  }, {
147
151
  option: '-w, --webTemplate [webTemplate]'
148
152
  });
@@ -151,6 +155,22 @@ _SpoTenantApplicationCustomizerAddCommand_instances = new WeakSet(), _SpoTenantA
151
155
  if (!validation.isValidGuid(args.options.clientSideComponentId)) {
152
156
  return `${args.options.clientSideComponentId} is not a valid GUID`;
153
157
  }
158
+ if (args.options.clientSideComponentProperties) {
159
+ try {
160
+ JSON.parse(args.options.clientSideComponentProperties);
161
+ }
162
+ catch (e) {
163
+ return `An error has occurred while parsing clientSideComponentProperties: ${e}`;
164
+ }
165
+ }
166
+ if (args.options.hostProperties) {
167
+ try {
168
+ JSON.parse(args.options.hostProperties);
169
+ }
170
+ catch (e) {
171
+ return `An error has occurred while parsing hostProperties: ${e}`;
172
+ }
173
+ }
154
174
  return true;
155
175
  });
156
176
  };
@@ -121,7 +121,7 @@ class SpoTenantApplicationCustomizerSetCommand extends SpoCommand {
121
121
  return outputParsed[0];
122
122
  }
123
123
  async updateTenantWideExtension(appCatalogUrl, options, listServerRelativeUrl, itemId, logger) {
124
- const { title, id, clientSideComponentId, newTitle, newClientSideComponentId, clientSideComponentProperties, webTemplate } = options;
124
+ const { title, id, clientSideComponentId, newTitle, newClientSideComponentId, clientSideComponentProperties, hostProperties, webTemplate } = options;
125
125
  if (this.verbose) {
126
126
  await logger.logToStderr(`Updating tenant-wide application customizer: "${title || id || clientSideComponentId}"...`);
127
127
  }
@@ -144,6 +144,12 @@ class SpoTenantApplicationCustomizerSetCommand extends SpoCommand {
144
144
  FieldValue: clientSideComponentProperties
145
145
  });
146
146
  }
147
+ if (hostProperties !== undefined) {
148
+ formValues.push({
149
+ FieldName: 'TenantWideExtensionHostProperties',
150
+ FieldValue: hostProperties
151
+ });
152
+ }
147
153
  if (webTemplate !== undefined) {
148
154
  formValues.push({
149
155
  FieldName: 'TenantWideExtensionWebTemplate',
@@ -172,6 +178,7 @@ _SpoTenantApplicationCustomizerSetCommand_instances = new WeakSet(), _SpoTenantA
172
178
  newTitle: typeof args.options.newTitle !== 'undefined',
173
179
  newClientSideComponentId: typeof args.options.newClientSideComponentId !== 'undefined',
174
180
  clientSideComponentProperties: typeof args.options.clientSideComponentProperties !== 'undefined',
181
+ hostProperties: typeof args.options.hostProperties !== 'undefined',
175
182
  webTemplate: typeof args.options.webTemplate !== 'undefined'
176
183
  });
177
184
  });
@@ -188,6 +195,8 @@ _SpoTenantApplicationCustomizerSetCommand_instances = new WeakSet(), _SpoTenantA
188
195
  option: '--newClientSideComponentId [newClientSideComponentId]'
189
196
  }, {
190
197
  option: '-p, --clientSideComponentProperties [clientSideComponentProperties]'
198
+ }, {
199
+ option: '--hostProperties [hostProperties]'
191
200
  }, {
192
201
  option: '-w, --webTemplate [webTemplate]'
193
202
  });
@@ -202,7 +211,23 @@ _SpoTenantApplicationCustomizerSetCommand_instances = new WeakSet(), _SpoTenantA
202
211
  if (args.options.newClientSideComponentId && !validation.isValidGuid(args.options.newClientSideComponentId)) {
203
212
  return `${args.options.newClientSideComponentId} is not a valid GUID`;
204
213
  }
205
- if (!args.options.newTitle && !args.options.newClientSideComponentId && !args.options.clientSideComponentProperties && !args.options.webTemplate) {
214
+ if (args.options.clientSideComponentProperties) {
215
+ try {
216
+ JSON.parse(args.options.clientSideComponentProperties);
217
+ }
218
+ catch (e) {
219
+ return `An error has occurred while parsing clientSideComponentProperties: ${e}`;
220
+ }
221
+ }
222
+ if (args.options.hostProperties) {
223
+ try {
224
+ JSON.parse(args.options.hostProperties);
225
+ }
226
+ catch (e) {
227
+ return `An error has occurred while parsing hostProperties: ${e}`;
228
+ }
229
+ }
230
+ if (!args.options.newTitle && !args.options.newClientSideComponentId && !args.options.clientSideComponentProperties && args.options.hostProperties === undefined && !args.options.webTemplate) {
206
231
  return `Please specify an option to be updated`;
207
232
  }
208
233
  return true;
@@ -414,6 +414,9 @@ _a = SpoTenantSettingsSetCommand, _SpoTenantSettingsSetCommand_instances = new W
414
414
  }, {
415
415
  option: '--SyncAadB2BManagementPolicy [SyncAadB2BManagementPolicy]',
416
416
  autocomplete: ['true', 'false']
417
+ }, {
418
+ option: '--AllowWebPropertyBagUpdateWhenDenyAddAndCustomizePagesIsEnabled [AllowWebPropertyBagUpdateWhenDenyAddAndCustomizePagesIsEnabled]',
419
+ autocomplete: ['true', 'false']
417
420
  });
418
421
  }, _SpoTenantSettingsSetCommand_initValidators = function _SpoTenantSettingsSetCommand_initValidators() {
419
422
  this.validators.push(async (args) => {
@@ -496,7 +499,8 @@ SpoTenantSettingsSetCommand.booleanOptions = [
496
499
  'DisableCustomAppAuthentication',
497
500
  'CommentsOnListItemsDisabled',
498
501
  'EnableAzureADB2BIntegration',
499
- 'SyncAadB2BManagementPolicy'
502
+ 'SyncAadB2BManagementPolicy',
503
+ 'AllowWebPropertyBagUpdateWhenDenyAddAndCustomizePagesIsEnabled'
500
504
  ];
501
505
  export default new SpoTenantSettingsSetCommand();
502
506
  //# sourceMappingURL=tenant-settings-set.js.map
@@ -19,6 +19,7 @@ export default {
19
19
  APPLICATIONCUSTOMIZER_SET: `${prefix} applicationcustomizer set`,
20
20
  APPPAGE_ADD: `${prefix} apppage add`,
21
21
  APPPAGE_SET: `${prefix} apppage set`,
22
+ BRANDCENTER_COLORS_LIST: `${prefix} brandcenter colors list`,
22
23
  BRANDCENTER_SETTINGS_LIST: `${prefix} brandcenter settings list`,
23
24
  CDN_GET: `${prefix} cdn get`,
24
25
  CDN_ORIGIN_ADD: `${prefix} cdn origin add`,
@@ -61,6 +62,7 @@ export default {
61
62
  FIELD_REMOVE: `${prefix} field remove`,
62
63
  FIELD_SET: `${prefix} field set`,
63
64
  FILE_ADD: `${prefix} file add`,
65
+ FILE_ARCHIVE: `${prefix} file archive`,
64
66
  FILE_CHECKIN: `${prefix} file checkin`,
65
67
  FILE_CHECKOUT: `${prefix} file checkout`,
66
68
  FILE_CHECKOUT_UNDO: `${prefix} file checkout undo`,
package/dist/request.js CHANGED
@@ -154,10 +154,6 @@ class Request {
154
154
  options.headers.authorization = `Bearer ${accessToken}`;
155
155
  }
156
156
  }
157
- const proxyUrl = process.env.HTTP_PROXY || process.env.HTTPS_PROXY;
158
- if (proxyUrl) {
159
- options.proxy = this.createProxyConfigFromUrl(proxyUrl);
160
- }
161
157
  const res = await this.req(options);
162
158
  const end = process.hrtime.bigint();
163
159
  timings.api.push(Number(end - start));
@@ -192,18 +188,6 @@ class Request {
192
188
  options.url = options.url.substring(0, 8) +
193
189
  options.url.substring(8).replace('//', '/');
194
190
  }
195
- createProxyConfigFromUrl(url) {
196
- const parsedUrl = new URL(url);
197
- const port = parsedUrl.port || (url.toLowerCase().startsWith('https') ? 443 : 80);
198
- let authObject = null;
199
- if (parsedUrl.username && parsedUrl.password) {
200
- authObject = {
201
- username: parsedUrl.username,
202
- password: parsedUrl.password
203
- };
204
- }
205
- return { host: parsedUrl.hostname, port: Number(port), protocol: 'http', ...(authObject && { auth: authObject }) };
206
- }
207
191
  }
208
192
  export default new Request();
209
193
  //# sourceMappingURL=request.js.map
@@ -1,4 +1,6 @@
1
1
  import Global from '../../_global.mdx';
2
+ import Tabs from '@theme/Tabs';
3
+ import TabItem from '@theme/TabItem';
2
4
 
3
5
  # entra m365group user add
4
6
 
@@ -43,6 +45,25 @@ m365 teams user add [options]
43
45
 
44
46
  <Global />
45
47
 
48
+ ## Permissions
49
+
50
+ <Tabs>
51
+ <TabItem value="Delegated">
52
+
53
+ | Resource | Permissions |
54
+ |-----------------|-----------------------------------------|
55
+ | Microsoft Graph | Group.ReadWrite.All, User.ReadBasic.All |
56
+
57
+ </TabItem>
58
+ <TabItem value="Application">
59
+
60
+ | Resource | Permissions |
61
+ |-----------------|------------------------------------|
62
+ | Microsoft Graph | Group.ReadWrite.All, User.Read.All |
63
+
64
+ </TabItem>
65
+ </Tabs>
66
+
46
67
  ## Examples
47
68
 
48
69
  Add a new member with the userNames parameter to the specified Microsoft 365 Group.
@@ -37,6 +37,25 @@ m365 entra m365group user list [options]
37
37
 
38
38
  When the `properties` option includes values with a `/`, for example: `manager/displayName`, an additional `$expand` query parameter will be included on `manager`.
39
39
 
40
+ ## Permissions
41
+
42
+ <Tabs>
43
+ <TabItem value="Delegated">
44
+
45
+ | Resource | Permissions |
46
+ |-----------------|------------------------------------------|
47
+ | Microsoft Graph | GroupMember.Read.All, User.ReadBasic.All |
48
+
49
+ </TabItem>
50
+ <TabItem value="Application">
51
+
52
+ | Resource | Permissions |
53
+ |-----------------|-------------------------------------|
54
+ | Microsoft Graph | GroupMember.Read.All, User.Read.All |
55
+
56
+ </TabItem>
57
+ </Tabs>
58
+
40
59
  ## Examples
41
60
 
42
61
  List all users and their role from Microsoft 365 group specified by ID.
@@ -1,4 +1,6 @@
1
1
  import Global from '../../_global.mdx';
2
+ import Tabs from '@theme/Tabs';
3
+ import TabItem from '@theme/TabItem';
2
4
 
3
5
  # entra m365group user remove
4
6
 
@@ -41,6 +43,25 @@ m365 entra m365group user remove [options]
41
43
 
42
44
  You can remove users from a Microsoft 365 Group or Microsoft Teams team if you are owner of that group or team.
43
45
 
46
+ ## Permissions
47
+
48
+ <Tabs>
49
+ <TabItem value="Delegated">
50
+
51
+ | Resource | Permissions |
52
+ |-----------------|-----------------------------------------|
53
+ | Microsoft Graph | Group.ReadWrite.All, User.ReadBasic.All |
54
+
55
+ </TabItem>
56
+ <TabItem value="Application">
57
+
58
+ | Resource | Permissions |
59
+ |-----------------|------------------------------------|
60
+ | Microsoft Graph | Group.ReadWrite.All, User.Read.All |
61
+
62
+ </TabItem>
63
+ </Tabs>
64
+
44
65
  ## Examples
45
66
 
46
67
  Removes user from the specified Microsoft 365 Group.
@@ -1,4 +1,6 @@
1
1
  import Global from '../../_global.mdx';
2
+ import Tabs from '@theme/Tabs';
3
+ import TabItem from '@theme/TabItem';
2
4
 
3
5
  # entra m365group user set
4
6
 
@@ -41,6 +43,25 @@ m365 entra m365group user set [options]
41
43
 
42
44
  The command will return an error if the user already has the specified role in the given Microsoft 365 Group or Microsoft Teams team.
43
45
 
46
+ ## Permissions
47
+
48
+ <Tabs>
49
+ <TabItem value="Delegated">
50
+
51
+ | Resource | Permissions |
52
+ |-----------------|-----------------------------------------|
53
+ | Microsoft Graph | Group.ReadWrite.All, User.ReadBasic.All |
54
+
55
+ </TabItem>
56
+ <TabItem value="Application">
57
+
58
+ | Resource | Permissions |
59
+ |-----------------|------------------------------------|
60
+ | Microsoft Graph | Group.ReadWrite.All, User.Read.All |
61
+
62
+ </TabItem>
63
+ </Tabs>
64
+
44
65
  ## Examples
45
66
 
46
67
  Promote a single user to Owner of the given Microsoft 365 Group
@@ -37,6 +37,25 @@ m365 entra roledefinition add [options]
37
37
 
38
38
  Use the `m365 entra rolepermission list --resourceNamespace microsoft.directory` command to get a list of available resource actions.
39
39
 
40
+ ## Permissions
41
+
42
+ <Tabs>
43
+ <TabItem value="Delegated">
44
+
45
+ | Resource | Permissions |
46
+ |-----------------|------------------------------------|
47
+ | Microsoft Graph | RoleManagement.ReadWrite.Directory |
48
+
49
+ </TabItem>
50
+ <TabItem value="Application">
51
+
52
+ | Resource | Permissions |
53
+ |-----------------|------------------------------------|
54
+ | Microsoft Graph | RoleManagement.ReadWrite.Directory |
55
+
56
+ </TabItem>
57
+ </Tabs>
58
+
40
59
  ## Examples
41
60
 
42
61
  Create a custom Microsoft Entra ID role