@pnp/cli-microsoft365 5.2.0-beta.119724d → 5.2.0-beta.4df87d9

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.
package/.mocharc.json CHANGED
@@ -5,5 +5,6 @@
5
5
  "spec": "dist/**/*.spec.js",
6
6
  "require": "source-map-support/register",
7
7
  "watch": "dist/**/*.js",
8
+ "timeout": 10000,
8
9
  "logpanel": true
9
10
  }
package/dist/Auth.js CHANGED
@@ -301,7 +301,8 @@ class Auth {
301
301
  logger.logToStderr('');
302
302
  }
303
303
  logger.log(response.message);
304
- if (cli_1.Cli.getInstance().getSettingWithDefaultValue(settingsNames_1.settingsNames.autoOpenBrowserOnLogin, false)) {
304
+ if (cli_1.Cli.getInstance().getSettingWithDefaultValue(settingsNames_1.settingsNames.autoOpenBrowserOnLogin, false)
305
+ || cli_1.Cli.getInstance().getSettingWithDefaultValue(settingsNames_1.settingsNames.autoOpenLinksInBrowser, false)) {
305
306
  // _open is never set before hitting this line, but this check
306
307
  // is implemented so that we can support lazy loading
307
308
  // but also stub it for testing
package/dist/Command.js CHANGED
@@ -47,6 +47,10 @@ class Command {
47
47
  logger.logToStderr(chalk.yellow(`Command '${deprecated}' is deprecated. Please use '${recommended}' instead`));
48
48
  }
49
49
  }
50
+ warn(logger, warning) {
51
+ const chalk = require('chalk');
52
+ logger.logToStderr(chalk.yellow(warning));
53
+ }
50
54
  getUsedCommandName() {
51
55
  const cli = cli_1.Cli.getInstance();
52
56
  const commandName = this.getCommandName();
@@ -144,7 +148,12 @@ class Command {
144
148
  return __awaiter(this, void 0, void 0, function* () {
145
149
  });
146
150
  }
147
- getCommandName() {
151
+ getCommandName(alias) {
152
+ var _a;
153
+ if (alias &&
154
+ ((_a = this.alias()) === null || _a === void 0 ? void 0 : _a.includes(alias))) {
155
+ return alias;
156
+ }
148
157
  let commandName = this.name;
149
158
  let pos = commandName.indexOf('<');
150
159
  const pos1 = commandName.indexOf('[');
package/dist/cli/Cli.js CHANGED
@@ -202,7 +202,7 @@ class Cli {
202
202
  // the command to execute
203
203
  const cli = Cli.getInstance();
204
204
  const parentCommandName = cli.currentCommandName;
205
- cli.currentCommandName = command.getCommandName();
205
+ cli.currentCommandName = command.getCommandName(cli.currentCommandName);
206
206
  command.action(logger, args, (err) => {
207
207
  // restore the original command name
208
208
  cli.currentCommandName = parentCommandName;
@@ -21,6 +21,9 @@ class AppGetCommand extends AppCommand_1.default {
21
21
  cli_1.Cli
22
22
  .executeCommandWithOutput(AadAppGetCommand, { options: Object.assign(Object.assign({}, options), { _: [] }) })
23
23
  .then((appGetOutput) => {
24
+ if (this.verbose) {
25
+ logger.logToStderr(appGetOutput.stderr);
26
+ }
24
27
  logger.log(JSON.parse(appGetOutput.stdout));
25
28
  cb();
26
29
  }, (err) => this.handleRejectedODataJsonPromise(err, logger, cb));
@@ -1,6 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ const cli_1 = require("../../../cli");
3
4
  const config_1 = require("../../../config");
5
+ const settingsNames_1 = require("../../../settingsNames");
4
6
  const AnonymousCommand_1 = require("../../base/AnonymousCommand");
5
7
  const commands_1 = require("../commands");
6
8
  class CliReconsentCommand extends AnonymousCommand_1.default {
@@ -11,8 +13,24 @@ class CliReconsentCommand extends AnonymousCommand_1.default {
11
13
  return 'Returns Azure AD URL to open in the browser to re-consent CLI for Microsoft 365 permissions';
12
14
  }
13
15
  commandAction(logger, args, cb) {
14
- logger.log(`To re-consent the PnP Microsoft 365 Management Shell Azure AD application navigate in your web browser to https://login.microsoftonline.com/${config_1.default.tenant}/oauth2/authorize?client_id=${config_1.default.cliAadAppId}&response_type=code&prompt=admin_consent`);
15
- cb();
16
+ const url = `https://login.microsoftonline.com/${config_1.default.tenant}/oauth2/authorize?client_id=${config_1.default.cliAadAppId}&response_type=code&prompt=admin_consent`;
17
+ if (cli_1.Cli.getInstance().getSettingWithDefaultValue(settingsNames_1.settingsNames.autoOpenLinksInBrowser, false) === false) {
18
+ logger.log(`To re-consent the PnP Microsoft 365 Management Shell Azure AD application navigate in your web browser to ${url}`);
19
+ return cb();
20
+ }
21
+ logger.log(`Opening the following page in your browser: ${url}`);
22
+ // _open is never set before hitting this line, but this check
23
+ // is implemented so that we can support lazy loading
24
+ // but also stub it for testing
25
+ /* c8 ignore next 3 */
26
+ if (!this._open) {
27
+ this._open = require('open');
28
+ }
29
+ this._open(url).then(() => {
30
+ cb();
31
+ }, (error) => {
32
+ this.handleRejectedODataJsonPromise(error, logger, cb);
33
+ });
16
34
  }
17
35
  }
18
36
  module.exports = new CliReconsentCommand();
@@ -20,6 +20,7 @@ class CliConfigSetCommand extends AnonymousCommand_1.default {
20
20
  let value = undefined;
21
21
  switch (args.options.key) {
22
22
  case settingsNames_1.settingsNames.autoOpenBrowserOnLogin:
23
+ case settingsNames_1.settingsNames.autoOpenLinksInBrowser:
23
24
  case settingsNames_1.settingsNames.copyDeviceCodeToClipboard:
24
25
  case settingsNames_1.settingsNames.csvHeader:
25
26
  case settingsNames_1.settingsNames.csvQuoted:
@@ -0,0 +1,57 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const request_1 = require("../../../../request");
4
+ const PowerPlatformCommand_1 = require("../../../base/PowerPlatformCommand");
5
+ const commands_1 = require("../../commands");
6
+ class PpEnvironmentListCommand extends PowerPlatformCommand_1.default {
7
+ get name() {
8
+ return commands_1.default.ENVIRONMENT_LIST;
9
+ }
10
+ get description() {
11
+ return 'Lists Microsoft Power Platform environments';
12
+ }
13
+ defaultProperties() {
14
+ return ['name', 'displayName'];
15
+ }
16
+ commandAction(logger, args, cb) {
17
+ if (this.verbose) {
18
+ logger.logToStderr(`Retrieving list of Microsoft Power Platform environments...`);
19
+ }
20
+ let url = '';
21
+ if (args.options.asAdmin) {
22
+ url = `${this.resource}/providers/Microsoft.BusinessAppPlatform/scopes/admin/environments`;
23
+ }
24
+ else {
25
+ url = `${this.resource}/providers/Microsoft.BusinessAppPlatform/environments`;
26
+ }
27
+ const requestOptions = {
28
+ url: `${url}?api-version=2020-10-01`,
29
+ headers: {
30
+ accept: 'application/json'
31
+ },
32
+ responseType: 'json'
33
+ };
34
+ request_1.default
35
+ .get(requestOptions)
36
+ .then((res) => {
37
+ if (res.value && res.value.length > 0) {
38
+ res.value.forEach(e => {
39
+ e.displayName = e.properties.displayName;
40
+ });
41
+ logger.log(res.value);
42
+ }
43
+ cb();
44
+ }, (rawRes) => this.handleRejectedODataJsonPromise(rawRes, logger, cb));
45
+ }
46
+ options() {
47
+ const options = [
48
+ {
49
+ option: '-a, --asAdmin [teamId]'
50
+ }
51
+ ];
52
+ const parentOptions = super.options();
53
+ return options.concat(parentOptions);
54
+ }
55
+ }
56
+ module.exports = new PpEnvironmentListCommand();
57
+ //# sourceMappingURL=environment-list.js.map
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const prefix = 'pp';
4
4
  exports.default = {
5
+ ENVIRONMENT_LIST: `${prefix} environment list`,
5
6
  MANAGEMENTAPP_ADD: `${prefix} managementapp add`
6
7
  };
7
8
  //# sourceMappingURL=commands.js.map
@@ -242,6 +242,9 @@ class SpfxProjectUpgradeCommand extends base_project_command_1.BaseProjectComman
242
242
  }
243
243
  });
244
244
  switch (args.options.output) {
245
+ case 'text':
246
+ logger.log(this.getTextReport(findingsToReport));
247
+ break;
245
248
  case 'json':
246
249
  logger.log(findingsToReport);
247
250
  break;
@@ -252,7 +255,7 @@ class SpfxProjectUpgradeCommand extends base_project_command_1.BaseProjectComman
252
255
  logger.log(this.getMdReport(findingsToReport));
253
256
  break;
254
257
  default:
255
- logger.log(this.getTextReport(findingsToReport));
258
+ logger.log(findingsToReport);
256
259
  }
257
260
  cb();
258
261
  }
@@ -62,10 +62,10 @@ class SpoFileCheckoutCommand extends SpoCommand_1.default {
62
62
  }
63
63
  }
64
64
  if (args.options.id && args.options.fileUrl) {
65
- return 'Specify either URL or UniqueId but not both';
65
+ return 'Specify either id or fileUrl but not both';
66
66
  }
67
67
  if (!args.options.id && !args.options.fileUrl) {
68
- return 'Specify URL or UniqueId, one is required';
68
+ return 'Specify id or fileUrl, one is required';
69
69
  }
70
70
  return true;
71
71
  }
@@ -50,7 +50,7 @@ class SpoSiteRemoveCommand extends SpoCommand_1.default {
50
50
  if (args.options.skipRecycleBin || args.options.wait) {
51
51
  logger.logToStderr(chalk.yellow(`Entered site is a groupified site. Hence, the parameters 'skipRecycleBin' and 'wait' will not be applicable.`));
52
52
  }
53
- return this.deleteGroupifiedSite(group.id, logger);
53
+ return this.deleteGroup(group.id, logger);
54
54
  })
55
55
  .catch((err) => {
56
56
  if (err.response.status === 404) {
@@ -79,7 +79,8 @@ class SpoSiteRemoveCommand extends SpoCommand_1.default {
79
79
  else {
80
80
  return Promise.reject(err);
81
81
  }
82
- });
82
+ })
83
+ .then(_ => this.deleteSite(args.options.url, args.options.wait, logger));
83
84
  }
84
85
  })
85
86
  .then(_ => cb(), (err) => this.handleRejectedPromise(err, logger, cb));
@@ -296,7 +297,7 @@ class SpoSiteRemoveCommand extends SpoCommand_1.default {
296
297
  }
297
298
  });
298
299
  }
299
- deleteGroupifiedSite(groupId, logger) {
300
+ deleteGroup(groupId, logger) {
300
301
  if (this.verbose) {
301
302
  logger.logToStderr(`Removing Microsoft 365 Group: ${groupId}...`);
302
303
  }
@@ -13,6 +13,14 @@ class SpoTenantSettingsSetCommand extends SpoCommand_1.default {
13
13
  get description() {
14
14
  return 'Sets tenant global settings';
15
15
  }
16
+ types() {
17
+ return {
18
+ boolean: [
19
+ 'EnableAzureADB2BIntegration',
20
+ 'SyncAadB2BManagementPolicy'
21
+ ]
22
+ };
23
+ }
16
24
  getTelemetryProperties(args) {
17
25
  const telemetryProps = super.getTelemetryProperties(args);
18
26
  telemetryProps.MinCompatibilityLevel = (!(!args.options.MinCompatibilityLevel)).toString();
@@ -97,6 +105,8 @@ class SpoTenantSettingsSetCommand extends SpoCommand_1.default {
97
105
  telemetryProps.DisabledWebPartIds = (!(!args.options.DisabledWebPartIds)).toString();
98
106
  telemetryProps.AllowedDomainListForSyncClient = (!(!args.options.AllowedDomainListForSyncClient)).toString();
99
107
  telemetryProps.DisableCustomAppAuthentication = (!(!args.options.DisableCustomAppAuthentication)).toString();
108
+ telemetryProps.EnableAzureADB2BIntegration = typeof args.options.EnableAzureADB2BIntegration !== 'undefined';
109
+ telemetryProps.SyncAadB2BManagementPolicy = typeof args.options.SyncAadB2BManagementPolicy !== 'undefined';
100
110
  return telemetryProps;
101
111
  }
102
112
  getAllEnumOptions() {
@@ -176,6 +186,9 @@ class SpoTenantSettingsSetCommand extends SpoCommand_1.default {
176
186
  cb(new Command_1.CommandError(response.ErrorInfo.ErrorMessage));
177
187
  return;
178
188
  }
189
+ if (args.options.EnableAzureADB2BIntegration === true) {
190
+ this.warn(logger, 'WARNING: Make sure to also enable the Azure AD one-time passcode authentication preview. If it is not enabled then SharePoint will not use Azure AD B2B even if EnableAzureADB2BIntegration is set to true. Learn more at http://aka.ms/spo-b2b-integration.');
191
+ }
179
192
  cb();
180
193
  }, (err) => this.handleRejectedPromise(err, logger, cb));
181
194
  }
@@ -490,6 +503,14 @@ class SpoTenantSettingsSetCommand extends SpoCommand_1.default {
490
503
  {
491
504
  option: '--DisableCustomAppAuthentication [DisableCustomAppAuthentication]',
492
505
  autocomplete: ['true', 'false']
506
+ },
507
+ {
508
+ option: '--EnableAzureADB2BIntegration [EnableAzureADB2BIntegration]',
509
+ autocomplete: ['true', 'false']
510
+ },
511
+ {
512
+ option: '--SyncAadB2BManagementPolicy [SyncAadB2BManagementPolicy]',
513
+ autocomplete: ['true', 'false']
493
514
  }
494
515
  ];
495
516
  const parentOptions = super.options();
@@ -16,6 +16,8 @@ class TeamsChannelAddCommand extends GraphCommand_1.default {
16
16
  telemetryProps.description = typeof args.options.description !== 'undefined';
17
17
  telemetryProps.teamId = typeof args.options.teamId !== 'undefined';
18
18
  telemetryProps.teamName = typeof args.options.teamName !== 'undefined';
19
+ telemetryProps.type = args.options.type || 'standard';
20
+ telemetryProps.owner = typeof args.options.owner !== 'undefined';
19
21
  return telemetryProps;
20
22
  }
21
23
  getTeamId(args) {
@@ -44,23 +46,35 @@ class TeamsChannelAddCommand extends GraphCommand_1.default {
44
46
  return Promise.resolve(matchingTeams[0]);
45
47
  });
46
48
  }
49
+ createChannel(args, teamId) {
50
+ const requestOptions = {
51
+ url: `${this.resource}/v1.0/teams/${teamId}/channels`,
52
+ headers: {
53
+ accept: 'application/json;odata.metadata=none',
54
+ 'content-type': 'application/json;odata=nometadata'
55
+ },
56
+ data: {
57
+ membershipType: args.options.type || 'standard',
58
+ displayName: args.options.name
59
+ },
60
+ responseType: 'json'
61
+ };
62
+ if (args.options.type === 'private') {
63
+ // Private channels must have at least 1 owner
64
+ requestOptions.data.members = [
65
+ {
66
+ '@odata.type': '#microsoft.graph.aadUserConversationMember',
67
+ 'user@odata.bind': `https://graph.microsoft.com/v1.0/users('${args.options.owner}')`,
68
+ roles: ['owner']
69
+ }
70
+ ];
71
+ }
72
+ return request_1.default.post(requestOptions);
73
+ }
47
74
  commandAction(logger, args, cb) {
48
75
  this
49
76
  .getTeamId(args)
50
- .then((teamId) => {
51
- const requestOptions = {
52
- url: `${this.resource}/v1.0/teams/${teamId}/channels`,
53
- headers: {
54
- accept: 'application/json;odata.metadata=none',
55
- 'content-type': 'application/json;odata=nometadata'
56
- },
57
- data: {
58
- displayName: args.options.name
59
- },
60
- responseType: 'json'
61
- };
62
- return request_1.default.post(requestOptions);
63
- })
77
+ .then((teamId) => this.createChannel(args, teamId))
64
78
  .then((res) => {
65
79
  logger.log(res);
66
80
  cb();
@@ -79,6 +93,13 @@ class TeamsChannelAddCommand extends GraphCommand_1.default {
79
93
  },
80
94
  {
81
95
  option: '-d, --description [description]'
96
+ },
97
+ {
98
+ option: '--type [type]',
99
+ autocomplete: ['standard', 'private']
100
+ },
101
+ {
102
+ option: '--owner [owner]'
82
103
  }
83
104
  ];
84
105
  const parentOptions = super.options();
@@ -94,6 +115,15 @@ class TeamsChannelAddCommand extends GraphCommand_1.default {
94
115
  if (args.options.teamId && !utils_1.validation.isValidGuid(args.options.teamId)) {
95
116
  return `${args.options.teamId} is not a valid GUID`;
96
117
  }
118
+ if (args.options.type && ['standard', 'private'].indexOf(args.options.type) === -1) {
119
+ return `${args.options.type} is not a valid type value. Allowed values standard|private.`;
120
+ }
121
+ if (args.options.type === 'private' && !args.options.owner) {
122
+ return 'Specify owner when creating a private channel.';
123
+ }
124
+ if (args.options.type !== 'private' && args.options.owner) {
125
+ return 'Specify owner only when creating a private channel.';
126
+ }
97
127
  return true;
98
128
  }
99
129
  }
@@ -49,7 +49,10 @@ class TeamsChannelListCommand extends GraphCommand_1.default {
49
49
  this
50
50
  .getTeamId(args)
51
51
  .then((teamId) => {
52
- const endpoint = `${this.resource}/v1.0/teams/${teamId}/channels`;
52
+ let endpoint = `${this.resource}/v1.0/teams/${teamId}/channels`;
53
+ if (args.options.type) {
54
+ endpoint += `?$filter=membershipType eq '${args.options.type}'`;
55
+ }
53
56
  return utils_1.odata.getAllItems(endpoint, logger);
54
57
  })
55
58
  .then((items) => {
@@ -64,6 +67,10 @@ class TeamsChannelListCommand extends GraphCommand_1.default {
64
67
  },
65
68
  {
66
69
  option: '--teamName [teamName]'
70
+ },
71
+ {
72
+ option: '--type [type]',
73
+ autocomplete: ['standard', 'private']
67
74
  }
68
75
  ];
69
76
  const parentOptions = super.options();
@@ -79,6 +86,9 @@ class TeamsChannelListCommand extends GraphCommand_1.default {
79
86
  if (args.options.teamId && !utils_1.validation.isValidGuid(args.options.teamId)) {
80
87
  return `${args.options.teamId} is not a valid GUID`;
81
88
  }
89
+ if (args.options.type && ['standard', 'private'].indexOf(args.options.type.toLowerCase()) === -1) {
90
+ return `${args.options.type} is not a valid type value. Allowed values standard|private`;
91
+ }
82
92
  return true;
83
93
  }
84
94
  }
@@ -0,0 +1,203 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const utils_1 = require("../../../../utils");
4
+ const GraphCommand_1 = require("../../../base/GraphCommand");
5
+ const commands_1 = require("../../commands");
6
+ const request_1 = require("../../../../request");
7
+ class TeamsChannelMemberSetCommand extends GraphCommand_1.default {
8
+ constructor() {
9
+ super(...arguments);
10
+ this.teamId = '';
11
+ this.channelId = '';
12
+ }
13
+ get name() {
14
+ return commands_1.default.CHANNEL_MEMBER_SET;
15
+ }
16
+ get description() {
17
+ return 'Updates the role of the specified member in the specified Microsoft Teams private team channel';
18
+ }
19
+ getTelemetryProperties(args) {
20
+ const telemetryProps = super.getTelemetryProperties(args);
21
+ telemetryProps.teamId = typeof args.options.teamId !== 'undefined';
22
+ telemetryProps.teamName = typeof args.options.teamName !== 'undefined';
23
+ telemetryProps.channelId = typeof args.options.channelId !== 'undefined';
24
+ telemetryProps.channelName = typeof args.options.channelName !== 'undefined';
25
+ telemetryProps.userName = typeof args.options.userName !== 'undefined';
26
+ telemetryProps.userId = typeof args.options.userId !== 'undefined';
27
+ telemetryProps.id = typeof args.options.id !== 'undefined';
28
+ return telemetryProps;
29
+ }
30
+ commandAction(logger, args, cb) {
31
+ this
32
+ .getTeamId(args)
33
+ .then((teamId) => {
34
+ this.teamId = teamId;
35
+ return this.getChannelId(args);
36
+ })
37
+ .then((channelId) => {
38
+ this.channelId = channelId;
39
+ return this.getMemberId(args);
40
+ })
41
+ .then((memberId) => {
42
+ const requestOptions = {
43
+ url: `${this.resource}/v1.0/teams/${this.teamId}/channels/${this.channelId}/members/${memberId}`,
44
+ headers: {
45
+ 'accept': 'application/json;odata.metadata=none',
46
+ 'Prefer': 'return=representation'
47
+ },
48
+ responseType: 'json',
49
+ data: {
50
+ '@odata.type': '#microsoft.graph.aadUserConversationMember',
51
+ roles: [args.options.role]
52
+ }
53
+ };
54
+ return request_1.default.patch(requestOptions);
55
+ })
56
+ .then((member) => {
57
+ logger.log(member);
58
+ cb();
59
+ }, (err) => this.handleRejectedODataJsonPromise(err, logger, cb));
60
+ }
61
+ getTeamId(args) {
62
+ if (args.options.teamId) {
63
+ return Promise.resolve(args.options.teamId);
64
+ }
65
+ const requestOptions = {
66
+ url: `${this.resource}/v1.0/groups?$filter=displayName eq '${encodeURIComponent(args.options.teamName)}'`,
67
+ headers: {
68
+ accept: 'application/json;odata.metadata=none'
69
+ },
70
+ responseType: 'json'
71
+ };
72
+ return request_1.default
73
+ .get(requestOptions)
74
+ .then(response => {
75
+ const groupItem = response.value[0];
76
+ if (!groupItem) {
77
+ return Promise.reject(`The specified team does not exist in the Microsoft Teams`);
78
+ }
79
+ if (groupItem.resourceProvisioningOptions.indexOf('Team') === -1) {
80
+ return Promise.reject(`The specified team does not exist in the Microsoft Teams`);
81
+ }
82
+ if (response.value.length > 1) {
83
+ return Promise.reject(`Multiple Microsoft Teams teams with name ${args.options.teamName} found: ${response.value.map(x => x.id)}`);
84
+ }
85
+ return Promise.resolve(groupItem.id);
86
+ });
87
+ }
88
+ getChannelId(args) {
89
+ if (args.options.channelId) {
90
+ return Promise.resolve(args.options.channelId);
91
+ }
92
+ const requestOptions = {
93
+ url: `${this.resource}/v1.0/teams/${encodeURIComponent(this.teamId)}/channels?$filter=displayName eq '${encodeURIComponent(args.options.channelName)}'`,
94
+ headers: {
95
+ accept: 'application/json;odata.metadata=none'
96
+ },
97
+ responseType: 'json'
98
+ };
99
+ return request_1.default
100
+ .get(requestOptions)
101
+ .then(response => {
102
+ const channelItem = response.value[0];
103
+ if (!channelItem) {
104
+ return Promise.reject(`The specified channel does not exist in the Microsoft Teams team`);
105
+ }
106
+ return Promise.resolve(channelItem.id);
107
+ });
108
+ }
109
+ getMemberId(args) {
110
+ if (args.options.id) {
111
+ return Promise.resolve(args.options.id);
112
+ }
113
+ const requestOptions = {
114
+ url: `${this.resource}/v1.0/teams/${this.teamId}/channels/${this.channelId}/members`,
115
+ headers: {
116
+ accept: 'application/json;odata.metadata=none'
117
+ },
118
+ responseType: 'json'
119
+ };
120
+ return request_1.default
121
+ .get(requestOptions)
122
+ .then(response => {
123
+ const conversationMembers = response.value.filter(x => {
124
+ var _a, _b;
125
+ return args.options.userId && ((_a = x.userId) === null || _a === void 0 ? void 0 : _a.toLocaleLowerCase()) === args.options.userId.toLocaleLowerCase() ||
126
+ args.options.userName && ((_b = x.email) === null || _b === void 0 ? void 0 : _b.toLocaleLowerCase()) === args.options.userName.toLocaleLowerCase();
127
+ });
128
+ const conversationMember = conversationMembers[0];
129
+ if (!conversationMember) {
130
+ return Promise.reject(`The specified member does not exist in the Microsoft Teams channel`);
131
+ }
132
+ if (conversationMembers.length > 1) {
133
+ return Promise.reject(`Multiple Microsoft Teams channel members with name ${args.options.userName} found: ${response.value.map(x => x.userId)}`);
134
+ }
135
+ return Promise.resolve(conversationMember.id);
136
+ });
137
+ }
138
+ options() {
139
+ const options = [
140
+ {
141
+ option: '--teamId [teamId]'
142
+ },
143
+ {
144
+ option: '--teamName [teamName]'
145
+ },
146
+ {
147
+ option: '--channelId [channelId]'
148
+ },
149
+ {
150
+ option: '--channelName [channelName]'
151
+ },
152
+ {
153
+ option: '--userName [userName]'
154
+ },
155
+ {
156
+ option: '--userId [userId]'
157
+ },
158
+ {
159
+ option: '--id [id]'
160
+ },
161
+ {
162
+ option: '-r, --role <role>',
163
+ autocomplete: ['owner', 'member']
164
+ }
165
+ ];
166
+ const parentOptions = super.options();
167
+ return options.concat(parentOptions);
168
+ }
169
+ validate(args) {
170
+ if (args.options.teamId && args.options.teamName) {
171
+ return 'Specify either teamId or teamName, but not both';
172
+ }
173
+ if (!args.options.teamId && !args.options.teamName) {
174
+ return 'Specify teamId or teamName, one is required';
175
+ }
176
+ if (args.options.teamId && !utils_1.validation.isValidGuid(args.options.teamId)) {
177
+ return `${args.options.teamId} is not a valid GUID`;
178
+ }
179
+ if (args.options.channelId && args.options.channelName) {
180
+ return 'Specify either channelId or channelName, but not both';
181
+ }
182
+ if (!args.options.channelId && !args.options.channelName) {
183
+ return 'Specify channelId or channelName, one is required';
184
+ }
185
+ if ((args.options.userName && args.options.userId) ||
186
+ (args.options.userName && args.options.id) ||
187
+ (args.options.userId && args.options.id)) {
188
+ return 'Specify either userName, userId or id, but not multiple.';
189
+ }
190
+ if (!args.options.userName && !args.options.userId && !args.options.id) {
191
+ return 'Specify either userName, userId or id, one is required';
192
+ }
193
+ if (args.options.userId && !utils_1.validation.isValidGuid(args.options.userId)) {
194
+ return `${args.options.userId} is not a valid GUID`;
195
+ }
196
+ if (['owner', 'member'].indexOf(args.options.role) === -1) {
197
+ return `${args.options.role} is not a valid role value. Allowed values owner|member`;
198
+ }
199
+ return true;
200
+ }
201
+ }
202
+ module.exports = new TeamsChannelMemberSetCommand();
203
+ //# sourceMappingURL=channel-member-set.js.map
@@ -11,6 +11,7 @@ exports.default = {
11
11
  CHANNEL_ADD: `${prefix} channel add`,
12
12
  CHANNEL_GET: `${prefix} channel get`,
13
13
  CHANNEL_LIST: `${prefix} channel list`,
14
+ CHANNEL_MEMBER_SET: `${prefix} channel member set`,
14
15
  CHANNEL_MEMBERSHIP_LIST: `${prefix} channel membership list`,
15
16
  CHANNEL_REMOVE: `${prefix} channel remove`,
16
17
  CHANNEL_SET: `${prefix} channel set`,
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.settingsNames = void 0;
4
4
  const settingsNames = {
5
5
  autoOpenBrowserOnLogin: 'autoOpenBrowserOnLogin',
6
+ autoOpenLinksInBrowser: 'autoOpenLinksInBrowser',
6
7
  copyDeviceCodeToClipboard: 'copyDeviceCodeToClipboard',
7
8
  csvEscape: 'csvEscape',
8
9
  csvHeader: 'csvHeader',
@@ -0,0 +1,37 @@
1
+ # pp environment list
2
+
3
+ Lists Microsoft Power Platform environments
4
+
5
+ ## Usage
6
+
7
+ ```sh
8
+ m365 pp environment list [options]
9
+ ```
10
+
11
+ ## Options
12
+
13
+ `-a, --asAdmin [teamId]`
14
+ Run the command as admin and retrieve all environments. Lists only environments you have explicitly are assigned permissions to by default.
15
+
16
+ --8<-- "docs/cmd/_global.md"
17
+
18
+ ## Remarks
19
+
20
+ !!! attention
21
+ This command is based on an API that is currently in preview and is subject to change once the API reached general availability.
22
+ Register CLI for Microsoft 365 or Azure AD application as a management application for the Power Platform using
23
+ m365 pp managementapp add [options]
24
+
25
+ ## Examples
26
+
27
+ List Microsoft Power Platform environments
28
+
29
+ ```sh
30
+ m365 pp environment list
31
+ ```
32
+
33
+ List all Microsoft Power Platform environments
34
+
35
+ ```sh
36
+ m365 pp environment list --asAdmin
37
+ ```
@@ -13,34 +13,34 @@ m365 spo tenant settings set [options]
13
13
  --8<-- "docs/cmd/_global.md"
14
14
 
15
15
  `--MinCompatibilityLevel [MinCompatibilityLevel]`
16
- : Specifies the lower bound on the compatibility level for new sites'
16
+ : Specifies the lower bound on the compatibility level for new sites
17
17
 
18
18
  `--MaxCompatibilityLevel [MaxCompatibilityLevel]`
19
- : Specifies the upper bound on the compatibility level for new sites'
19
+ : Specifies the upper bound on the compatibility level for new sites
20
20
 
21
21
  `--ExternalServicesEnabled [ExternalServicesEnabled]`
22
22
  : Enables external services for a tenant. External services are defined as services that are not in the Microsoft 365 datacenters. Allowed values `true,false`
23
23
 
24
24
  `--NoAccessRedirectUrl [NoAccessRedirectUrl]`
25
- : Specifies the URL of the redirected site for those site collections which have the locked state "NoAccess"'
25
+ : Specifies the URL of the redirected site for those site collections which have the locked state "NoAccess"
26
26
 
27
27
  `--SharingCapability [SharingCapability]`
28
- : Determines what level of sharing is available for the site. The valid values are: ExternalUserAndGuestSharing (default) - External user sharing (share by email) and guest link sharing are both enabled. Disabled - External user sharing (share by email) and guest link sharing are both disabled. ExternalUserSharingOnly - External user sharing (share by email) is enabled, but guest link sharing is disabled. Allowed values Disabled,ExternalUserSharingOnly,ExternalUserAndGuestSharing,ExistingExternalUserSharingOnly
28
+ : Determines what level of sharing is available for the site. The valid values are: ExternalUserAndGuestSharing (default) - External user sharing (share by email) and guest link sharing are both enabled. Disabled - External user sharing (share by email) and guest link sharing are both disabled. ExternalUserSharingOnly - External user sharing (share by email) is enabled, but guest link sharing is disabled. Allowed values `Disabled,ExternalUserSharingOnly,ExternalUserAndGuestSharing,ExistingExternalUserSharingOnly`
29
29
 
30
30
  `--DisplayStartASiteOption [DisplayStartASiteOption]`
31
31
  : Determines whether tenant users see the Start a Site menu option. Allowed values `true,false`
32
32
 
33
33
  `--StartASiteFormUrl [StartASiteFormUrl]`
34
- : Specifies URL of the form to load in the Start a Site dialog. The valid values are: "" (default) - Blank by default, this will also remove or clear any value that has been set. Full URL - Example:"https://contoso.sharepoint.com/path/to/form"'
34
+ : Specifies URL of the form to load in the Start a Site dialog. The valid values are: "" (default) - Blank by default, this will also remove or clear any value that has been set. Full URL - Example:"https://contoso.sharepoint.com/path/to/form"
35
35
 
36
36
  `--ShowEveryoneClaim [ShowEveryoneClaim]`
37
37
  : Enables the administrator to hide the Everyone claim in the People Picker. When users share an item with Everyone, it is accessible to all authenticated users in the tenant\'s Azure Active Directory, including any active external users who have previously accepted invitations. Note, that some SharePoint system resources such as templates and pages are required to be shared to Everyone and this type of sharing does not expose any user data or metadata. Allowed values `true,false`
38
38
 
39
39
  `--ShowAllUsersClaim [ShowAllUsersClaim]`
40
- : Enables the administrator to hide the All Users claim groups in People Picker. When users share an item with "All Users (x)", it is accessible to all organization members in the tenant\'s Azure Active Directory who have authenticated with via this method. When users share an item with "All Users (x)" it is accessible to all organtization members in the tenant that used NTLM to authentication with SharePoint. Allowed values `true,false`
40
+ : Enables the administrator to hide the All Users claim groups in People Picker. When users share an item with "All Users (x)", it is accessible to all organization members in the tenant\'s Azure Active Directory who have authenticated with via this method. When users share an item with "All Users (x)" it is accessible to all organization members in the tenant that used NTLM to authentication with SharePoint. Allowed values `true,false`
41
41
 
42
42
  `--ShowEveryoneExceptExternalUsersClaim [ShowEveryoneExceptExternalUsersClaim]`
43
- : Enables the administrator to hide the "Everyone except external users" claim in the People Picker. When users share an item with "Everyone except external users", it is accessible to all organization members in the tenant\'s Azure Active Directory, but not to any users who have previously accepted invitations. Allowed values `true,false`
43
+ : Enables the administrator to hide the "Everyone except external users" claim in the People Picker. When users share an item with "Everyone except external users", it is accessible to all organization members in the tenant's Azure Active Directory, but not to any users who have previously accepted invitations. Allowed values `true,false`
44
44
 
45
45
  `--SearchResolveExactEmailOrUPN [SearchResolveExactEmailOrUPN]`
46
46
  : Removes the search capability from People Picker. Note, recently resolved names will still appear in the list until browser cache is cleared or expired. SharePoint Administrators will still be able to use starts with or partial name matching when enabled. Allowed values `true,false`
@@ -49,7 +49,7 @@ m365 spo tenant settings set [options]
49
49
  : When set to true this will disable the ability to use Modern Authentication that leverages ADAL across the tenant. Allowed values `true,false`
50
50
 
51
51
  `--LegacyAuthProtocolsEnabled [LegacyAuthProtocolsEnabled]`
52
- : By default this value is set to true. Setting this parameter prevents Office clients using non-modern authentication protocols from accessing SharePoint Online resources. A value of true - Enables Office clients using non-modern authentication protocols(such as, Forms-Based Authentication (FBA) or Identity Client Runtime Library (IDCRL)) to access SharePoint resources. Allowed values `true,false`
52
+ : By default this value is set to true. Setting this parameter prevents Office clients using non-modern authentication protocols from accessing SharePoint Online resources. A value of true - Enables Office clients using non-modern authentication protocols (such as, Forms-Based Authentication (FBA) or Identity Client Runtime Library (IDCRL)) to access SharePoint resources. Allowed values `true,false`
53
53
 
54
54
  `--RequireAcceptingAccountMatchInvitedAccount [RequireAcceptingAccountMatchInvitedAccount]`
55
55
  : Ensures that an external user can only accept an external sharing invitation with an account matching the invited email address. Administrators who desire increased control over external collaborators should consider enabling this feature. Allowed values `true,false`
@@ -58,7 +58,7 @@ m365 spo tenant settings set [options]
58
58
  : Creates a Shared with Everyone folder in every user\'s new OneDrive for Business document library. The valid values are: True (default) - The Shared with Everyone folder is created. False - No folder is created when the site and OneDrive for Business document library is created. Allowed values `true,false`
59
59
 
60
60
  `--SignInAccelerationDomain [SignInAccelerationDomain]`
61
- : Specifies the home realm discovery value to be sent to Azure Active Directory (AAD) during the user sign-in process. When the organization uses a third-party identity provider, this prevents the user from seeing the Azure Active Directory Home Realm Discovery web page and ensures the user only sees their company\'s Identity Provider\'s portal. This value can also be used with Azure Active Directory Premium to customize the Azure Active Directory login page. Acceleration will not occur on site collections that are shared externally. This value should be configured with the login domain that is used by your company (that is, example@contoso.com). If your company has multiple third-party identity providers, configuring the sign-in acceleration value will break sign-in for your organization. The valid values are: "" (default) - Blank by default, this will also remove or clear any value that has been set. Login Domain - For example: "contoso.com". No value assigned by default'
61
+ : Specifies the home realm discovery value to be sent to Azure Active Directory (AAD) during the user sign-in process. When the organization uses a third-party identity provider, this prevents the user from seeing the Azure Active Directory Home Realm Discovery web page and ensures the user only sees their company's Identity Provider's portal. This value can also be used with Azure Active Directory Premium to customize the Azure Active Directory login page. Acceleration will not occur on site collections that are shared externally. This value should be configured with the login domain that is used by your company (that is, example@contoso.com). If your company has multiple third-party identity providers, configuring the sign-in acceleration value will break sign-in for your organization. The valid values are: "" (default) - Blank by default, this will also remove or clear any value that has been set. Login Domain - For example: "contoso.com". No value assigned by default
62
62
 
63
63
  `--EnableGuestSignInAcceleration [EnableGuestSignInAcceleration]`
64
64
  : Accelerates guest-enabled site collections as well as member-only site collections when the SignInAccelerationDomain parameter is set. Allowed values `true,false`
@@ -70,7 +70,7 @@ m365 spo tenant settings set [options]
70
70
  : When the feature is enabled, all external sharing invitations that are sent will blind copy the e-mail messages listed in the BccExternalSharingsInvitationList. Allowed values `true,false`
71
71
 
72
72
  `--BccExternalSharingInvitationsList [BccExternalSharingInvitationsList]`
73
- : Specifies a list of e-mail addresses to be BCC\'d when the BCC for External Sharing feature is enabled. Multiple addresses can be specified by creating a comma separated list with no spaces'
73
+ : Specifies a list of e-mail addresses to be BCC'd when the BCC for External Sharing feature is enabled. Multiple addresses can be specified by creating a comma separated list with no spaces
74
74
 
75
75
  `--UserVoiceForFeedbackEnabled [UserVoiceForFeedbackEnabled]`
76
76
  : Enables or disables the User Voice Feedback button. Allowed values `true,false`
@@ -79,22 +79,22 @@ m365 spo tenant settings set [options]
79
79
  : Enables or disables the publish CDN. Allowed values `true,false`
80
80
 
81
81
  `--PublicCdnAllowedFileTypes [PublicCdnAllowedFileTypes]`
82
- : Sets public CDN allowed file types'
82
+ : Sets public CDN allowed file types
83
83
 
84
84
  `--RequireAnonymousLinksExpireInDays [RequireAnonymousLinksExpireInDays]`
85
- : Specifies all anonymous links that have been created (or will be created) will expire after the set number of days. To remove the expiration requirement, set the value to zero (0)'
85
+ : Specifies all anonymous links that have been created (or will be created) will expire after the set number of days. To remove the expiration requirement, set the value to zero (0)
86
86
 
87
87
  `--SharingAllowedDomainList [SharingAllowedDomainList]`
88
- : Specifies a list of email domains that is allowed for sharing with the external collaborators. Use the space character as the delimiter for entering multiple values. For example, "contoso.com fabrikam.com"'
88
+ : Specifies a list of email domains that is allowed for sharing with the external collaborators. Use the space character as the delimiter for entering multiple values. For example, "contoso.com fabrikam.com"
89
89
 
90
90
  `--SharingBlockedDomainList [SharingBlockedDomainList]`
91
- : Specifies a list of email domains that is blocked or prohibited for sharing with the external collaborators. Use space character as the delimiter for entering multiple values. For example, "contoso.com fabrikam.com"'
91
+ : Specifies a list of email domains that is blocked or prohibited for sharing with the external collaborators. Use space character as the delimiter for entering multiple values. For example, "contoso.com fabrikam.com"
92
92
 
93
93
  `--SharingDomainRestrictionMode [SharingDomainRestrictionMode]`
94
- : Specifies the external sharing mode for domains. Allowed values None,AllowList,BlockList
94
+ : Specifies the external sharing mode for domains. Allowed values `None,AllowList,BlockList`
95
95
 
96
96
  `--OneDriveStorageQuota [OneDriveStorageQuota]`
97
- : Sets a default OneDrive for Business storage quota for the tenant. It will be used for new OneDrive for Business sites created. A typical use will be to reduce the amount of storage associated with OneDrive for Business to a level below what the License entitles the users. For example, it could be used to set the quota to 10 gigabytes (GB) by default'
97
+ : Sets a default OneDrive for Business storage quota for the tenant. It will be used for new OneDrive for Business sites created. A typical use will be to reduce the amount of storage associated with OneDrive for Business to a level below what the License entitles the users. For example, it could be used to set the quota to 10 gigabytes (GB) by default
98
98
 
99
99
  `--OneDriveForGuestsEnabled [OneDriveForGuestsEnabled]`
100
100
  : Lets OneDrive for Business creation for administrator managed guest users. Administrator managed Guest users use credentials in the resource tenant to access the resources. Allowed values `true,false`
@@ -103,7 +103,7 @@ m365 spo tenant settings set [options]
103
103
  : Allows access from network locations that are defined by an administrator. The values are true and false. The default value is false which means the setting is disabled. Before the iPAddressEnforcement parameter is set, make sure you add a valid IPv4 or IPv6 address to the iPAddressAllowList parameter. Allowed values `true,false`
104
104
 
105
105
  `--IPAddressAllowList [IPAddressAllowList]`
106
- : Configures multiple IP addresses or IP address ranges (IPv4 or IPv6). Use commas to separate multiple IP addresses or IP address ranges. Verify there are no overlapping IP addresses and ensure IP ranges use Classless Inter-Domain Routing (CIDR) notation. For example, 172.16.0.0, 192.168.1.0/27. No value is assigned by default'
106
+ : Configures multiple IP addresses or IP address ranges (IPv4 or IPv6). Use commas to separate multiple IP addresses or IP address ranges. Verify there are no overlapping IP addresses and ensure IP ranges use Classless Inter-Domain Routing (CIDR) notation. For example, `172.16.0.0, 192.168.1.0/27`. No value is assigned by default
107
107
 
108
108
  `--IPAddressWACTokenLifetime [IPAddressWACTokenLifetime]`
109
109
  : Sets IP Address WAC token lifetime'
@@ -112,13 +112,13 @@ m365 spo tenant settings set [options]
112
112
  : Sets use find people in PeoplePicker to true or false. Note: When set to true, users aren\'t able to share with security groups or SharePoint groups. Allowed values `true,false`
113
113
 
114
114
  `--DefaultSharingLinkType [DefaultSharingLinkType]`
115
- : Lets administrators choose what type of link appears is selected in the “Get a link” sharing dialog box in OneDrive for Business and SharePoint Online. Allowed values None,Direct,Internal,AnonymousAccess
115
+ : Lets administrators choose what type of link appears is selected in the “Get a link” sharing dialog box in OneDrive for Business and SharePoint Online. Allowed values `None,Direct,Internal,AnonymousAccess`
116
116
 
117
117
  `--ODBMembersCanShare [ODBMembersCanShare]`
118
- : Lets administrators set policy on re-sharing behavior in OneDrive for Business. Allowed values Unspecified,On,Off
118
+ : Lets administrators set policy on re-sharing behavior in OneDrive for Business. Allowed values `Unspecified,On,Off`
119
119
 
120
120
  `--ODBAccessRequests [ODBAccessRequests]`
121
- : Lets administrators set policy on access requests and requests to share in OneDrive for Business. Allowed values Unspecified,On,Off
121
+ : Lets administrators set policy on access requests and requests to share in OneDrive for Business. Allowed values `Unspecified,On,Off`
122
122
 
123
123
  `--PreventExternalUsersFromResharing [PreventExternalUsersFromResharing]`
124
124
  : Prevents external users from resharing. Allowed values `true,false`
@@ -127,16 +127,16 @@ m365 spo tenant settings set [options]
127
127
  : Shows people picker suggestions for guest users. Allowed values `true,false`
128
128
 
129
129
  `--FileAnonymousLinkType [FileAnonymousLinkType]`
130
- : Sets the file anonymous link type to None, View or Edit
130
+ : Sets the file anonymous link type to `None`, `View` or `Edit`
131
131
 
132
132
  `--FolderAnonymousLinkType [FolderAnonymousLinkType]`
133
- : Sets the folder anonymous link type to None, View or Edit
133
+ : Sets the folder anonymous link type to `None`, `View` or `Edit`
134
134
 
135
135
  `--NotifyOwnersWhenItemsReshared [NotifyOwnersWhenItemsReshared]`
136
- : When this parameter is set to true and another user re-shares a document from a user\'s OneDrive for Business, the OneDrive for Business owner is notified by email. For additional information about how to configure notifications for external sharing, see Configure notifications for external sharing for OneDrive for Business. Allowed values `true,false`
136
+ : When this parameter is set to true and another user re-shares a document from a user's OneDrive for Business, the OneDrive for Business owner is notified by email. For additional information about how to configure notifications for external sharing, see Configure notifications for external sharing for OneDrive for Business. Allowed values `true,false`
137
137
 
138
138
  `--NotifyOwnersWhenInvitationsAccepted [NotifyOwnersWhenInvitationsAccepted]`
139
- : When this parameter is set to true and when an external user accepts an invitation to a resource in a user\'s OneDrive for Business, the OneDrive for Business owner is notified by email. For additional information about how to configure notifications for external sharing, see Configure notifications for external sharing for OneDrive for Business. Allowed values `true,false`
139
+ : When this parameter is set to true and when an external user accepts an invitation to a resource in a user's OneDrive for Business, the OneDrive for Business owner is notified by email. For additional information about how to configure notifications for external sharing, see Configure notifications for external sharing for OneDrive for Business. Allowed values `true,false`
140
140
 
141
141
  `--NotificationsInOneDriveForBusinessEnabled [NotificationsInOneDriveForBusinessEnabled]`
142
142
  : Enables or disables notifications in OneDrive for business. Allowed values `true,false`
@@ -154,16 +154,16 @@ m365 spo tenant settings set [options]
154
154
  : Enables or disables social bar on site pages. Allowed values `true,false`
155
155
 
156
156
  `--OrphanedPersonalSitesRetentionPeriod [OrphanedPersonalSitesRetentionPeriod]`
157
- : Specifies the number of days after a user\'s Active Directory account is deleted that their OneDrive for Business content will be deleted. The value range is in days, between 30 and 3650. The default value is 30'
157
+ : Specifies the number of days after a user's Active Directory account is deleted that their OneDrive for Business content will be deleted. The value range is in days, between 30 and 3650. The default value is 30
158
158
 
159
159
  `--DisallowInfectedFileDownload [DisallowInfectedFileDownload]`
160
160
  : Prevents the Download button from being displayed on the Virus Found warning page. Allowed values `true,false`
161
161
 
162
162
  `--DefaultLinkPermission [DefaultLinkPermission]`
163
- : Choose the dafault permission that is selected when users share. This applies to anonymous access, internal and direct links. Allowed values None,View,Edit
163
+ : Choose the dafault permission that is selected when users share. This applies to anonymous access, internal and direct links. Allowed values `None,View,Edit`
164
164
 
165
165
  `--ConditionalAccessPolicy [ConditionalAccessPolicy]`
166
- : Configures conditional access policy. Allowed values AllowFullAccess,AllowLimitedAccess,BlockAccess
166
+ : Configures conditional access policy. Allowed values `AllowFullAccess,AllowLimitedAccess,BlockAccess`
167
167
 
168
168
  `--AllowDownloadingNonWebViewableFiles [AllowDownloadingNonWebViewableFiles]`
169
169
  : Allows downloading non web viewable files. The Allowed values `true,false`
@@ -181,7 +181,7 @@ m365 spo tenant settings set [options]
181
181
  : Sets email attestation to required. Allowed values `true,false`
182
182
 
183
183
  `--EmailAttestationReAuthDays [EmailAttestationReAuthDays]`
184
- : Sets email attestation re-auth days'
184
+ : Sets email attestation re-auth days
185
185
 
186
186
  `--HideDefaultThemes [HideDefaultThemes]`
187
187
  : Defines if the default themes are visible or hidden. Allowed values `true,false`
@@ -223,7 +223,7 @@ m365 spo tenant settings set [options]
223
223
  : Is unmanaged sync client for tenant restricted. Allowed values `true,false`
224
224
 
225
225
  `--LimitedAccessFileType [LimitedAccessFileType]`
226
- : Allows users to preview only Office files in the browser. This option increases security but may be a barrier to user productivity. Allowed values OfficeOnlineFilesOnly,WebPreviewableFiles,OtherFiles
226
+ : Allows users to preview only Office files in the browser. This option increases security but may be a barrier to user productivity. Allowed values `OfficeOnlineFilesOnly,WebPreviewableFiles,OtherFiles`
227
227
 
228
228
  `--OptOutOfGrooveBlock [OptOutOfGrooveBlock]`
229
229
  : Opts out of the groove block. Allowed values `true,false`
@@ -241,23 +241,29 @@ m365 spo tenant settings set [options]
241
241
  : Show NGSC dialog for sync on OneDrive for Business. Allowed values `true,false`
242
242
 
243
243
  `--SpecialCharactersStateInFileFolderNames [SpecialCharactersStateInFileFolderNames]`
244
- : Sets the special characters state in file and folder names in SharePoint and OneDrive for Business. Allowed values NoPreference,Allowed,Disallowed
244
+ : Sets the special characters state in file and folder names in SharePoint and OneDrive for Business. Allowed values `NoPreference,Allowed,Disallowed`
245
245
 
246
246
  `--SyncPrivacyProfileProperties [SyncPrivacyProfileProperties]`
247
247
  : Syncs privacy profile properties. Allowed values `true,false`
248
248
 
249
249
  `--ExcludedFileExtensionsForSyncClient [ExcludedFileExtensionsForSyncClient]`
250
- : Excluded file extensions for sync client. Array of strings split by comma (\',\')'
250
+ : Excluded file extensions for sync client. Array of strings split by comma
251
251
 
252
252
  `--AllowedDomainListForSyncClient [AllowedDomainListForSyncClient]`
253
- : Sets allowed domain list for sync client. Array of GUIDs split by comma (\',\'). Example:c9b1909e-901a-0000-2cdb-e91c3f46320a,c9b1909e-901a-0000-2cdb-e91c3f463201'
253
+ : Sets allowed domain list for sync client. Array of GUIDs split by comma. Example: `c9b1909e-901a-0000-2cdb-e91c3f46320a,c9b1909e-901a-0000-2cdb-e91c3f463201`
254
254
 
255
255
  `--DisabledWebPartIds [DisabledWebPartIds]`
256
- : Sets disabled web part Ids. Array of GUIDs split by comma (\',\'). Example:c9b1909e-901a-0000-2cdb-e91c3f46320a,c9b1909e-901a-0000-2cdb-e91c3f463201'
256
+ : Sets disabled web part Ids. Array of GUIDs split by comma. Example: `c9b1909e-901a-0000-2cdb-e91c3f46320a,c9b1909e-901a-0000-2cdb-e91c3f463201`
257
257
 
258
258
  `--DisableCustomAppAuthentication [DisableCustomAppAuthentication]`
259
259
  : Configure if ACS-based app-only auth should be disabled or not. Allowed values `true,false`
260
260
 
261
+ `--EnableAzureADB2BIntegration [EnableAzureADB2BIntegration]`
262
+ : Enables the preview for OneDrive and SharePoint integration with Azure AD B2B. Allowed values `true,false`. Azure AD one-time passcode needs to be enabled for this integration to work. For more information see [http://aka.ms/spo-b2b-integration](https://aka.ms/spo-b2b-integration).
263
+
264
+ `--SyncAadB2BManagementPolicy [SyncAadB2BManagementPolicy]`
265
+ : Syncs Azure B2B Management Policies. Allowed values `true,false`. For more information, see [SharePoint and OneDrive integration with Azure AD B2B](https://aka.ms/spo-b2b-integration).
266
+
261
267
  !!! important
262
268
  To use this command you have to have permissions to access the tenant admin site.
263
269
 
@@ -274,3 +280,16 @@ Sets multiple tenant global settings at once
274
280
  ```sh
275
281
  m365 spo tenant settings set --UserVoiceForFeedbackEnabled true --HideSyncButtonOnODB true --AllowedDomainListForSyncClient c9b1909e-901a-0000-2cdb-e91c3f46320a,c9b1909e-901a-0000-2cdb-e91c3f463201
276
282
  ```
283
+
284
+ Enable Azure AD B2B integration for SharePoint and OneDrive and sync the Azure AD B2B management policies
285
+
286
+ ```sh
287
+ m365 spo tenant settings set --EnableAzureADB2BIntegration true
288
+ m365 spo tenant settings set --SyncAadB2BManagementPolicy true
289
+ ```
290
+
291
+ Disable Azure AD B2B integration for SharePoint and OneDrive
292
+
293
+ ```sh
294
+ m365 spo tenant settings set --EnableAzureADB2BIntegration false
295
+ ```
@@ -22,6 +22,12 @@ m365 teams channel add [options]
22
22
  `-d, --description [description]`
23
23
  : The description of the channel to add
24
24
 
25
+ `--type [type]`
26
+ : Type of channel to create: `standard,private`. Default `standard`.
27
+
28
+ `--owner [owner]`
29
+ : User with this ID or UPN will be added as owner of the private channel. This option is required when type is `private`.
30
+
25
31
  --8<-- "docs/cmd/_global.md"
26
32
 
27
33
  ## Remarks
@@ -41,3 +47,15 @@ Add channel to the specified Microsoft Teams team with name _Team Name_
41
47
  ```sh
42
48
  m365 teams channel add --teamName "Team Name" --name climicrosoft365 --description development
43
49
  ```
50
+
51
+ Add private channel to the specified Microsoft Teams team with owner UPN
52
+
53
+ ```sh
54
+ m365 teams channel add --teamName "Team Name" --name climicrosoft365 --type private --owner john.doe@contoso.com
55
+ ```
56
+
57
+ Add private channel to the specified Microsoft Teams team with owner ID
58
+
59
+ ```sh
60
+ m365 teams channel add --teamId 6703ac8a-c49b-4fd4-8223-28f0ac3a6402 --name climicrosoft365 --type private --owner cc693a7d-4833-4911-a89a-f0fe6e49bf69
61
+ ```
@@ -16,18 +16,27 @@ m365 teams channel list [options]
16
16
  `--teamName [teamName]`
17
17
  : The display name of the team to list the channels of. Specify either `teamId` or `teamName` but not both
18
18
 
19
+ `--type [type]`
20
+ : Filter the results to only channels of a given type: `standard, private`. By default all channels are listed.
21
+
19
22
  --8<-- "docs/cmd/_global.md"
20
23
 
21
24
  ## Examples
22
25
 
23
- List the channels in a specified Microsoft Teams team with id 00000000-0000-0000-0000-000000000000
26
+ List all channels in a specified Microsoft Teams team with id 00000000-0000-0000-0000-000000000000
24
27
 
25
28
  ```sh
26
29
  m365 teams channel list --teamId 00000000-0000-0000-0000-000000000000
27
30
  ```
28
31
 
29
- List the channels in a specified Microsoft Teams team with name _Team Name_
32
+ List all channels in a specified Microsoft Teams team with name _Team Name_
30
33
 
31
34
  ```sh
32
35
  m365 teams channel list --teamName "Team Name"
36
+ ```
37
+
38
+ List private channels in a specified Microsoft Teams team with id 00000000-0000-0000-0000-000000000000
39
+
40
+ ```sh
41
+ m365 teams channel list --teamId 00000000-0000-0000-0000-000000000000 --type private
33
42
  ```
@@ -0,0 +1,51 @@
1
+ # teams channel member set
2
+
3
+ Updates the role of the specified member in the specified Microsoft Teams private team channel
4
+
5
+ ## Usage
6
+
7
+ ```sh
8
+ m365 teams channel member set [options]
9
+ ```
10
+
11
+ ## Options
12
+
13
+ `--teamId [teamId]`
14
+ : The Id of the Microsoft Teams team. Specify either `teamId` or `teamName` but not both
15
+
16
+ `--teamName [teamName]`
17
+ : The display name of the Microsoft Teams team. Specify either `teamId` or `teamName` but not both
18
+
19
+ `--channelId [channelId]`
20
+ : The Id of the Microsoft Teams team channel. Specify either `channelId` or `channelName` but not both
21
+
22
+ `--channelName [channelName]`
23
+ : The display name of the Microsoft Teams team channel. Specify either `channelId` or `channelName` but not both
24
+
25
+ `--userName [userName]`
26
+ : User's UPN (user principal name, e.g. johndoe@example.com). Specify either userName, userId or id but not multiple.
27
+
28
+ `--userId [userId]`
29
+ : User's Azure AD Id. Specify either userName, userId or id but not multiple.
30
+
31
+ `--id [id]`
32
+ : Channel member Id of a user. Specify either userName, userId or id but not multiple.
33
+
34
+ `-r, --role <role>`
35
+ : The role to be assigned to the user: owner, member.
36
+
37
+ --8<-- "docs/cmd/_global.md"
38
+
39
+ ## Examples
40
+
41
+ Updates the role of the user _johndoe@example.com_ to owner in the Microsoft Teams team with id 00000000-0000-0000-0000-000000000000 and channel id 00:00000000000000000000000000000000@thread.skype
42
+
43
+ ```sh
44
+ m365 teams channel member set --teamId 00000000-0000-0000-0000-000000000000 --channelId 00:00000000000000000000000000000000@thread.skype --userName "johndoe@example.com" --role owner
45
+ ```
46
+
47
+ Updates the role of the user with id 00000000-0000-0000-0000-000000000000 to member in the Microsoft Teams team with name _Team Name_ and channel with name _Channel Name_
48
+
49
+ ```sh
50
+ m365 teams channel member set --teamName "Team Name" --channelName "Channel Name" --userId 00000000-0000-0000-0000-000000000000 --role member
51
+ ```
@@ -19,7 +19,7 @@ m365 teams channel membership list [options]
19
19
  `--channelId [channelId]`
20
20
  : The Id of the Microsoft Teams team channel. Specify either `channelId` or `channelName` but not both
21
21
 
22
- `channelName [channelName]`
22
+ `--channelName [channelName]`
23
23
  : The display name of the Microsoft Teams team channel. Specify either `channelId` or `channelName` but not both
24
24
 
25
25
  `-r, --role [role]`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pnp/cli-microsoft365",
3
- "version": "5.2.0-beta.119724d",
3
+ "version": "5.2.0-beta.4df87d9",
4
4
  "description": "Manage Microsoft 365 and SharePoint Framework projects on any platform",
5
5
  "license": "MIT",
6
6
  "main": "./dist/api.js",
@@ -25,7 +25,7 @@
25
25
  "test": "npm run test:version && npm run lint && npm run test:cov",
26
26
  "test:version": "node scripts/check-version.js",
27
27
  "test:cov": "c8 npm run test:test",
28
- "test:test": "mocha \"dist/**/*.spec.js\" --timeout 10000",
28
+ "test:test": "mocha",
29
29
  "lint": "eslint --ext .ts src"
30
30
  },
31
31
  "keywords": [