@pnp/cli-microsoft365 6.9.0-beta.41bb38c → 6.9.0-beta.91abae4

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/Dockerfile CHANGED
@@ -1,4 +1,4 @@
1
- FROM mcr.microsoft.com/powershell:alpine-3.12
1
+ FROM mcr.microsoft.com/powershell:alpine-3.17
2
2
 
3
3
  ARG CLI_VERSION=latest
4
4
 
@@ -48,6 +48,7 @@ RUN bash -c 'echo "export PATH=$PATH:/home/cli-microsoft365/.npm-global/bin:/hom
48
48
  && bash -c 'm365 cli completion sh setup' \
49
49
  && pwsh -c 'm365 cli completion pwsh setup --profile $profile'
50
50
 
51
+ RUN pip install setuptools==58
51
52
  RUN pip install jmespath-terminal
52
53
 
53
54
  CMD [ "bash", "-l" ]
@@ -13,7 +13,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
13
13
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
14
14
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
15
15
  };
16
- var _FlowListCommand_instances, _FlowListCommand_initTelemetry, _FlowListCommand_initOptions;
16
+ var _FlowListCommand_instances, _FlowListCommand_initTelemetry, _FlowListCommand_initOptions, _FlowListCommand_initValidators;
17
17
  Object.defineProperty(exports, "__esModule", { value: true });
18
18
  const formatting_1 = require("../../../utils/formatting");
19
19
  const AzmgmtItemsListCommand_1 = require("../../base/AzmgmtItemsListCommand");
@@ -31,14 +31,28 @@ class FlowListCommand extends AzmgmtItemsListCommand_1.AzmgmtItemsListCommand {
31
31
  constructor() {
32
32
  super();
33
33
  _FlowListCommand_instances.add(this);
34
+ this.allowedSharingStatuses = ['all', 'personal', 'ownedByMe', 'sharedWithMe'];
34
35
  __classPrivateFieldGet(this, _FlowListCommand_instances, "m", _FlowListCommand_initTelemetry).call(this);
35
36
  __classPrivateFieldGet(this, _FlowListCommand_instances, "m", _FlowListCommand_initOptions).call(this);
37
+ __classPrivateFieldGet(this, _FlowListCommand_instances, "m", _FlowListCommand_initValidators).call(this);
36
38
  }
37
39
  commandAction(logger, args) {
38
40
  return __awaiter(this, void 0, void 0, function* () {
39
41
  const url = `${this.resource}providers/Microsoft.ProcessSimple${args.options.asAdmin ? '/scopes/admin' : ''}/environments/${formatting_1.formatting.encodeQueryParameter(args.options.environmentName)}/flows?api-version=2016-11-01`;
40
42
  try {
41
- yield this.getAllItems(url, logger, true);
43
+ if (args.options.asAdmin || !args.options.sharingStatus || args.options.sharingStatus === 'ownedByMe') {
44
+ yield this.getAllItems(url, logger, true);
45
+ }
46
+ else if (args.options.sharingStatus === 'personal') {
47
+ yield this.getFilteredItems(url, logger, 'personal', true);
48
+ }
49
+ else if (args.options.sharingStatus === 'sharedWithMe') {
50
+ yield this.getFilteredItems(url, logger, 'team', true);
51
+ }
52
+ else {
53
+ yield this.getFilteredItems(url, logger, 'personal', true);
54
+ yield this.getFilteredItems(url, logger, 'team', false);
55
+ }
42
56
  if (this.items.length > 0) {
43
57
  this.items.forEach(i => {
44
58
  i.displayName = i.properties.displayName;
@@ -56,19 +70,38 @@ class FlowListCommand extends AzmgmtItemsListCommand_1.AzmgmtItemsListCommand {
56
70
  }
57
71
  });
58
72
  }
73
+ getFilteredItems(url, logger, filter, firstRun) {
74
+ return __awaiter(this, void 0, void 0, function* () {
75
+ yield this.getAllItems(`${url}&$filter=search('${filter}')`, logger, firstRun);
76
+ });
77
+ }
59
78
  }
60
79
  _FlowListCommand_instances = new WeakSet(), _FlowListCommand_initTelemetry = function _FlowListCommand_initTelemetry() {
61
80
  this.telemetry.push((args) => {
62
81
  Object.assign(this.telemetryProperties, {
82
+ sharingStatus: typeof args.options.sharingStatus !== 'undefined',
63
83
  asAdmin: !!args.options.asAdmin
64
84
  });
65
85
  });
66
86
  }, _FlowListCommand_initOptions = function _FlowListCommand_initOptions() {
67
87
  this.options.unshift({
68
88
  option: '-e, --environmentName <environmentName>'
89
+ }, {
90
+ option: '--sharingStatus [sharingStatus]',
91
+ autocomplete: this.allowedSharingStatuses
69
92
  }, {
70
93
  option: '--asAdmin'
71
94
  });
95
+ }, _FlowListCommand_initValidators = function _FlowListCommand_initValidators() {
96
+ this.validators.push((args) => __awaiter(this, void 0, void 0, function* () {
97
+ if (args.options.asAdmin && args.options.sharingStatus) {
98
+ return `The options asAdmin and sharingStatus cannot be specified together.`;
99
+ }
100
+ if (args.options.sharingStatus && !this.allowedSharingStatuses.some(status => status === args.options.sharingStatus)) {
101
+ return `${args.options.sharingStatus} is not a valid sharing status. Allowed values are: ${this.allowedSharingStatuses.join(',')}`;
102
+ }
103
+ return true;
104
+ }));
72
105
  };
73
106
  module.exports = new FlowListCommand();
74
107
  //# sourceMappingURL=flow-list.js.map
@@ -91,13 +91,12 @@ class SpoContentTypeSetCommand extends SpoCommand_1.default {
91
91
  if (this.verbose) {
92
92
  logger.logToStderr(`Updating content type...`);
93
93
  }
94
- const payload = this.getRequestPayload(options);
95
94
  const requestOptions = {
96
95
  url: `${options.webUrl}/_vti_bin/client.svc/ProcessQuery`,
97
96
  headers: {
98
97
  'Content-Type': 'text/xml'
99
98
  },
100
- data: `<Request AddExpandoFieldTypeSuffix="true" SchemaVersion="15.0.0.0" LibraryVersion="16.0.0.0" ApplicationName="${config_1.default.applicationName}" xmlns="http://schemas.microsoft.com/sharepoint/clientquery/2009"><Actions>${payload}</Actions><ObjectPaths><Identity Id="9" Name="fc4179a0-e0d7-5000-c38b-bc3506fbab6f|740c6a0b-85e2-48a0-a494-e0f1759d4aa7:site:${siteId}:web:${webId}:contenttype:${formatting_1.formatting.escapeXml(contentTypeId)}" /></ObjectPaths></Request>`
99
+ data: yield this.getCsomCallXmlBody(options, siteId, webId, contentTypeId)
101
100
  };
102
101
  const res = yield request_1.default.post(requestOptions);
103
102
  const json = JSON.parse(res);
@@ -107,6 +106,13 @@ class SpoContentTypeSetCommand extends SpoCommand_1.default {
107
106
  }
108
107
  });
109
108
  }
109
+ getCsomCallXmlBody(options, siteId, webId, contentTypeId) {
110
+ return __awaiter(this, void 0, void 0, function* () {
111
+ const payload = this.getRequestPayload(options);
112
+ const list = yield this.getListId(options);
113
+ return `<Request AddExpandoFieldTypeSuffix="true" SchemaVersion="15.0.0.0" LibraryVersion="16.0.0.0" ApplicationName="${config_1.default.applicationName}" xmlns="http://schemas.microsoft.com/sharepoint/clientquery/2009"><Actions>${payload}</Actions><ObjectPaths><Identity Id="9" Name="fc4179a0-e0d7-5000-c38b-bc3506fbab6f|740c6a0b-85e2-48a0-a494-e0f1759d4aa7:site:${siteId}:web:${webId}${list}:contenttype:${formatting_1.formatting.escapeXml(contentTypeId)}" /></ObjectPaths></Request>`;
114
+ });
115
+ }
110
116
  getRequestPayload(options) {
111
117
  const excludeOptions = [
112
118
  'webUrl',
@@ -130,6 +136,9 @@ class SpoContentTypeSetCommand extends SpoCommand_1.default {
130
136
  if (options.updateChildren) {
131
137
  payload.push(`<Method Name="Update" Id="${i++}" ObjectPathId="9"><Parameters><Parameter Type="Boolean">true</Parameter></Parameters></Method>`);
132
138
  }
139
+ else {
140
+ payload.push(`<Method Name="Update" Id="${i++}" ObjectPathId="9"><Parameters><Parameter Type="Boolean">false</Parameter></Parameters></Method>`);
141
+ }
133
142
  return payload.join('');
134
143
  }
135
144
  getSiteId(logger, webUrl) {
@@ -164,6 +173,41 @@ class SpoContentTypeSetCommand extends SpoCommand_1.default {
164
173
  return web.Id;
165
174
  });
166
175
  }
176
+ getListId(options) {
177
+ return __awaiter(this, void 0, void 0, function* () {
178
+ if (!options.listId && !options.listTitle && !options.listUrl) {
179
+ return '';
180
+ }
181
+ let baseString = ':list:';
182
+ if (options.listId) {
183
+ return baseString += options.listId;
184
+ }
185
+ else if (options.listTitle) {
186
+ const requestOptions = {
187
+ url: `${options.webUrl}/_api/web/lists/getByTitle('${formatting_1.formatting.encodeQueryParameter(options.listTitle)}')?$select=Id`,
188
+ headers: {
189
+ accept: 'application/json;odata=nometadata'
190
+ },
191
+ responseType: 'json'
192
+ };
193
+ const listResponse = yield request_1.default.get(requestOptions);
194
+ baseString += listResponse.Id;
195
+ }
196
+ else if (options.listUrl) {
197
+ const listServerRelativeUrl = urlUtil_1.urlUtil.getServerRelativePath(options.webUrl, options.listUrl);
198
+ const requestOptions = {
199
+ url: `${options.webUrl}/_api/web/GetList('${formatting_1.formatting.encodeQueryParameter(listServerRelativeUrl)}')?$select=Id`,
200
+ headers: {
201
+ accept: 'application/json;odata=nometadata'
202
+ },
203
+ responseType: 'json'
204
+ };
205
+ const listResponse = yield request_1.default.get(requestOptions);
206
+ baseString += listResponse.Id;
207
+ }
208
+ return baseString;
209
+ });
210
+ }
167
211
  }
168
212
  _SpoContentTypeSetCommand_instances = new WeakSet(), _SpoContentTypeSetCommand_initTelemetry = function _SpoContentTypeSetCommand_initTelemetry() {
169
213
  this.telemetry.push((args) => {
@@ -204,6 +248,9 @@ _SpoContentTypeSetCommand_instances = new WeakSet(), _SpoContentTypeSetCommand_i
204
248
  if ((args.options.listId && (args.options.listTitle || args.options.listUrl)) || (args.options.listTitle && args.options.listUrl)) {
205
249
  return `Specify either listTitle, listId or listUrl.`;
206
250
  }
251
+ if ((args.options.listId || args.options.listTitle || args.options.listUrl) && args.options.updateChildren) {
252
+ return 'It is impossible to pass updateChildren when trying to update a list content type.';
253
+ }
207
254
  return true;
208
255
  }));
209
256
  }, _SpoContentTypeSetCommand_initTypes = function _SpoContentTypeSetCommand_initTypes() {
@@ -42,14 +42,14 @@ class SpoTermGroupAddCommand extends SpoCommand_1.default {
42
42
  let formDigest = '';
43
43
  let termGroup;
44
44
  try {
45
- const spoAdminUrl = yield spo_1.spo.getSpoAdminUrl(logger, this.debug);
46
- const res = yield spo_1.spo.getRequestDigest(spoAdminUrl);
45
+ const webUrl = args.options.webUrl || (yield spo_1.spo.getSpoAdminUrl(logger, this.debug));
46
+ const res = yield spo_1.spo.getRequestDigest(webUrl);
47
47
  formDigest = res.FormDigestValue;
48
48
  if (this.verbose) {
49
49
  logger.logToStderr(`Getting taxonomy term store...`);
50
50
  }
51
51
  const requestOptionsPost = {
52
- url: `${spoAdminUrl}/_vti_bin/client.svc/ProcessQuery`,
52
+ url: `${webUrl}/_vti_bin/client.svc/ProcessQuery`,
53
53
  headers: {
54
54
  'X-RequestDigest': res.FormDigestValue
55
55
  },
@@ -67,7 +67,7 @@ class SpoTermGroupAddCommand extends SpoCommand_1.default {
67
67
  logger.logToStderr(`Adding taxonomy term group...`);
68
68
  }
69
69
  const requestOptions = {
70
- url: `${spoAdminUrl}/_vti_bin/client.svc/ProcessQuery`,
70
+ url: `${webUrl}/_vti_bin/client.svc/ProcessQuery`,
71
71
  headers: {
72
72
  'X-RequestDigest': formDigest
73
73
  },
@@ -86,7 +86,7 @@ class SpoTermGroupAddCommand extends SpoCommand_1.default {
86
86
  logger.logToStderr(`Setting taxonomy term group description...`);
87
87
  }
88
88
  const requestOptionsQuery = {
89
- url: `${spoAdminUrl}/_vti_bin/client.svc/ProcessQuery`,
89
+ url: `${webUrl}/_vti_bin/client.svc/ProcessQuery`,
90
90
  headers: {
91
91
  'X-RequestDigest': formDigest
92
92
  },
@@ -117,7 +117,8 @@ _SpoTermGroupAddCommand_instances = new WeakSet(), _SpoTermGroupAddCommand_initT
117
117
  this.telemetry.push((args) => {
118
118
  Object.assign(this.telemetryProperties, {
119
119
  description: typeof args.options.id !== 'undefined',
120
- id: typeof args.options.id !== 'undefined'
120
+ id: typeof args.options.id !== 'undefined',
121
+ webUrl: typeof args.options.webUrl !== 'undefined'
121
122
  });
122
123
  });
123
124
  }, _SpoTermGroupAddCommand_initOptions = function _SpoTermGroupAddCommand_initOptions() {
@@ -127,13 +128,16 @@ _SpoTermGroupAddCommand_instances = new WeakSet(), _SpoTermGroupAddCommand_initT
127
128
  option: '-i, --id [id]'
128
129
  }, {
129
130
  option: '-d, --description [description]'
131
+ }, {
132
+ option: '-u, --webUrl [webUrl]'
130
133
  });
131
134
  }, _SpoTermGroupAddCommand_initValidators = function _SpoTermGroupAddCommand_initValidators() {
132
135
  this.validators.push((args) => __awaiter(this, void 0, void 0, function* () {
133
- if (args.options.id) {
134
- if (!validation_1.validation.isValidGuid(args.options.id)) {
135
- return `${args.options.id} is not a valid GUID`;
136
- }
136
+ if (args.options.id && !validation_1.validation.isValidGuid(args.options.id)) {
137
+ return `${args.options.id} is not a valid GUID`;
138
+ }
139
+ if (args.options.webUrl) {
140
+ return validation_1.validation.isValidSharePointUrl(args.options.webUrl);
137
141
  }
138
142
  return true;
139
143
  }));
@@ -13,20 +13,13 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
13
13
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
14
14
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
15
15
  };
16
- var _TeamsTeamAddCommand_instances, _TeamsTeamAddCommand_initTelemetry, _TeamsTeamAddCommand_initOptions, _TeamsTeamAddCommand_initValidators;
16
+ var _TeamsTeamAddCommand_instances, _TeamsTeamAddCommand_initTelemetry, _TeamsTeamAddCommand_initOptions, _TeamsTeamAddCommand_initOptionSets;
17
17
  Object.defineProperty(exports, "__esModule", { value: true });
18
18
  const request_1 = require("../../../../request");
19
19
  const aadGroup_1 = require("../../../../utils/aadGroup");
20
20
  const GraphCommand_1 = require("../../../base/GraphCommand");
21
21
  const commands_1 = require("../../commands");
22
- var TeamsAsyncOperationStatus;
23
- (function (TeamsAsyncOperationStatus) {
24
- TeamsAsyncOperationStatus["Invalid"] = "invalid";
25
- TeamsAsyncOperationStatus["NotStarted"] = "notStarted";
26
- TeamsAsyncOperationStatus["InProgress"] = "inProgress";
27
- TeamsAsyncOperationStatus["Succeeded"] = "succeeded";
28
- TeamsAsyncOperationStatus["Failed"] = "failed";
29
- })(TeamsAsyncOperationStatus || (TeamsAsyncOperationStatus = {}));
22
+ const promises_1 = require("timers/promises");
30
23
  class TeamsTeamAddCommand extends GraphCommand_1.default {
31
24
  get name() {
32
25
  return commands_1.default.TEAM_ADD;
@@ -40,7 +33,7 @@ class TeamsTeamAddCommand extends GraphCommand_1.default {
40
33
  this.pollingInterval = 30000;
41
34
  __classPrivateFieldGet(this, _TeamsTeamAddCommand_instances, "m", _TeamsTeamAddCommand_initTelemetry).call(this);
42
35
  __classPrivateFieldGet(this, _TeamsTeamAddCommand_instances, "m", _TeamsTeamAddCommand_initOptions).call(this);
43
- __classPrivateFieldGet(this, _TeamsTeamAddCommand_instances, "m", _TeamsTeamAddCommand_initValidators).call(this);
36
+ __classPrivateFieldGet(this, _TeamsTeamAddCommand_instances, "m", _TeamsTeamAddCommand_initOptionSets).call(this);
44
37
  }
45
38
  commandAction(logger, args) {
46
39
  return __awaiter(this, void 0, void 0, function* () {
@@ -64,6 +57,9 @@ class TeamsTeamAddCommand extends GraphCommand_1.default {
64
57
  }
65
58
  }
66
59
  else {
60
+ if (this.verbose) {
61
+ logger.logToStderr(`Creating team with name ${args.options.name} and description ${args.options.description}`);
62
+ }
67
63
  requestBody = {
68
64
  'template@odata.bind': `https://graph.microsoft.com/v1.0/teamsTemplates('standard')`,
69
65
  displayName: args.options.name,
@@ -87,50 +83,57 @@ class TeamsTeamAddCommand extends GraphCommand_1.default {
87
83
  },
88
84
  responseType: 'json'
89
85
  };
90
- const teamsAsyncOperation = yield new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
91
- const teamsAsyncOperation = yield request_1.default.get(requestOptions);
92
- if (!args.options.wait) {
93
- resolve(teamsAsyncOperation);
94
- }
95
- else {
96
- setTimeout(() => {
97
- this.waitUntilFinished(requestOptions, resolve, reject, logger);
98
- }, this.pollingInterval);
99
- }
100
- }));
101
- let output;
86
+ const teamsAsyncOperation = yield request_1.default.get(requestOptions);
102
87
  if (!args.options.wait) {
103
- output = teamsAsyncOperation;
88
+ logger.log(teamsAsyncOperation);
104
89
  }
105
90
  else {
106
- output = yield aadGroup_1.aadGroup.getGroupById(teamsAsyncOperation.targetResourceId);
91
+ yield this.waitUntilTeamFinishedProvisioning(teamsAsyncOperation, requestOptions, logger);
92
+ const aadGroup = yield this.getAadGroup(teamsAsyncOperation.targetResourceId, logger);
93
+ logger.log(aadGroup);
107
94
  }
108
- logger.log(output);
109
95
  }
110
96
  catch (err) {
111
97
  this.handleRejectedODataJsonPromise(err);
112
98
  }
113
99
  });
114
100
  }
115
- waitUntilFinished(requestOptions, resolve, reject, logger) {
116
- request_1.default
117
- .get(requestOptions)
118
- .then((teamsAsyncOperation) => {
119
- if (teamsAsyncOperation.status === TeamsAsyncOperationStatus.Succeeded) {
101
+ waitUntilTeamFinishedProvisioning(teamsAsyncOperation, requestOptions, logger) {
102
+ return __awaiter(this, void 0, void 0, function* () {
103
+ if (teamsAsyncOperation.status === 'succeeded') {
120
104
  if (this.verbose) {
121
- process.stdout.write('\n');
105
+ logger.logToStderr('Team provisioned succesfully. Returning...');
122
106
  }
123
- resolve(teamsAsyncOperation);
124
107
  return;
125
108
  }
126
- if (teamsAsyncOperation.error) {
127
- reject(teamsAsyncOperation.error);
128
- return;
109
+ else if (teamsAsyncOperation.error) {
110
+ throw teamsAsyncOperation.error;
111
+ }
112
+ else {
113
+ if (this.verbose) {
114
+ logger.logToStderr(`Team still provisioning. Retrying in ${this.pollingInterval / 1000} seconds...`);
115
+ }
116
+ yield (0, promises_1.setTimeout)(this.pollingInterval);
117
+ teamsAsyncOperation = yield request_1.default.get(requestOptions);
118
+ yield this.waitUntilTeamFinishedProvisioning(teamsAsyncOperation, requestOptions, logger);
119
+ }
120
+ });
121
+ }
122
+ getAadGroup(id, logger) {
123
+ return __awaiter(this, void 0, void 0, function* () {
124
+ let group;
125
+ try {
126
+ group = yield aadGroup_1.aadGroup.getGroupById(id);
127
+ }
128
+ catch (_a) {
129
+ if (this.verbose) {
130
+ logger.logToStderr(`Error occured on retrieving the aad group. Retrying in ${this.pollingInterval / 1000} seconds.`);
131
+ }
132
+ yield (0, promises_1.setTimeout)(this.pollingInterval);
133
+ return yield this.getAadGroup(id, logger);
129
134
  }
130
- setTimeout(() => {
131
- this.waitUntilFinished(requestOptions, resolve, reject, logger);
132
- }, this.pollingInterval);
133
- }).catch(err => reject(err));
135
+ return group;
136
+ });
134
137
  }
135
138
  }
136
139
  _TeamsTeamAddCommand_instances = new WeakSet(), _TeamsTeamAddCommand_initTelemetry = function _TeamsTeamAddCommand_initTelemetry() {
@@ -152,18 +155,18 @@ _TeamsTeamAddCommand_instances = new WeakSet(), _TeamsTeamAddCommand_initTelemet
152
155
  }, {
153
156
  option: '--wait'
154
157
  });
155
- }, _TeamsTeamAddCommand_initValidators = function _TeamsTeamAddCommand_initValidators() {
156
- this.validators.push((args) => __awaiter(this, void 0, void 0, function* () {
157
- if (!args.options.template) {
158
- if (!args.options.name) {
159
- return `Required parameter name missing`;
160
- }
161
- if (!args.options.description) {
162
- return `Required parameter description missing`;
163
- }
158
+ }, _TeamsTeamAddCommand_initOptionSets = function _TeamsTeamAddCommand_initOptionSets() {
159
+ this.optionSets.push({
160
+ options: ['name'],
161
+ runsWhen: (args) => {
162
+ return !args.options.template;
164
163
  }
165
- return true;
166
- }));
164
+ }, {
165
+ options: ['description'],
166
+ runsWhen: (args) => {
167
+ return !args.options.template;
168
+ }
169
+ });
167
170
  };
168
171
  module.exports = new TeamsTeamAddCommand();
169
172
  //# sourceMappingURL=team-add.js.map
@@ -16,10 +16,13 @@ m365 flow list [options]
16
16
 
17
17
  ```md definition-list
18
18
  `-e, --environmentName <environmentName>`
19
- : The name of the environment for which to retrieve available flows
19
+ : The name of the environment for which to retrieve available flows.
20
+
21
+ `--sharingStatus [sharingStatus]`
22
+ : List a specific type of flows. Valid values: `ownedByMe`, `personal`, `sharedWithMe`, `all`. Defaults to `ownedByMe`. Don't specify this option when using asAdmin.
20
23
 
21
24
  `--asAdmin`
22
- : Set, to list all Flows as admin. Otherwise will return only your own flows
25
+ : Set, to list all Flows as admin. Otherwise will return only your own flows.
23
26
  ```
24
27
 
25
28
  <Global />
@@ -34,7 +37,12 @@ This command is based on an API that is currently in preview and is subject to c
34
37
 
35
38
  If the environment with the name you specified doesn't exist, you will get the `Access to the environment 'xyz' is denied.` error.
36
39
 
37
- By default, the `flow list` command returns only your flows. To list all flows, use the `asAdmin` option.
40
+ When you specify a value for `sharingStatus`, consider the following:
41
+
42
+ - `ownedByMe` returns all flows created by you regardless of whether they are shared or not.
43
+ - `personal` returns all flows created by you which are not shared.
44
+ - `sharedWithMe` returns flows that are shared with you, or created by you and shared with someone.
45
+ - `all` combines `personal` and `sharedWithMe`.
38
46
 
39
47
  ## Examples
40
48
 
@@ -1,4 +1,6 @@
1
1
  import Global from '/docs/cmd/_global.mdx';
2
+ import Tabs from '@theme/Tabs';
3
+ import TabItem from '@theme/TabItem';
2
4
 
3
5
  # spo term group add
4
6
 
@@ -21,15 +23,22 @@ m365 spo term group add [options]
21
23
 
22
24
  `-d, --description [description]`
23
25
  : Description of the term group to add
26
+
27
+ `-u, --webUrl [webUrl]`
28
+ : If specified, allows you to add a term group to the tenant term store as a term store administrator without the SharePoint administrator role.
24
29
  ```
25
30
 
26
31
  <Global />
27
32
 
28
33
  ## Remarks
29
34
 
30
- :::info
35
+ :::caution
36
+
37
+ To use this command without the `--webUrl` option you must have permissions to access the tenant admin site.
31
38
 
32
- To use this command you have to have permissions to access the tenant admin site.
39
+ When using the `--webUrl` option you can connect to the term store with limited permissions, and do not need the SharePoint Adminstrator role. It allows you to add a term group to the tenant term store if you are listed as a term store administrator.
40
+
41
+ This command does not create a sitecollection specific term store/group when using the `--webUrl` option.
33
42
 
34
43
  :::
35
44
 
@@ -47,8 +56,58 @@ Add a new taxonomy term group with the specified name and id
47
56
  m365 spo term group add --name PnPTermSets --id 0e8f395e-ff58-4d45-9ff7-e331ab728beb
48
57
  ```
49
58
 
50
- Add a new taxonomy term group with the specified name and description
59
+ Add a new taxonomy term group with the specified name and description with limited permissions
51
60
 
52
61
  ```sh
53
- m365 spo term group add --name PnPTermSets --description 'Term sets for PnP'
62
+ m365 spo term group add --name PnPTermSets --description 'Term sets for PnP' --webUrl 'https://contoso.sharepoint.com'
54
63
  ```
64
+
65
+ ## Response
66
+
67
+ <Tabs>
68
+ <TabItem value="JSON">
69
+
70
+ ```json
71
+ {
72
+ "Name": "PnPTermSets",
73
+ "Id": "cafe662c-c3fa-4c83-bcb0-50b701b37164",
74
+ "Description": "Term sets for PnP"
75
+ }
76
+ ```
77
+
78
+ </TabItem>
79
+ <TabItem value="Text">
80
+
81
+ ```text
82
+ Description: Term sets for PnP
83
+ Id : cafe662c-c3fa-4c83-bcb0-50b701b37164
84
+ Name : PnPTermSets
85
+ ```
86
+
87
+ </TabItem>
88
+ <TabItem value="CSV">
89
+
90
+ ```csv
91
+ Name,Id,Description
92
+ PnPTermSets,cafe662c-c3fa-4c83-bcb0-50b701b37164,Term sets for PnP
93
+ ```
94
+
95
+ </TabItem>
96
+ <TabItem value="Markdown">
97
+
98
+ ```md
99
+ # spo term group add --name "PnPTermSets" --description 'Term sets for PnP'
100
+
101
+ Date: 24/05/2023
102
+
103
+ ## PnPTermSets (cafe662c-c3fa-4c83-bcb0-50b701b37164)
104
+
105
+ | Property | Value |
106
+ | ----------- | ------------------------------------ |
107
+ | Name | PnPTermSets |
108
+ | Id | cafe662c-c3fa-4c83-bcb0-50b701b37164 |
109
+ | Description | Term sets for PnP |
110
+ ```
111
+
112
+ </TabItem>
113
+ </Tabs>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pnp/cli-microsoft365",
3
- "version": "6.9.0-beta.41bb38c",
3
+ "version": "6.9.0-beta.91abae4",
4
4
  "description": "Manage Microsoft 365 and SharePoint Framework projects on any platform",
5
5
  "license": "MIT",
6
6
  "main": "./dist/api.js",