@pnp/cli-microsoft365 4.0.0-beta.f87506e → 4.1.0-beta.6c0929c

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 (74) hide show
  1. package/.devcontainer/Dockerfile +3 -3
  2. package/dist/Auth.js +25 -9
  3. package/dist/Utils.js +6 -0
  4. package/dist/cli/Cli.js +4 -4
  5. package/dist/m365/aad/commands/app/app-add.js +1 -1
  6. package/dist/m365/aad/commands/app/app-role-add.js +1 -1
  7. package/dist/m365/aad/commands/o365group/o365group-get.js +0 -4
  8. package/dist/m365/aad/commands/o365group/o365group-teamify.js +14 -4
  9. package/dist/m365/aad/commands/o365group/o365group-user-list.js +5 -24
  10. package/dist/m365/aad/commands/siteclassification/siteclassification-disable.js +2 -2
  11. package/dist/m365/aad/commands/user/user-set.js +90 -0
  12. package/dist/m365/aad/commands.js +2 -1
  13. package/dist/m365/base/SpoCommand.js +13 -0
  14. package/dist/m365/commands/login.js +12 -0
  15. package/dist/m365/file/commands/convert/convert-pdf.js +2 -2
  16. package/dist/m365/onedrive/commands/onedrive-list.js +41 -24
  17. package/dist/m365/pa/commands/pcf/pcf-init.js +1 -1
  18. package/dist/m365/pa/commands/solution/solution-init.js +1 -1
  19. package/dist/m365/planner/commands/plan/plan-get.js +116 -0
  20. package/dist/m365/planner/commands/task/task-list.js +157 -7
  21. package/dist/m365/planner/commands.js +1 -0
  22. package/dist/m365/spfx/commands/package/package-generate.js +1 -1
  23. package/dist/m365/spfx/commands/project/project-rename.js +1 -1
  24. package/dist/m365/spfx/commands/project/project-upgrade/rules/DependencyRule.js +3 -3
  25. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN006004_CFG_PS_developer.js +7 -6
  26. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN023001_GITIGNORE_release.js +3 -9
  27. package/dist/m365/spfx/commands/project/project-upgrade/{upgrade-1.13.0-beta.15.js → upgrade-1.13.0-beta.20.js} +26 -28
  28. package/dist/m365/spfx/commands/project/project-upgrade.js +3 -3
  29. package/dist/m365/spfx/commands/spfx-doctor.js +1 -1
  30. package/dist/m365/spo/commands/app/app-instance-list.js +59 -0
  31. package/dist/m365/spo/commands/file/file-add.js +1 -1
  32. package/dist/m365/spo/commands/file/file-list.js +2 -1
  33. package/dist/m365/spo/commands/group/group-user-list.js +66 -0
  34. package/dist/m365/spo/commands/listitem/listitem-get.js +5 -5
  35. package/dist/m365/spo/commands/page/Page.js +1 -1
  36. package/dist/m365/spo/commands/page/page-clientsidewebpart-add.js +3 -3
  37. package/dist/m365/spo/commands/page/page-control-get.js +9 -1
  38. package/dist/m365/spo/commands/page/page-control-list.js +10 -13
  39. package/dist/m365/spo/commands/page/page-section-add.js +1 -1
  40. package/dist/m365/spo/commands/page/page-text-add.js +2 -2
  41. package/dist/m365/spo/commands/site/site-apppermission-remove.js +162 -0
  42. package/dist/m365/spo/commands/site/site-classic-list.js +41 -24
  43. package/dist/m365/spo/commands/site/site-list.js +44 -28
  44. package/dist/m365/spo/commands/sitedesign/sitedesign-set.js +7 -0
  45. package/dist/m365/spo/commands/spo-search.js +3 -3
  46. package/dist/m365/spo/commands/term/term-add.js +1 -1
  47. package/dist/m365/spo/commands/term/term-group-add.js +1 -1
  48. package/dist/m365/spo/commands/term/term-set-add.js +1 -1
  49. package/dist/m365/spo/commands/theme/theme-list.js +1 -1
  50. package/dist/m365/spo/commands.js +3 -0
  51. package/dist/m365/teams/commands/channel/channel-list.js +5 -4
  52. package/dist/m365/teams/commands/conversationmember/conversationmember-add.js +9 -8
  53. package/dist/m365/teams/commands/conversationmember/conversationmember-list.js +20 -22
  54. package/dist/m365/teams/commands/team/team-get.js +91 -0
  55. package/dist/m365/teams/commands/team/team-list.js +6 -4
  56. package/dist/m365/teams/commands/user/user-list.js +5 -24
  57. package/dist/m365/viva/commands/connections/connections-app-create.js +1 -1
  58. package/docs/docs/cmd/aad/o365group/o365group-teamify.md +0 -5
  59. package/docs/docs/cmd/aad/o365group/o365group-user-list.md +2 -17
  60. package/docs/docs/cmd/aad/siteclassification/siteclassification-disable.md +0 -5
  61. package/docs/docs/cmd/aad/user/user-set.md +60 -0
  62. package/docs/docs/cmd/login.md +11 -2
  63. package/docs/docs/cmd/planner/plan/plan-get.md +45 -0
  64. package/docs/docs/cmd/planner/task/task-list.md +49 -1
  65. package/docs/docs/cmd/spfx/project/project-upgrade.md +1 -1
  66. package/docs/docs/cmd/spo/app/app-instance-list.md +24 -0
  67. package/docs/docs/cmd/spo/group/group-user-list.md +36 -0
  68. package/docs/docs/cmd/spo/listitem/listitem-get.md +3 -3
  69. package/docs/docs/cmd/spo/site/site-apppermission-remove.md +48 -0
  70. package/docs/docs/cmd/spo/sitedesign/sitedesign-set.md +3 -0
  71. package/docs/docs/cmd/teams/team/team-get.md +33 -0
  72. package/docs/docs/cmd/teams/user/user-list.md +2 -23
  73. package/npm-shrinkwrap.json +432 -333
  74. package/package.json +22 -20
@@ -51,7 +51,7 @@ class SpoTermGroupAddCommand extends SpoCommand_1.default {
51
51
  return Promise.reject(response.ErrorInfo.ErrorMessage);
52
52
  }
53
53
  const termStore = json[json.length - 1];
54
- const termGroupId = args.options.id || uuid_1.v4();
54
+ const termGroupId = args.options.id || (0, uuid_1.v4)();
55
55
  if (this.verbose) {
56
56
  logger.logToStderr(`Adding taxonomy term group...`);
57
57
  }
@@ -41,7 +41,7 @@ class SpoTermSetAddCommand extends SpoCommand_1.default {
41
41
  const termGroupQuery = args.options.termGroupName ?
42
42
  `<Method Id="42" ParentId="40" Name="GetByName"><Parameters><Parameter Type="String">${Utils_1.default.escapeXml(args.options.termGroupName)}</Parameter></Parameters></Method>` :
43
43
  `<Method Id="42" ParentId="40" Name="GetById"><Parameters><Parameter Type="Guid">{${args.options.termGroupId}}</Parameter></Parameters></Method>`;
44
- const termSetId = args.options.id || uuid_1.v4();
44
+ const termSetId = args.options.id || (0, uuid_1.v4)();
45
45
  const requestOptions = {
46
46
  url: `${spoAdminUrl}/_vti_bin/client.svc/ProcessQuery`,
47
47
  headers: {
@@ -11,7 +11,7 @@ class SpoThemeListCommand extends SpoCommand_1.default {
11
11
  return 'Retrieves the list of custom themes';
12
12
  }
13
13
  defaultProperties() {
14
- return ['Name'];
14
+ return ['name'];
15
15
  }
16
16
  commandAction(logger, args, cb) {
17
17
  this
@@ -6,6 +6,7 @@ exports.default = {
6
6
  APP_DEPLOY: `${prefix} app deploy`,
7
7
  APP_GET: `${prefix} app get`,
8
8
  APP_INSTALL: `${prefix} app install`,
9
+ APP_INSTANCE_LIST: `${prefix} app instance list`,
9
10
  APP_LIST: `${prefix} app list`,
10
11
  APP_REMOVE: `${prefix} app remove`,
11
12
  APP_RETRACT: `${prefix} app retract`,
@@ -61,6 +62,7 @@ exports.default = {
61
62
  GROUP_LIST: `${prefix} group list`,
62
63
  GROUP_REMOVE: `${prefix} group remove`,
63
64
  GROUP_USER_ADD: `${prefix} group user add`,
65
+ GROUP_USER_LIST: `${prefix} group user list`,
64
66
  HIDEDEFAULTTHEMES_GET: `${prefix} hidedefaultthemes get`,
65
67
  HIDEDEFAULTTHEMES_SET: `${prefix} hidedefaultthemes set`,
66
68
  HOMESITE_GET: `${prefix} homesite get`,
@@ -168,6 +170,7 @@ exports.default = {
168
170
  SITE_APPPERMISSION_ADD: `${prefix} site apppermission add`,
169
171
  SITE_APPPERMISSION_GET: `${prefix} site apppermission get`,
170
172
  SITE_APPPERMISSION_LIST: `${prefix} site apppermission list`,
173
+ SITE_APPPERMISSION_REMOVE: `${prefix} site apppermission remove`,
171
174
  SITE_APPPERMISSION_SET: `${prefix} site apppermission set`,
172
175
  SITE_CLASSIC_ADD: `${prefix} site classic add`,
173
176
  SITE_CLASSIC_LIST: `${prefix} site classic list`,
@@ -25,7 +25,7 @@ class TeamsChannelListCommand extends GraphItemsListCommand_1.GraphItemsListComm
25
25
  return Promise.resolve(args.options.teamId);
26
26
  }
27
27
  const requestOptions = {
28
- url: `${this.resource}/beta/groups?$filter=resourceProvisioningOptions/Any(x:x eq 'Team') and displayName eq '${encodeURIComponent(args.options.teamName)}'`,
28
+ url: `${this.resource}/v1.0/groups?$filter=displayName eq '${encodeURIComponent(args.options.teamName)}'`,
29
29
  headers: {
30
30
  accept: 'application/json;odata.metadata=none'
31
31
  },
@@ -34,12 +34,13 @@ class TeamsChannelListCommand extends GraphItemsListCommand_1.GraphItemsListComm
34
34
  return request_1.default
35
35
  .get(requestOptions)
36
36
  .then(response => {
37
- const groupItem = response.value[0];
37
+ const filteredResponseByTeam = response.value.filter(t => t.resourceProvisioningOptions.includes('Team'));
38
+ const groupItem = filteredResponseByTeam[0];
38
39
  if (!groupItem) {
39
40
  return Promise.reject(`The specified team does not exist in the Microsoft Teams`);
40
41
  }
41
- if (response.value.length > 1) {
42
- return Promise.reject(`Multiple Microsoft Teams teams with name ${args.options.teamName} found: ${response.value.map(x => x.id)}`);
42
+ if (filteredResponseByTeam.length > 1) {
43
+ return Promise.reject(`Multiple Microsoft Teams teams with name ${args.options.teamName} found: ${filteredResponseByTeam.map(x => x.id)}`);
43
44
  }
44
45
  return Promise.resolve(groupItem.id);
45
46
  });
@@ -121,25 +121,26 @@ class TeamsConversationMemberAddCommand extends GraphCommand_1.default {
121
121
  if (args.options.teamId) {
122
122
  return Promise.resolve(args.options.teamId);
123
123
  }
124
- const teamRequestOptions = {
125
- url: `${this.resource}/beta/groups?$filter=resourceProvisioningOptions/Any(x:x eq 'Team') and displayName eq '${encodeURIComponent(args.options.teamName)}'`,
124
+ const requestOptions = {
125
+ url: `${this.resource}/v1.0/groups?$filter=displayName eq '${encodeURIComponent(args.options.teamName)}'`,
126
126
  headers: {
127
127
  accept: 'application/json;odata.metadata=none'
128
128
  },
129
129
  responseType: 'json'
130
130
  };
131
131
  return request_1.default
132
- .get(teamRequestOptions)
132
+ .get(requestOptions)
133
133
  .then(response => {
134
- const teamItem = response.value[0];
135
- if (!teamItem) {
134
+ const filteredResponseByTeam = response.value.filter(t => t.resourceProvisioningOptions.includes('Team'));
135
+ const groupItem = filteredResponseByTeam[0];
136
+ if (!groupItem) {
136
137
  return Promise.reject(`The specified team '${args.options.teamName}' does not exist in Microsoft Teams`);
137
138
  }
138
- if (response.value.length > 1) {
139
+ if (filteredResponseByTeam.length > 1) {
139
140
  return Promise.reject(`Multiple Microsoft Teams with name '${args.options.teamName}' found. Please disambiguate:${os.EOL}${response.value.map(x => `- ${x.id}`).join(os.EOL)}`);
140
141
  }
141
- return Promise.resolve(teamItem.id);
142
- }, err => { return Promise.reject(err); });
142
+ return Promise.resolve(groupItem.id);
143
+ });
143
144
  }
144
145
  getChannelId(teamId, args) {
145
146
  if (args.options.channelId) {
@@ -1,10 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const request_1 = require("../../../../request");
4
+ const Utils_1 = require("../../../../Utils");
4
5
  const GraphItemsListCommand_1 = require("../../../base/GraphItemsListCommand");
5
6
  const commands_1 = require("../../commands");
6
- const Utils_1 = require("../../../../Utils");
7
- const os = require("os");
8
7
  class TeamsConversationMemberListCommand extends GraphItemsListCommand_1.GraphItemsListCommand {
9
8
  constructor() {
10
9
  super(...arguments);
@@ -93,26 +92,25 @@ class TeamsConversationMemberListCommand extends GraphItemsListCommand_1.GraphIt
93
92
  if (args.options.teamId) {
94
93
  return Promise.resolve(args.options.teamId);
95
94
  }
96
- return new Promise((resolve, reject) => {
97
- const teamRequestOptions = {
98
- url: `${this.resource}/beta/groups?$filter=resourceProvisioningOptions/Any(x:x eq 'Team') and displayName eq '${encodeURIComponent(args.options.teamName)}'`,
99
- headers: {
100
- accept: 'application/json;odata.metadata=none'
101
- },
102
- responseType: 'json'
103
- };
104
- request_1.default
105
- .get(teamRequestOptions)
106
- .then(response => {
107
- const teamItem = response.value[0];
108
- if (!teamItem) {
109
- return reject(`The specified team '${args.options.teamName}' does not exist in Microsoft Teams`);
110
- }
111
- if (response.value.length > 1) {
112
- return reject(`Multiple Microsoft Teams with name '${args.options.teamName}' found. Please disambiguate:${os.EOL}${response.value.map(x => `- ${x.id}`).join(os.EOL)}`);
113
- }
114
- return resolve(teamItem.id);
115
- }, err => { reject(err); });
95
+ const requestOptions = {
96
+ url: `${this.resource}/v1.0/groups?$filter=displayName eq '${encodeURIComponent(args.options.teamName)}'`,
97
+ headers: {
98
+ accept: 'application/json;odata.metadata=none'
99
+ },
100
+ responseType: 'json'
101
+ };
102
+ return request_1.default
103
+ .get(requestOptions)
104
+ .then(response => {
105
+ const filteredResponseByTeam = response.value.filter(t => t.resourceProvisioningOptions.includes('Team'));
106
+ const groupItem = filteredResponseByTeam[0];
107
+ if (!groupItem) {
108
+ return Promise.reject(`The specified team '${args.options.teamName}' does not exist in the Microsoft Teams`);
109
+ }
110
+ if (filteredResponseByTeam.length > 1) {
111
+ return Promise.reject(`Multiple Microsoft Teams teams with name '${args.options.teamName}' found: ${filteredResponseByTeam.map(x => x.id)}`);
112
+ }
113
+ return Promise.resolve(groupItem.id);
116
114
  });
117
115
  }
118
116
  getChannelId(teamId, args) {
@@ -0,0 +1,91 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const request_1 = require("../../../../request");
4
+ const Utils_1 = require("../../../../Utils");
5
+ const GraphCommand_1 = require("../../../base/GraphCommand");
6
+ const commands_1 = require("../../commands");
7
+ class TeamsTeamGetCommand extends GraphCommand_1.default {
8
+ get name() {
9
+ return commands_1.default.TEAM_GET;
10
+ }
11
+ get description() {
12
+ return 'Retrieve information about the specified Microsoft Team';
13
+ }
14
+ getTelemetryProperties(args) {
15
+ const telemetryProps = super.getTelemetryProperties(args);
16
+ telemetryProps.id = typeof args.options.id !== 'undefined';
17
+ telemetryProps.name = typeof args.options.name !== 'undefined';
18
+ return telemetryProps;
19
+ }
20
+ getTeamId(args) {
21
+ if (args.options.id) {
22
+ return Promise.resolve(args.options.id);
23
+ }
24
+ const requestOptions = {
25
+ url: `${this.resource}/v1.0/groups?$filter=displayName eq '${encodeURIComponent(args.options.name)}'&$select=id,resourceProvisioningOptions`,
26
+ headers: {
27
+ accept: 'application/json;odata.metadata=none'
28
+ },
29
+ responseType: 'json'
30
+ };
31
+ return request_1.default
32
+ .get(requestOptions)
33
+ .then(response => {
34
+ const groupItem = response.value[0];
35
+ if (!groupItem) {
36
+ return Promise.reject(`The specified team does not exist in the Microsoft Teams`);
37
+ }
38
+ if (groupItem.resourceProvisioningOptions.indexOf('Team') === -1) {
39
+ return Promise.reject(`The specified team does not exist in the Microsoft Teams`);
40
+ }
41
+ if (response.value.length >= 2) {
42
+ return Promise.reject(`Multiple Microsoft Teams teams with name ${args.options.name} found: ${response.value.map(x => x.id)}`);
43
+ }
44
+ return Promise.resolve(groupItem.id);
45
+ });
46
+ }
47
+ commandAction(logger, args, cb) {
48
+ this
49
+ .getTeamId(args)
50
+ .then((teamId) => {
51
+ const requestOptions = {
52
+ url: `${this.resource}/v1.0/teams/${encodeURIComponent(teamId)}`,
53
+ headers: {
54
+ accept: 'application/json;odata.metadata=none'
55
+ },
56
+ responseType: 'json'
57
+ };
58
+ return request_1.default.get(requestOptions);
59
+ })
60
+ .then((res) => {
61
+ logger.log(res);
62
+ cb();
63
+ }, (err) => this.handleRejectedODataJsonPromise(err, logger, cb));
64
+ }
65
+ options() {
66
+ const options = [
67
+ {
68
+ option: '-i, --id [id]'
69
+ },
70
+ {
71
+ option: '-n, --name [name]'
72
+ }
73
+ ];
74
+ const parentOptions = super.options();
75
+ return options.concat(parentOptions);
76
+ }
77
+ validate(args) {
78
+ if (args.options.id && args.options.name) {
79
+ return 'Specify either teamId or teamName, but not both.';
80
+ }
81
+ if (!args.options.id && !args.options.name) {
82
+ return 'Specify teamId or teamName, one is required';
83
+ }
84
+ if (args.options.id && !Utils_1.default.isValidGuid(args.options.id)) {
85
+ return `${args.options.id} is not a valid GUID`;
86
+ }
87
+ return true;
88
+ }
89
+ }
90
+ module.exports = new TeamsTeamGetCommand();
91
+ //# sourceMappingURL=team-get.js.map
@@ -16,9 +16,9 @@ class TeamsTeamListCommand extends GraphItemsListCommand_1.GraphItemsListCommand
16
16
  return telemetryProps;
17
17
  }
18
18
  commandAction(logger, args, cb) {
19
- let endpoint = `${this.resource}/beta/groups?$filter=resourceProvisioningOptions/Any(x:x eq 'Team')&$select=id,displayName,description`;
19
+ let endpoint = `${this.resource}/v1.0/groups?$select=id,displayName,description,resourceProvisioningOptions`;
20
20
  if (args.options.joined) {
21
- endpoint = `${this.resource}/beta/me/joinedTeams`;
21
+ endpoint = `${this.resource}/v1.0/me/joinedTeams`;
22
22
  }
23
23
  this
24
24
  .getAllItems(endpoint, logger, true)
@@ -27,7 +27,9 @@ class TeamsTeamListCommand extends GraphItemsListCommand_1.GraphItemsListCommand
27
27
  return Promise.resolve();
28
28
  }
29
29
  else {
30
- return Promise.all(this.items.map(g => this.getTeamFromGroup(g)));
30
+ return Promise.all(this.items.filter((e) => {
31
+ return e.resourceProvisioningOptions.indexOf('Team') > -1;
32
+ }).map(g => this.getTeamFromGroup(g)));
31
33
  }
32
34
  })
33
35
  .then((res) => {
@@ -41,7 +43,7 @@ class TeamsTeamListCommand extends GraphItemsListCommand_1.GraphItemsListCommand
41
43
  getTeamFromGroup(group) {
42
44
  return new Promise((resolve, reject) => {
43
45
  const requestOptions = {
44
- url: `${this.resource}/beta/teams/${group.id}`,
46
+ url: `${this.resource}/v1.0/teams/${group.id}`,
45
47
  headers: {
46
48
  accept: 'application/json;odata.metadata=none'
47
49
  },
@@ -1,6 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- const chalk = require("chalk");
4
3
  const Utils_1 = require("../../../../Utils");
5
4
  const GraphItemsListCommand_1 = require("../../../base/GraphItemsListCommand");
6
5
  const commands_1 = require("../../commands");
@@ -9,24 +8,21 @@ class TeamsUserListCommand extends GraphItemsListCommand_1.GraphItemsListCommand
9
8
  return commands_1.default.USER_LIST;
10
9
  }
11
10
  get description() {
12
- return "Lists users for the specified Microsoft 365 group or Microsoft Teams team";
11
+ return "Lists users for the specified Microsoft Teams team";
13
12
  }
14
13
  getTelemetryProperties(args) {
15
14
  const telemetryProps = super.getTelemetryProperties(args);
16
15
  telemetryProps.role = args.options.role;
17
- telemetryProps.teamId = typeof args.options.teamId !== 'undefined';
18
- telemetryProps.groupId = typeof args.options.groupId !== 'undefined';
19
16
  return telemetryProps;
20
17
  }
21
18
  commandAction(logger, args, cb) {
22
- const providedGroupId = (typeof args.options.groupId !== 'undefined') ? args.options.groupId : args.options.teamId;
23
19
  this
24
- .getOwners(logger, providedGroupId)
20
+ .getOwners(logger, args.options.teamId)
25
21
  .then(() => {
26
22
  if (args.options.role === "Owner") {
27
23
  return Promise.resolve();
28
24
  }
29
- return this.getMembersAndGuests(logger, providedGroupId);
25
+ return this.getMembersAndGuests(logger, args.options.teamId);
30
26
  })
31
27
  .then(() => {
32
28
  // Filter out duplicate added values for owners (as they are returned as members as well)
@@ -36,9 +32,6 @@ class TeamsUserListCommand extends GraphItemsListCommand_1.GraphItemsListCommand
36
32
  this.items = this.items.filter(i => i.userType === args.options.role);
37
33
  }
38
34
  logger.log(this.items);
39
- if (this.verbose) {
40
- logger.logToStderr(chalk.green("DONE"));
41
- }
42
35
  cb();
43
36
  }, (err) => this.handleRejectedODataJsonPromise(err, logger, cb));
44
37
  }
@@ -59,10 +52,7 @@ class TeamsUserListCommand extends GraphItemsListCommand_1.GraphItemsListCommand
59
52
  options() {
60
53
  const options = [
61
54
  {
62
- option: "-i, --groupId [groupId]"
63
- },
64
- {
65
- option: "--teamId [teamId]"
55
+ option: "-i, --teamId <teamId>"
66
56
  },
67
57
  {
68
58
  option: "-r, --role [type]",
@@ -73,18 +63,9 @@ class TeamsUserListCommand extends GraphItemsListCommand_1.GraphItemsListCommand
73
63
  return options.concat(parentOptions);
74
64
  }
75
65
  validate(args) {
76
- if (!args.options.groupId && !args.options.teamId) {
77
- return 'Please provide one of the following parameters: groupId or teamId';
78
- }
79
- if (args.options.groupId && args.options.teamId) {
80
- return 'You cannot provide both a groupId and teamId parameter, please provide only one';
81
- }
82
- if (args.options.teamId && !Utils_1.default.isValidGuid(args.options.teamId)) {
66
+ if (!Utils_1.default.isValidGuid(args.options.teamId)) {
83
67
  return `${args.options.teamId} is not a valid GUID`;
84
68
  }
85
- if (args.options.groupId && !Utils_1.default.isValidGuid(args.options.groupId)) {
86
- return `${args.options.groupId} is not a valid GUID`;
87
- }
88
69
  if (args.options.role) {
89
70
  if (['Owner', 'Member', 'Guest'].indexOf(args.options.role) === -1) {
90
71
  return `${args.options.role} is not a valid role value. Allowed values Owner|Member|Guest`;
@@ -47,7 +47,7 @@ class VivaConnectionsAppCreateCommand extends AnonymousCommand_1.default {
47
47
  const outlineIconPath = path.resolve(args.options.outlineIconPath);
48
48
  const outlineIconFileName = path.basename(outlineIconPath);
49
49
  const domain = portalUrl.hostname;
50
- const appId = uuid_1.v4();
50
+ const appId = (0, uuid_1.v4)();
51
51
  const manifest = {
52
52
  "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.9/MicrosoftTeams.schema.json",
53
53
  "manifestVersion": "1.9",
@@ -15,11 +15,6 @@ m365 aad o365group teamify [options]
15
15
 
16
16
  --8<-- "docs/cmd/_global.md"
17
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
-
23
18
  ## Examples
24
19
 
25
20
  Creates a new Microsoft Teams team under existing Microsoft 365 group
@@ -1,6 +1,6 @@
1
1
  # aad o365group user list
2
2
 
3
- Lists users for the specified Microsoft 365 group or Microsoft Teams team
3
+ Lists users for the specified Microsoft 365 group
4
4
 
5
5
  ## Usage
6
6
 
@@ -10,12 +10,9 @@ m365 aad o365group user list [options]
10
10
 
11
11
  ## Options
12
12
 
13
- `-i, --groupId [groupId]`
13
+ `-i, --groupId <groupId>`
14
14
  : The ID of the Microsoft 365 group for which to list users
15
15
 
16
- `--teamId [teamId]`
17
- : The ID of the Microsoft Teams team for which to list users
18
-
19
16
  `-r, --role [role]`
20
17
  : Filter the results to only users with the given role: `Owner,Member,Guest`
21
18
 
@@ -40,15 +37,3 @@ m365 aad o365group user list --groupId '00000000-0000-0000-0000-000000000000' --
40
37
  ```sh
41
38
  m365 aad o365group user list --groupId '00000000-0000-0000-0000-000000000000' --role Guest
42
39
  ```
43
-
44
- List all users and their role in the specified Microsoft teams team
45
-
46
- ```sh
47
- m365 teams user list --teamId '00000000-0000-0000-0000-000000000000'
48
- ```
49
-
50
- List all owners and their role in the specified Microsoft teams team
51
-
52
- ```sh
53
- m365 teams user list --teamId '00000000-0000-0000-0000-000000000000' --role Owner
54
- ```
@@ -15,11 +15,6 @@ m365 aad siteclassification disable [options]
15
15
 
16
16
  --8<-- "docs/cmd/_global.md"
17
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
-
23
18
  ## Examples
24
19
 
25
20
  Disable site classification
@@ -0,0 +1,60 @@
1
+ # aad user set
2
+
3
+ Updates information of the specified user
4
+
5
+ ## Usage
6
+
7
+ ```sh
8
+ m365 aad user set [options]
9
+ ```
10
+
11
+ ## Options
12
+
13
+ `-i, --objectId [objectId]`
14
+ : The object ID of the user to update. Specify `objectId` or `userPrincipalName` but not both
15
+
16
+ `-n, --userPrincipalName [userPrincipalName]`
17
+ : User principal name of the user to update. Specify `objectId` or `userPrincipalName` but not both
18
+
19
+ `--accountEnabled [accountEnabled]`
20
+ : Boolean value specifying whether the account is enabled. Valid values are `true,false`
21
+
22
+ --8<-- "docs/cmd/_global.md"
23
+
24
+ ## Remarks
25
+
26
+ You can update information of a user, either by specifying that user's id (`objectId`) or user name (`userPrincipalName`), but not both.
27
+
28
+ If the user with the specified id or user name doesn't exist, you will get a `Resource 'xyz' does not exist or one of its queried reference-property objects are not present.` error.
29
+
30
+ ## Examples
31
+
32
+ Update specific property _department_ of user with id _1caf7dcd-7e83-4c3a-94f7-932a1299c844_
33
+
34
+ ```sh
35
+ m365 aad user set --objectId 1caf7dcd-7e83-4c3a-94f7-932a1299c844 --Department IT
36
+ ```
37
+
38
+ Update multiple properties of user with name _steve@contoso.onmicrosoft.com_
39
+
40
+ ```sh
41
+ m365 aad user set --userPrincipalName steve@contoso.onmicrosoft.com --Department "Sales & Marketing" --CompanyName Contoso
42
+ ```
43
+
44
+ Enable user with id _1caf7dcd-7e83-4c3a-94f7-932a1299c844_
45
+
46
+ ```sh
47
+ m365 aad user set --objectId 1caf7dcd-7e83-4c3a-94f7-932a1299c844 --accountEnabled true
48
+ ```
49
+
50
+ Disable user with id _1caf7dcd-7e83-4c3a-94f7-932a1299c844_
51
+
52
+ ```sh
53
+ m365 aad user set --objectId 1caf7dcd-7e83-4c3a-94f7-932a1299c844 --accountEnabled false
54
+ ```
55
+
56
+ Enable user with id _1caf7dcd-7e83-4c3a-94f7-932a1299c844_
57
+
58
+ ```sh
59
+ m365 aad user set --objectId 1caf7dcd-7e83-4c3a-94f7-932a1299c844 --accountEnabled true
60
+ ```
@@ -11,7 +11,7 @@ m365 login [options]
11
11
  ## Options
12
12
 
13
13
  `-t, --authType [authType]`
14
- : The type of authentication to use. Allowed values `certificate,deviceCode,password,identity,browser`. Default `deviceCode`
14
+ : The type of authentication to use. Allowed values `certificate,deviceCode,password,identity,browser,secret`. Default `deviceCode`
15
15
 
16
16
  `-u, --userName [userName]`
17
17
  : Name of the user to authenticate. Required when `authType` is set to `password`
@@ -28,6 +28,9 @@ m365 login [options]
28
28
  `--thumbprint [thumbprint]`
29
29
  : Certificate thumbprint. If not specified, and `authType` is set to `certificate`, it will be automatically calculated based on the specified certificate
30
30
 
31
+ `-s, --secret [secret]`
32
+ : Client Secret of the Azure AD application to use for authentication. Required when `authType` is set to `secret`.
33
+
31
34
  `--appId [appId]`
32
35
  : App ID of the Azure AD application to use for authentication. If not specified, use the app specified in the `CLIMICROSOFT365_AADAPPID` environment variable. If the environment variable is not defined, use the multitenant PnP Management Shell app
33
36
 
@@ -48,7 +51,7 @@ When logging in to Microsoft 365 using the user name and password, next to the a
48
51
 
49
52
  When logging in to Microsoft 365 using a certificate, the CLI for Microsoft 365 will store the contents of the certificate so that it can automatically re-authenticate if necessary. The contents of the certificate are removed by re-authenticating using the device code or by calling the [logout](logout.md) command.
50
53
 
51
- To log in to Microsoft 365 using a certificate, you will typically [create a custom Azure AD application](../user-guide/using-own-identity.md). To use this application with the CLI for Microsoft 365, you will set the `CLIMICROSOFT365_AADAPPID` environment variable to the application's ID and the `CLIMICROSOFT365_TENANT` environment variable to the ID of the Azure AD tenant, where you created the Azure AD application. Also, please make sure to read about [the caveats when using the certificate login option](../user-guide/cli-certificate-caveats.md).
54
+ To log in to Microsoft 365 using a certificate or secret, you will typically [create a custom Azure AD application](../user-guide/using-own-identity.md). To use this application with the CLI for Microsoft 365, you will set the `CLIMICROSOFT365_AADAPPID` environment variable to the application's ID and the `CLIMICROSOFT365_TENANT` environment variable to the ID of the Azure AD tenant, where you created the Azure AD application. Also, please make sure to read about [the caveats when using the certificate login option](../user-guide/cli-certificate-caveats.md).
52
55
 
53
56
  Managed identity in Azure Cloud Shell is the identity of the user. It is neither system- nor user-assigned and it can't be configured. To log in to Microsoft 365 using managed identity in Azure Cloud Shell, set `authType` to `identity` and don't specify the `userName` option.
54
57
 
@@ -150,3 +153,9 @@ Log in to Microsoft 365 using the interactive browser authentication. Uses the i
150
153
  ```sh
151
154
  m365 login --authType browser
152
155
  ```
156
+
157
+ Log in to Microsoft 365 using a client secret.
158
+
159
+ ```sh
160
+ m365 login --authType secret --secret topSeCr3t@007
161
+ ```
@@ -0,0 +1,45 @@
1
+ # planner plan get
2
+
3
+ Retrieve information about the specified plan
4
+
5
+ ## Usage
6
+
7
+ ```sh
8
+ m365 planner plan get [options]
9
+ ```
10
+
11
+ ## Options
12
+
13
+ `-i,--id [id]`
14
+ : ID of the plan. Specify either `id` or `title` but not both.
15
+
16
+ `-t,--title [title]`
17
+ : Title of the plan. Specify either `id` or `title` but not both.
18
+
19
+ `--ownerGroupId [ownerGroupId]`
20
+ : ID of the Group that owns the plan. Specify either `ownerGroupId` or `ownerGroupName` but not both.
21
+
22
+ `--ownerGroupName [ownerGroupName]`
23
+ : Name of the Group that owns the plan. Specify either `ownerGroupId` or `ownerGroupName` but not both.
24
+
25
+ --8<-- "docs/cmd/_global.md"
26
+
27
+ ## Examples
28
+
29
+ Returns the Microsoft Planner plan with id _gndWOTSK60GfPQfiDDj43JgACDCb_
30
+
31
+ ```sh
32
+ m365 planner plan get --id "gndWOTSK60GfPQfiDDj43JgACDCb"
33
+ ```
34
+
35
+ Returns the Microsoft Planner plan with title _MyPlan_ for Group _233e43d0-dc6a-482e-9b4e-0de7a7bce9b4_
36
+
37
+ ```sh
38
+ m365 planner plan get --title "MyPlan" --ownerGroupId "233e43d0-dc6a-482e-9b4e-0de7a7bce9b4"
39
+ ```
40
+
41
+ Returns the Microsoft Planner plan with title _MyPlan_ for Group _My Planner Group_
42
+
43
+ ```sh
44
+ m365 planner plan get --title "MyPlan" --ownerGroupName "My Planner Group"
45
+ ```
@@ -1,6 +1,6 @@
1
1
  # planner task list
2
2
 
3
- Lists Planner tasks for the currently logged in user
3
+ Lists planner tasks in a bucket, plan, or tasks for the currently logged in user
4
4
 
5
5
  ## Usage
6
6
 
@@ -10,6 +10,24 @@ m365 planner task list [options]
10
10
 
11
11
  ## Options
12
12
 
13
+ `--bucketId [bucketId]`
14
+ : ID of the bucket to list the tasks of. To retrieve tasks from a bucket, specify `bucketId` or `bucketName`, but not both.
15
+
16
+ `--bucketName [bucketName]`
17
+ : Name of the bucket to list the tasks of. To retrieve tasks from a bucket, specify `bucketId` or `bucketName`, but not both.
18
+
19
+ `--planId [planId]`
20
+ : ID of the plan to list the tasks of. Specify `planId` or `planName` when using `bucketName`.
21
+
22
+ `--planName [planName]`
23
+ : Name of the plan to list the tasks of. Specify `planId` or `planName` when using `bucketName`.
24
+
25
+ `--ownerGroupId [ownerGroupId]`
26
+ : ID of the group to which the plan belongs. Specify `ownerGroupId` or `ownerGroupName` when using `planName`.
27
+
28
+ `--ownerGroupName [ownerGroupName]`
29
+ : Name of the group to which the plan belongs. Specify `ownerGroupId` or `ownerGroupName` when using `planName`.
30
+
13
31
  --8<-- "docs/cmd/_global.md"
14
32
 
15
33
  ## Examples
@@ -19,3 +37,33 @@ List tasks for the currently logged in user
19
37
  ```sh
20
38
  m365 planner task list
21
39
  ```
40
+
41
+ List the Microsoft Planner tasks in the plan _iVPMIgdku0uFlou-KLNg6MkAE1O2_
42
+
43
+ ```sh
44
+ m365 planner task list --planId "iVPMIgdku0uFlou-KLNg6MkAE1O2"`
45
+ ```
46
+
47
+ List the Microsoft Planner tasks in the plan _My Plan_ in group _My Group_
48
+
49
+ ```sh
50
+ m365 planner task list --planName "My Plan" --ownerGroupName "My Group"
51
+ ```
52
+
53
+ List the Microsoft Planner tasks in the bucket _FtzysDykv0-9s9toWiZhdskAD67z_
54
+
55
+ ```sh
56
+ m365 planner task list --bucketId "FtzysDykv0-9s9toWiZhdskAD67z"
57
+ ```
58
+
59
+ List the Microsoft Planner tasks in the bucket _My Bucket_ belonging to plan _iVPMIgdku0uFlou-KLNg6MkAE1O2_
60
+
61
+ ```sh
62
+ m365 planner task list --bucketName "My Bucket" --planId "iVPMIgdku0uFlou-KLNg6MkAE1O2"
63
+ ```
64
+
65
+ List the Microsoft Planner tasks in the bucket _My Bucket_ belonging to plan _My Plan_ in group _My Group_
66
+
67
+ ```sh
68
+ m365 planner bucket tasks list --bucketName "My Bucket" --planName "My Plan" --ownerGroupName "My Group"
69
+ ```