@pnp/cli-microsoft365 6.8.0-beta.c5c3c32 → 6.8.0-beta.c74eb4b

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.
@@ -53,10 +53,17 @@ class SpoListGetCommand extends SpoCommand_1.default {
53
53
  const listServerRelativeUrl = urlUtil_1.urlUtil.getServerRelativePath(args.options.webUrl, args.options.url);
54
54
  requestUrl += `GetList('${formatting_1.formatting.encodeQueryParameter(listServerRelativeUrl)}')`;
55
55
  }
56
- let propertiesSelect = args.options.properties ? `?$select=${formatting_1.formatting.encodeQueryParameter(args.options.properties)}` : ``;
57
- propertiesSelect += args.options.withPermissions ? `${args.options.properties ? '&' : '?'}$expand=HasUniqueRoleAssignments,RoleAssignments/Member,RoleAssignments/RoleDefinitionBindings` : ``;
56
+ const fieldsProperties = this.formatSelectProperties(args.options.properties, args.options.withPermissions);
57
+ const queryParams = [];
58
+ if (fieldsProperties.selectProperties.length > 0) {
59
+ queryParams.push(`$select=${fieldsProperties.selectProperties.join(',')}`);
60
+ }
61
+ if (fieldsProperties.expandProperties.length > 0) {
62
+ queryParams.push(`$expand=${fieldsProperties.expandProperties.join(',')}`);
63
+ }
64
+ const querystring = queryParams.length > 0 ? `?${queryParams.join('&')}` : ``;
58
65
  const requestOptions = {
59
- url: requestUrl + propertiesSelect,
66
+ url: `${requestUrl}${querystring}`,
60
67
  headers: {
61
68
  'accept': 'application/json;odata=nometadata'
62
69
  },
@@ -76,6 +83,26 @@ class SpoListGetCommand extends SpoCommand_1.default {
76
83
  }
77
84
  });
78
85
  }
86
+ formatSelectProperties(properties, withPermissions) {
87
+ const selectProperties = [];
88
+ let expandProperties = [];
89
+ if (withPermissions) {
90
+ expandProperties = ['HasUniqueRoleAssignments', 'RoleAssignments/Member', 'RoleAssignments/RoleDefinitionBindings'];
91
+ }
92
+ if (properties) {
93
+ properties.split(',').forEach((property) => {
94
+ const subparts = property.trim().split('/');
95
+ if (subparts.length > 1) {
96
+ expandProperties.push(subparts[0]);
97
+ }
98
+ selectProperties.push(property.trim());
99
+ });
100
+ }
101
+ return {
102
+ selectProperties: [...new Set(selectProperties)],
103
+ expandProperties: [...new Set(expandProperties)]
104
+ };
105
+ }
79
106
  }
80
107
  _SpoListGetCommand_instances = new WeakSet(), _SpoListGetCommand_initTelemetry = function _SpoListGetCommand_initTelemetry() {
81
108
  this.telemetry.push((args) => {
@@ -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 _SpoListListCommand_instances, _SpoListListCommand_initOptions, _SpoListListCommand_initValidators;
16
+ var _SpoListListCommand_instances, _SpoListListCommand_initOptions, _SpoListListCommand_initValidators, _SpoListListCommand_initTelemetry;
17
17
  Object.defineProperty(exports, "__esModule", { value: true });
18
18
  const odata_1 = require("../../../../utils/odata");
19
19
  const validation_1 = require("../../../../utils/validation");
@@ -34,6 +34,7 @@ class SpoListListCommand extends SpoCommand_1.default {
34
34
  _SpoListListCommand_instances.add(this);
35
35
  __classPrivateFieldGet(this, _SpoListListCommand_instances, "m", _SpoListListCommand_initOptions).call(this);
36
36
  __classPrivateFieldGet(this, _SpoListListCommand_instances, "m", _SpoListListCommand_initValidators).call(this);
37
+ __classPrivateFieldGet(this, _SpoListListCommand_instances, "m", _SpoListListCommand_initTelemetry).call(this);
37
38
  }
38
39
  commandAction(logger, args) {
39
40
  return __awaiter(this, void 0, void 0, function* () {
@@ -41,7 +42,12 @@ class SpoListListCommand extends SpoCommand_1.default {
41
42
  logger.logToStderr(`Retrieving all lists in site at ${args.options.webUrl}...`);
42
43
  }
43
44
  try {
44
- const listInstances = yield odata_1.odata.getAllItems(`${args.options.webUrl}/_api/web/lists?$expand=RootFolder&$select=RootFolder/ServerRelativeUrl,*`);
45
+ const fieldProperties = this.formatSelectProperties(args.options.properties);
46
+ const queryParams = [`$expand=${fieldProperties.expandProperties.join(',')}`, `$select=${fieldProperties.selectProperties.join(',')}`];
47
+ if (args.options.filter) {
48
+ queryParams.push(`$filter=${args.options.filter}`);
49
+ }
50
+ const listInstances = yield odata_1.odata.getAllItems(`${args.options.webUrl}/_api/web/lists?${queryParams.join('&')}`);
45
51
  listInstances.forEach(l => {
46
52
  l.Url = l.RootFolder.ServerRelativeUrl;
47
53
  });
@@ -52,13 +58,44 @@ class SpoListListCommand extends SpoCommand_1.default {
52
58
  }
53
59
  });
54
60
  }
61
+ formatSelectProperties(fields) {
62
+ const selectProperties = ['RootFolder/ServerRelativeUrl'];
63
+ const expandProperties = ['RootFolder'];
64
+ if (!fields) {
65
+ selectProperties.push('*');
66
+ }
67
+ if (fields) {
68
+ fields.split(',').forEach((field) => {
69
+ const subparts = field.trim().split('/');
70
+ if (subparts.length > 1) {
71
+ expandProperties.push(subparts[0]);
72
+ }
73
+ selectProperties.push(field.trim());
74
+ });
75
+ }
76
+ return {
77
+ selectProperties: [...new Set(selectProperties)],
78
+ expandProperties: [...new Set(expandProperties)]
79
+ };
80
+ }
55
81
  }
56
82
  _SpoListListCommand_instances = new WeakSet(), _SpoListListCommand_initOptions = function _SpoListListCommand_initOptions() {
57
83
  this.options.unshift({
58
84
  option: '-u, --webUrl <webUrl>'
85
+ }, {
86
+ option: '-p, --properties [properties]'
87
+ }, {
88
+ option: '-f, --filter [filter]'
59
89
  });
60
90
  }, _SpoListListCommand_initValidators = function _SpoListListCommand_initValidators() {
61
91
  this.validators.push((args) => __awaiter(this, void 0, void 0, function* () { return validation_1.validation.isValidSharePointUrl(args.options.webUrl); }));
92
+ }, _SpoListListCommand_initTelemetry = function _SpoListListCommand_initTelemetry() {
93
+ this.telemetry.push((args) => {
94
+ Object.assign(this.telemetryProperties, {
95
+ properties: typeof args.options.properties !== 'undefined',
96
+ filter: typeof args.options.filter !== 'undefined'
97
+ });
98
+ });
62
99
  };
63
100
  module.exports = new SpoListListCommand();
64
101
  //# sourceMappingURL=list-list.js.map
@@ -43,8 +43,8 @@ class SpoTermAddCommand extends SpoCommand_1.default {
43
43
  let term;
44
44
  let formDigest;
45
45
  try {
46
- const spoAdminUrl = yield spo_1.spo.getSpoAdminUrl(logger, this.debug);
47
- const res = yield spo_1.spo.getRequestDigest(spoAdminUrl);
46
+ const spoWebUrl = args.options.webUrl ? args.options.webUrl : yield spo_1.spo.getSpoAdminUrl(logger, this.debug);
47
+ const res = yield spo_1.spo.getRequestDigest(spoWebUrl);
48
48
  formDigest = res.FormDigestValue;
49
49
  if (this.verbose) {
50
50
  logger.logToStderr(`Adding taxonomy term...`);
@@ -58,7 +58,7 @@ class SpoTermAddCommand extends SpoCommand_1.default {
58
58
  const termId = args.options.id || (0, uuid_1.v4)();
59
59
  const 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><ObjectPath Id="4" ObjectPathId="3" /><ObjectIdentityQuery Id="5" ObjectPathId="3" /><ObjectPath Id="7" ObjectPathId="6" /><ObjectIdentityQuery Id="8" ObjectPathId="6" /><ObjectPath Id="10" ObjectPathId="9" /><ObjectPath Id="12" ObjectPathId="11" /><ObjectIdentityQuery Id="13" ObjectPathId="11" /><ObjectPath Id="15" ObjectPathId="14" /><ObjectPath Id="17" ObjectPathId="16" /><ObjectIdentityQuery Id="18" ObjectPathId="16" /><ObjectPath Id="20" ObjectPathId="19" /><ObjectIdentityQuery Id="21" ObjectPathId="19" /><Query Id="22" ObjectPathId="19"><Query SelectAllProperties="true"><Properties /></Query></Query></Actions><ObjectPaths><StaticMethod Id="3" Name="GetTaxonomySession" TypeId="{981cbc68-9edc-4f8d-872f-71146fcbb84f}" /><Method Id="6" ParentId="3" Name="GetDefaultSiteCollectionTermStore" /><Property Id="9" ParentId="6" Name="Groups" />${termGroupQuery}<Property Id="14" ParentId="11" Name="TermSets" />${termParentQuery}<Method Id="19" ParentId="16" Name="CreateTerm"><Parameters><Parameter Type="String">${formatting_1.formatting.escapeXml(args.options.name)}</Parameter><Parameter Type="Int32">1033</Parameter><Parameter Type="Guid">{${termId}}</Parameter></Parameters></Method></ObjectPaths></Request>`;
60
60
  const requestOptionsPost = {
61
- url: `${spoAdminUrl}/_vti_bin/client.svc/ProcessQuery`,
61
+ url: `${spoWebUrl}/_vti_bin/client.svc/ProcessQuery`,
62
62
  headers: {
63
63
  'X-RequestDigest': res.FormDigestValue
64
64
  },
@@ -108,7 +108,7 @@ class SpoTermAddCommand extends SpoCommand_1.default {
108
108
  break;
109
109
  }
110
110
  const requestOptions = {
111
- url: `${spoAdminUrl}/_vti_bin/client.svc/ProcessQuery`,
111
+ url: `${spoWebUrl}/_vti_bin/client.svc/ProcessQuery`,
112
112
  headers: {
113
113
  'X-RequestDigest': formDigest
114
114
  },
@@ -139,6 +139,7 @@ class SpoTermAddCommand extends SpoCommand_1.default {
139
139
  _SpoTermAddCommand_instances = new WeakSet(), _SpoTermAddCommand_initTelemetry = function _SpoTermAddCommand_initTelemetry() {
140
140
  this.telemetry.push((args) => {
141
141
  Object.assign(this.telemetryProperties, {
142
+ webUrl: typeof args.options.webUrl !== 'undefined',
142
143
  customProperties: typeof args.options.customProperties !== 'undefined',
143
144
  description: typeof args.options.description !== 'undefined',
144
145
  id: typeof args.options.id !== 'undefined',
@@ -153,6 +154,8 @@ _SpoTermAddCommand_instances = new WeakSet(), _SpoTermAddCommand_initTelemetry =
153
154
  }, _SpoTermAddCommand_initOptions = function _SpoTermAddCommand_initOptions() {
154
155
  this.options.unshift({
155
156
  option: '-n, --name <name>'
157
+ }, {
158
+ option: '-u, --webUrl [webUrl]'
156
159
  }, {
157
160
  option: '--termSetId [termSetId]'
158
161
  }, {
@@ -174,6 +177,12 @@ _SpoTermAddCommand_instances = new WeakSet(), _SpoTermAddCommand_initTelemetry =
174
177
  });
175
178
  }, _SpoTermAddCommand_initValidators = function _SpoTermAddCommand_initValidators() {
176
179
  this.validators.push((args) => __awaiter(this, void 0, void 0, function* () {
180
+ if (args.options.webUrl) {
181
+ const isValidSharePointUrl = validation_1.validation.isValidSharePointUrl(args.options.webUrl);
182
+ if (isValidSharePointUrl !== true) {
183
+ return isValidSharePointUrl;
184
+ }
185
+ }
177
186
  if (args.options.id) {
178
187
  if (!validation_1.validation.isValidGuid(args.options.id)) {
179
188
  return `${args.options.id} is not a valid GUID`;
@@ -40,14 +40,14 @@ class SpoTermGroupGetCommand extends SpoCommand_1.default {
40
40
  commandAction(logger, args) {
41
41
  return __awaiter(this, void 0, void 0, function* () {
42
42
  try {
43
- const spoAdminUrl = yield spo_1.spo.getSpoAdminUrl(logger, this.debug);
44
- const res = yield spo_1.spo.getRequestDigest(spoAdminUrl);
43
+ const spoWebUrl = args.options.webUrl ? args.options.webUrl : yield spo_1.spo.getSpoAdminUrl(logger, this.debug);
44
+ const res = yield spo_1.spo.getRequestDigest(spoWebUrl);
45
45
  if (this.verbose) {
46
46
  logger.logToStderr(`Retrieving taxonomy term groups...`);
47
47
  }
48
48
  const query = args.options.id ? `<Method Id="32" ParentId="30" Name="GetById"><Parameters><Parameter Type="Guid">{${formatting_1.formatting.escapeXml(args.options.id)}}</Parameter></Parameters></Method>` : `<Method Id="32" ParentId="30" Name="GetByName"><Parameters><Parameter Type="String">${formatting_1.formatting.escapeXml(args.options.name)}</Parameter></Parameters></Method>`;
49
49
  const requestOptions = {
50
- url: `${spoAdminUrl}/_vti_bin/client.svc/ProcessQuery`,
50
+ url: `${spoWebUrl}/_vti_bin/client.svc/ProcessQuery`,
51
51
  headers: {
52
52
  'X-RequestDigest': res.FormDigestValue
53
53
  },
@@ -76,18 +76,27 @@ class SpoTermGroupGetCommand extends SpoCommand_1.default {
76
76
  _SpoTermGroupGetCommand_instances = new WeakSet(), _SpoTermGroupGetCommand_initTelemetry = function _SpoTermGroupGetCommand_initTelemetry() {
77
77
  this.telemetry.push((args) => {
78
78
  Object.assign(this.telemetryProperties, {
79
+ webUrl: typeof args.options.webUrl !== 'undefined',
79
80
  id: typeof args.options.id !== 'undefined',
80
81
  name: typeof args.options.name !== 'undefined'
81
82
  });
82
83
  });
83
84
  }, _SpoTermGroupGetCommand_initOptions = function _SpoTermGroupGetCommand_initOptions() {
84
85
  this.options.unshift({
86
+ option: '-u, --webUrl [webUrl]'
87
+ }, {
85
88
  option: '-i, --id [id]'
86
89
  }, {
87
90
  option: '-n, --name [name]'
88
91
  });
89
92
  }, _SpoTermGroupGetCommand_initValidators = function _SpoTermGroupGetCommand_initValidators() {
90
93
  this.validators.push((args) => __awaiter(this, void 0, void 0, function* () {
94
+ if (args.options.webUrl) {
95
+ const isValidSharePointUrl = validation_1.validation.isValidSharePointUrl(args.options.webUrl);
96
+ if (isValidSharePointUrl !== true) {
97
+ return isValidSharePointUrl;
98
+ }
99
+ }
91
100
  if (args.options.id) {
92
101
  if (!validation_1.validation.isValidGuid(args.options.id)) {
93
102
  return `${args.options.id} is not a valid GUID`;
@@ -43,8 +43,8 @@ class SpoTermSetAddCommand extends SpoCommand_1.default {
43
43
  let formDigest = '';
44
44
  let termSet;
45
45
  try {
46
- const spoAdminUrl = yield spo_1.spo.getSpoAdminUrl(logger, this.debug);
47
- const res = yield spo_1.spo.getRequestDigest(spoAdminUrl);
46
+ const spoWebUrl = args.options.webUrl ? args.options.webUrl : yield spo_1.spo.getSpoAdminUrl(logger, this.debug);
47
+ const res = yield spo_1.spo.getRequestDigest(spoWebUrl);
48
48
  formDigest = res.FormDigestValue;
49
49
  if (this.verbose) {
50
50
  logger.logToStderr(`Adding taxonomy term set...`);
@@ -54,7 +54,7 @@ class SpoTermSetAddCommand extends SpoCommand_1.default {
54
54
  `<Method Id="42" ParentId="40" Name="GetById"><Parameters><Parameter Type="Guid">{${args.options.termGroupId}}</Parameter></Parameters></Method>`;
55
55
  const termSetId = args.options.id || (0, uuid_1.v4)();
56
56
  const requestOptionsQuery = {
57
- url: `${spoAdminUrl}/_vti_bin/client.svc/ProcessQuery`,
57
+ url: `${spoWebUrl}/_vti_bin/client.svc/ProcessQuery`,
58
58
  headers: {
59
59
  'X-RequestDigest': res.FormDigestValue
60
60
  },
@@ -96,7 +96,7 @@ class SpoTermSetAddCommand extends SpoCommand_1.default {
96
96
  termSet.CustomProperties = customProperties;
97
97
  }
98
98
  const requestOptions = {
99
- url: `${spoAdminUrl}/_vti_bin/client.svc/ProcessQuery`,
99
+ url: `${spoWebUrl}/_vti_bin/client.svc/ProcessQuery`,
100
100
  headers: {
101
101
  'X-RequestDigest': formDigest
102
102
  },
@@ -127,6 +127,7 @@ class SpoTermSetAddCommand extends SpoCommand_1.default {
127
127
  _SpoTermSetAddCommand_instances = new WeakSet(), _SpoTermSetAddCommand_initTelemetry = function _SpoTermSetAddCommand_initTelemetry() {
128
128
  this.telemetry.push((args) => {
129
129
  Object.assign(this.telemetryProperties, {
130
+ webUrl: typeof args.options.webUrl !== 'undefined',
130
131
  customProperties: typeof args.options.customProperties !== 'undefined',
131
132
  description: typeof args.options.description !== 'undefined',
132
133
  id: typeof args.options.id !== 'undefined',
@@ -137,6 +138,8 @@ _SpoTermSetAddCommand_instances = new WeakSet(), _SpoTermSetAddCommand_initTelem
137
138
  }, _SpoTermSetAddCommand_initOptions = function _SpoTermSetAddCommand_initOptions() {
138
139
  this.options.unshift({
139
140
  option: '-n, --name <name>'
141
+ }, {
142
+ option: '-u, --webUrl [webUrl]'
140
143
  }, {
141
144
  option: '--termGroupId [termGroupId]'
142
145
  }, {
@@ -150,6 +153,12 @@ _SpoTermSetAddCommand_instances = new WeakSet(), _SpoTermSetAddCommand_initTelem
150
153
  });
151
154
  }, _SpoTermSetAddCommand_initValidators = function _SpoTermSetAddCommand_initValidators() {
152
155
  this.validators.push((args) => __awaiter(this, void 0, void 0, function* () {
156
+ if (args.options.webUrl) {
157
+ const isValidSharePointUrl = validation_1.validation.isValidSharePointUrl(args.options.webUrl);
158
+ if (isValidSharePointUrl !== true) {
159
+ return isValidSharePointUrl;
160
+ }
161
+ }
153
162
  if (args.options.id) {
154
163
  if (!validation_1.validation.isValidGuid(args.options.id)) {
155
164
  return `${args.options.id} is not a valid GUID`;
@@ -43,14 +43,14 @@ class SpoTermSetListCommand extends SpoCommand_1.default {
43
43
  commandAction(logger, args) {
44
44
  return __awaiter(this, void 0, void 0, function* () {
45
45
  try {
46
- const spoAdminUrl = yield spo_1.spo.getSpoAdminUrl(logger, this.debug);
47
- const res = yield spo_1.spo.getRequestDigest(spoAdminUrl);
46
+ const spoWebUrl = args.options.webUrl ? args.options.webUrl : yield spo_1.spo.getSpoAdminUrl(logger, this.debug);
47
+ const res = yield spo_1.spo.getRequestDigest(spoWebUrl);
48
48
  if (this.verbose) {
49
49
  logger.logToStderr(`Retrieving taxonomy term sets...`);
50
50
  }
51
51
  const query = args.options.termGroupId ? `<Method Id="62" ParentId="60" Name="GetById"><Parameters><Parameter Type="Guid">{${args.options.termGroupId}}</Parameter></Parameters></Method>` : `<Method Id="62" ParentId="60" Name="GetByName"><Parameters><Parameter Type="String">${formatting_1.formatting.escapeXml(args.options.termGroupName)}</Parameter></Parameters></Method>`;
52
52
  const requestOptions = {
53
- url: `${spoAdminUrl}/_vti_bin/client.svc/ProcessQuery`,
53
+ url: `${spoWebUrl}/_vti_bin/client.svc/ProcessQuery`,
54
54
  headers: {
55
55
  'X-RequestDigest': res.FormDigestValue
56
56
  },
@@ -82,18 +82,27 @@ class SpoTermSetListCommand extends SpoCommand_1.default {
82
82
  _SpoTermSetListCommand_instances = new WeakSet(), _SpoTermSetListCommand_initTelemetry = function _SpoTermSetListCommand_initTelemetry() {
83
83
  this.telemetry.push((args) => {
84
84
  Object.assign(this.telemetryProperties, {
85
+ webUrl: typeof args.options.webUrl !== 'undefined',
85
86
  termGroupId: typeof args.options.termGroupId !== 'undefined',
86
87
  termGroupName: typeof args.options.termGroupName !== 'undefined'
87
88
  });
88
89
  });
89
90
  }, _SpoTermSetListCommand_initOptions = function _SpoTermSetListCommand_initOptions() {
90
91
  this.options.unshift({
92
+ option: '-u, --webUrl [webUrl]'
93
+ }, {
91
94
  option: '--termGroupId [termGroupId]'
92
95
  }, {
93
96
  option: '--termGroupName [termGroupName]'
94
97
  });
95
98
  }, _SpoTermSetListCommand_initValidators = function _SpoTermSetListCommand_initValidators() {
96
99
  this.validators.push((args) => __awaiter(this, void 0, void 0, function* () {
100
+ if (args.options.webUrl) {
101
+ const isValidSharePointUrl = validation_1.validation.isValidSharePointUrl(args.options.webUrl);
102
+ if (isValidSharePointUrl !== true) {
103
+ return isValidSharePointUrl;
104
+ }
105
+ }
97
106
  if (args.options.termGroupId) {
98
107
  if (!validation_1.validation.isValidGuid(args.options.termGroupId)) {
99
108
  return `${args.options.termGroupId} is not a valid GUID`;
@@ -30,6 +30,10 @@ m365 spo list get [options]
30
30
 
31
31
  --8<-- "docs/cmd/_global.md"
32
32
 
33
+ ## Remarks
34
+
35
+ When the `properties` option includes values with a `/`, for example: `ListItemAllFields/Id`, an additional `$expand` query parameter will be included on `ListItemAllFields`.
36
+
33
37
  ## Examples
34
38
 
35
39
  Get information about a list with specified ID located in the specified site.
@@ -62,6 +66,12 @@ Get information about a list returning the specified list properties.
62
66
  m365 spo list get --title Documents --webUrl https://contoso.sharepoint.com/sites/project-x --properties "Title,Id,HasUniqueRoleAssignments,AllowContentTypes"
63
67
  ```
64
68
 
69
+ Get information about a list returning the list Id, Title and ServerRelativeUrl properties.
70
+
71
+ ```sh
72
+ m365 spo list get --title Documents --webUrl https://contoso.sharepoint.com/sites/project-x --properties "Title,Id,RootFolder/ServerRelativeUrl"
73
+ ```
74
+
65
75
  Get information about a list along with the roles and permissions.
66
76
 
67
77
  ```sh
@@ -13,8 +13,18 @@ m365 spo list list [options]
13
13
  `-u, --webUrl <webUrl>`
14
14
  : URL of the site where the lists to retrieve are located.
15
15
 
16
+ `-p, --properties [properties]`
17
+ : Comma-separated list of properties to retrieve. Will retrieve all properties if not specified.
18
+
19
+ `-f, --filter [filter]`
20
+ : OData filter to use to query the lists with.
21
+
16
22
  --8<-- "docs/cmd/_global.md"
17
23
 
24
+ ## Remarks
25
+
26
+ When the `--properties` option includes values with a `/`, for example: `RootFolder/ServerRelativeUrl`, an additional `$expand` query parameter should be included on `RootFolder`.
27
+
18
28
  ## Examples
19
29
 
20
30
  Return all lists located in in a specific site.
@@ -23,6 +33,24 @@ Return all lists located in in a specific site.
23
33
  m365 spo list list --webUrl https://contoso.sharepoint.com/sites/project-x
24
34
  ```
25
35
 
36
+ Return all lists located in in a specific site with specific properties.
37
+
38
+ ```sh
39
+ m365 spo list list --webUrl https://contoso.sharepoint.com/sites/project-x --properties "BaseTemplate,ParentWebUrl"
40
+ ```
41
+
42
+ Return all lists located in in a specific site with the Id, Title and ServerRelativeUrl properties.
43
+
44
+ ```sh
45
+ m365 spo list list --webUrl https://contoso.sharepoint.com/sites/project-x --properties "Id,Title,RootFolder/ServerRelativeUrl"
46
+ ```
47
+
48
+ Return all lists located in in a specific site based on the given filter.
49
+
50
+ ```sh
51
+ m365 spo list list --webUrl https://contoso.sharepoint.com/sites/project-x --filter "BaseTemplate eq 100"
52
+ ```
53
+
26
54
  ## More information
27
55
 
28
56
  - List REST API resources: [https://msdn.microsoft.com/en-us/library/office/dn531433.aspx#bk_ListEndpoint](https://msdn.microsoft.com/en-us/library/office/dn531433.aspx#bk_ListEndpoint)
@@ -13,6 +13,9 @@ m365 spo term add [options]
13
13
  `-n, --name <name>`
14
14
  : Name of the term to add
15
15
 
16
+ `-u, --webUrl [webUrl]`
17
+ : If specified, allows you to add a term to the tenant term store as well as the sitecollection specific term store. Defaults to the tenant admin site.
18
+
16
19
  `--termSetId [termSetId]`
17
20
  : ID of the term set in which to create the term. Specify `termSetId` or `termSetName` but not both
18
21
 
@@ -48,36 +51,134 @@ m365 spo term add [options]
48
51
  When using the `--customProperties` and/or `--localCustomProperties` options it's possible to enter a JSON string. In PowerShell 5 to 7.2 [specific escaping rules](./../../../user-guide/using-cli.md#escaping-double-quotes-in-powershell) apply due to an issue. Remember that you can also use [file tokens](./../../../user-guide/using-cli.md#passing-complex-content-into-cli-options) instead.
49
52
 
50
53
  !!! important
51
- To use this command you have to have permissions to access the tenant admin site.
54
+ To use this command without the `--webUrl` option you have to have permissions to access the tenant admin site.
55
+
56
+ When using the `--webUrl` option you can connect to the term store with limited permissions, and do not need the SharePoint Administrator role. It allows you to add a term to a term set in the tenant term store if you are listed as a term store administrator. It allows you to add terms to a term set in the sitecollection term store if you are a site owner.
52
57
 
53
58
  ## Examples
54
59
 
55
- Add taxonomy term with the specified name to the term group and term set specified by their names
60
+ Add taxonomy term with the specified name to the term group and term set specified by their names.
56
61
 
57
62
  ```sh
58
63
  m365 spo term add --name IT --termSetName Department --termGroupName People
59
64
  ```
60
65
 
61
- Add taxonomy term with the specified name to the term group and term set specified by their IDs
66
+ Add taxonomy term with the specified name to the term group and term set specified by their IDs.
62
67
 
63
68
  ```sh
64
69
  m365 spo term add --name IT --termSetId 8ed8c9ea-7052-4c1d-a4d7-b9c10bffea6f --termGroupId 5c928151-c140-4d48-aab9-54da901c7fef
65
70
  ```
66
71
 
67
- Add taxonomy term with the specified name and ID
72
+ Add taxonomy term with the specified name and ID.
68
73
 
69
74
  ```sh
70
75
  m365 spo term add --name IT --id 5c928151-c140-4d48-aab9-54da901c7fef --termSetName Department --termGroupName People
71
76
  ```
72
77
 
73
- Add taxonomy term with custom properties
78
+ Add taxonomy term to the specified sitecollection with the specified name and ID.
79
+
80
+ ```sh
81
+ m365 spo term add --name IT --id 5c928151-c140-4d48-aab9-54da901c7fef --termSetName Department --termGroupName People --webUrl https://contoso.sharepoint.com/sites/project-x
82
+ ```
83
+
84
+ Add taxonomy term with custom properties.
74
85
 
75
86
  ```sh
76
87
  m365 spo term add --name IT --termSetName Department --termGroupName People --customProperties '{"Property": "Value"}'
77
88
  ```
78
89
 
79
- Add taxonomy term below the specified term
90
+ Add taxonomy term below the specified term.
80
91
 
81
92
  ```sh
82
93
  m365 spo term add --name IT --parentTermId 5c928151-c140-4d48-aab9-54da901c7fef --termGroupName People
83
94
  ```
95
+
96
+ ## Response
97
+
98
+ === "JSON"
99
+
100
+ ```json
101
+ {
102
+ "CreatedDate": "2023-05-10T06:21:33.873Z",
103
+ "Id": "346f49b0-3d1c-4ed3-b590-df303294cc16",
104
+ "LastModifiedDate": "2023-05-10T06:21:33.873Z",
105
+ "Name": "IT",
106
+ "CustomProperties": {},
107
+ "CustomSortOrder": null,
108
+ "IsAvailableForTagging": true,
109
+ "Owner": "i:0#.f|membership|john.doe@contoso.onmicrosoft.com",
110
+ "Description": "",
111
+ "IsDeprecated": false,
112
+ "IsKeyword": false,
113
+ "IsPinned": false,
114
+ "IsPinnedRoot": false,
115
+ "IsReused": false,
116
+ "IsRoot": true,
117
+ "IsSourceTerm": true,
118
+ "LocalCustomProperties": {},
119
+ "MergedTermIds": [],
120
+ "PathOfTerm": "IT",
121
+ "TermsCount": 0
122
+ }
123
+ ```
124
+
125
+ === "Text"
126
+
127
+ ```text
128
+ CreatedDate : 2023-05-10T06:22:34.686Z
129
+ CustomProperties : {}
130
+ CustomSortOrder : null
131
+ Description :
132
+ Id : 53156df9-5485-4724-9f4f-6670a3d41f88
133
+ IsAvailableForTagging: true
134
+ IsDeprecated : false
135
+ IsKeyword : false
136
+ IsPinned : false
137
+ IsPinnedRoot : false
138
+ IsReused : false
139
+ IsRoot : true
140
+ IsSourceTerm : true
141
+ LastModifiedDate : 2023-05-10T06:22:34.686Z
142
+ LocalCustomProperties: {}
143
+ MergedTermIds : []
144
+ Name : IT
145
+ Owner : i:0#.f|membership|john.doe@contoso.onmicrosoft.com
146
+ PathOfTerm : IT
147
+ TermsCount : 0
148
+ ```
149
+
150
+ === "CSV"
151
+
152
+ ```csv
153
+ CreatedDate,Id,LastModifiedDate,Name,IsAvailableForTagging,Owner,Description,IsDeprecated,IsKeyword,IsPinned,IsPinnedRoot,IsReused,IsRoot,IsSourceTerm,PathOfTerm,TermsCount
154
+ 2023-05-10T06:23:13.490Z,0f1e0630-9f45-42d1-a64e-e82fe76826da,2023-05-10T06:23:13.490Z,IT,1,i:0#.f|membership|john.doe@contoso.onmicrosoft.com,,,,,,,1,1,IT,0
155
+ ```
156
+
157
+ === "Markdown"
158
+
159
+ ```md
160
+ # spo term add --termGroupName "People" --termSetName "Department" --name "IT"
161
+
162
+ Date: 5/10/2023
163
+
164
+ ## IT (6e72d493-000d-4517-aa3e-2afb3a3d4bc8)
165
+
166
+ Property | Value
167
+ ---------|-------
168
+ CreatedDate | 2023-05-10T06:23:49.970Z
169
+ Id | 6e72d493-000d-4517-aa3e-2afb3a3d4bc8
170
+ LastModifiedDate | 2023-05-10T06:23:49.970Z
171
+ Name | IT
172
+ IsAvailableForTagging | true
173
+ Owner | i:0#.f\|membership\|john.doe@contoso.onmicrosoft.com
174
+ Description |
175
+ IsDeprecated | false
176
+ IsKeyword | false
177
+ IsPinned | false
178
+ IsPinnedRoot | false
179
+ IsReused | false
180
+ IsRoot | true
181
+ IsSourceTerm | true
182
+ PathOfTerm | IT
183
+ TermsCount | 0
184
+ ```
@@ -40,7 +40,7 @@ When retrieving term by its ID, it's sufficient to specify just the ID. When ret
40
40
  !!! important
41
41
  To use this command without the --webUrl option you have to have permissions to access the tenant admin site.
42
42
 
43
- When using the `--webUrl` option you can connect to the term store with limited permissions, and do not need the SharePoint Adminstrator role. You need to be a site visitor or more. It allows you to get a term from the tenant term store as well as a term from the sitecollection term store.
43
+ When using the `--webUrl` option you can connect to the term store with limited permissions, and do not need the SharePoint Administrator role. You need to be a site visitor or more. It allows you to get a term from the tenant term store as well as a term from the sitecollection term store.
44
44
 
45
45
  ## Examples
46
46
 
@@ -10,29 +10,95 @@ m365 spo term group get [options]
10
10
 
11
11
  ## Options
12
12
 
13
+ `-u, --webUrl [webUrl]`
14
+ : If specified, allows you to get a term group from the tenant term store as well as the sitecollection specific term store. Defaults to the tenant admin site.
15
+
13
16
  `-i, --id [id]`
14
- : ID of the term group to retrieve. Specify `name` or `id` but not both
17
+ : ID of the term group to retrieve. Specify `name` or `id` but not both.
15
18
 
16
19
  `-n, --name [name]`
17
- : Name of the term group to retrieve. Specify `name` or `id` but not both
20
+ : Name of the term group to retrieve. Specify `name` or `id` but not both.
18
21
 
19
22
  --8<-- "docs/cmd/_global.md"
20
23
 
21
24
  ## Remarks
22
25
 
23
26
  !!! important
24
- To use this command you have to have permissions to access the tenant admin site.
27
+ To use this command without the `--webUrl` option you have to have permissions to access the tenant admin site.
28
+
29
+ When using the `--webUrl` option you can connect to the term store with limited permissions, and do not need the SharePoint Administrator role. You need to be a site visitor or more. It allows you to get a term group from the tenant term store as well as a term group from the sitecollection term store.
25
30
 
26
31
  ## Examples
27
32
 
28
- Get information about a taxonomy term group using its ID
33
+ Get information about a taxonomy term group using its ID.
29
34
 
30
35
  ```sh
31
36
  m365 spo term group get --id 0e8f395e-ff58-4d45-9ff7-e331ab728beb
32
37
  ```
33
38
 
34
- Get information about a taxonomy term group using its name
39
+ Get information about a taxonomy term group using its name.
35
40
 
36
41
  ```sh
37
42
  m365 spo term group get --name PnPTermSets
38
43
  ```
44
+
45
+ Get information about a taxonomy term group from the specified sitecollection using its ID.
46
+
47
+ ```sh
48
+ m365 spo term group get --id 0e8f395e-ff58-4d45-9ff7-e331ab728beb --webUrl https://contoso.sharepoint.com/sites/project-x
49
+ ```
50
+
51
+ ## Response
52
+
53
+ === "JSON"
54
+
55
+ ```json
56
+ {
57
+ "CreatedDate": "2019-09-03T06:41:32.070Z",
58
+ "Id": "0e8f395e-ff58-4d45-9ff7-e331ab728beb",
59
+ "LastModifiedDate": "2019-09-03T06:41:32.070Z",
60
+ "Name": "PnPTermSets",
61
+ "Description": "",
62
+ "IsSiteCollectionGroup": false,
63
+ "IsSystemGroup": false
64
+ }
65
+ ```
66
+
67
+ === "Text"
68
+
69
+ ```text
70
+ CreatedDate : 2019-09-03T06:41:32.070Z
71
+ Description :
72
+ Id : 0e8f395e-ff58-4d45-9ff7-e331ab728beb
73
+ IsSiteCollectionGroup: false
74
+ IsSystemGroup : false
75
+ LastModifiedDate : 2019-09-03T06:41:32.070Z
76
+ Name : PnPTermSets
77
+ ```
78
+
79
+ === "CSV"
80
+
81
+ ```csv
82
+ CreatedDate,Id,LastModifiedDate,Name,Description,IsSiteCollectionGroup,IsSystemGroup
83
+ 2019-09-03T06:41:32.070Z,0e8f395e-ff58-4d45-9ff7-e331ab728beb,2019-09-03T06:41:32.070Z,PnPTermSets,,,
84
+ ```
85
+
86
+ === "Markdown"
87
+
88
+ ```md
89
+ # spo term group get --id "0e8f395e-ff58-4d45-9ff7-e331ab728beb"
90
+
91
+ Date: 5/14/2023
92
+
93
+ ## PnPTermSets (0e8f395e-ff58-4d45-9ff7-e331ab728beb)
94
+
95
+ Property | Value
96
+ ---------|-------
97
+ CreatedDate | 2019-09-03T06:41:32.070Z
98
+ Id | 0e8f395e-ff58-4d45-9ff7-e331ab728beb
99
+ LastModifiedDate | 2019-09-03T06:41:32.070Z
100
+ Name | PnPTermSets
101
+ Description |
102
+ IsSiteCollectionGroup | false
103
+ IsSystemGroup | false
104
+ ```
@@ -20,7 +20,7 @@ m365 spo term group list [options]
20
20
  !!! important
21
21
  To use this command without the --webUrl option you have to have permissions to access the tenant admin site.
22
22
 
23
- When using the `--webUrl` option you can connect to the term store with limited permissions, and do not need the SharePoint Adminstrator role. You need to be a site visitor or more. It allows you to list term groups from the tenant term store as well as term groups from the sitecollection term store.
23
+ When using the `--webUrl` option you can connect to the term store with limited permissions, and do not need the SharePoint Administrator role. You need to be a site visitor or more. It allows you to list term groups from the tenant term store as well as term groups from the sitecollection term store.
24
24
 
25
25
  ## Examples
26
26
 
@@ -35,7 +35,7 @@ m365 spo term list [options]
35
35
  !!! important
36
36
  To use this command without the --webUrl option you have to have permissions to access the tenant admin site.
37
37
 
38
- When using the `--webUrl` option you can connect to the term store with limited permissions, and do not need the SharePoint Adminstrator role. You need to be a site visitor or more. It allows you to list terms from the tenant term store as well as terms from the sitecollection term store.
38
+ When using the `--webUrl` option you can connect to the term store with limited permissions, and do not need the SharePoint Administrator role. You need to be a site visitor or more. It allows you to list terms from the tenant term store as well as terms from the sitecollection term store.
39
39
 
40
40
  ## Examples
41
41
 
@@ -11,22 +11,25 @@ m365 spo term set add [options]
11
11
  ## Options
12
12
 
13
13
  `-n, --name <name>`
14
- : Name of the term set to add
14
+ : Name of the term set to add.
15
+
16
+ `-u, --webUrl [webUrl]`
17
+ : If specified, allows you to add a term set to the tenant term store as well as the sitecollection specific term store. Defaults to the tenant admin site.
15
18
 
16
19
  `--termGroupId [termGroupId]`
17
- : ID of the term group in which to create the term set. Specify `termGroupId` or `termGroupName` but not both
20
+ : ID of the term group in which to create the term set. Specify `termGroupId` or `termGroupName` but not both.
18
21
 
19
22
  `--termGroupName [termGroupName]`
20
- : Name of the term group in which to create the term set. Specify `termGroupId` or `termGroupName` but not both
23
+ : Name of the term group in which to create the term set. Specify `termGroupId` or `termGroupName` but not both.
21
24
 
22
25
  `-i, --id [id]`
23
- : ID of the term set to add
26
+ : ID of the term set to add.
24
27
 
25
28
  `-d, --description [description]`
26
- : Description of the term set to add
29
+ : Description of the term set to add.
27
30
 
28
31
  `--customProperties [customProperties]`
29
- : JSON string with key-value pairs representing custom properties to set on the term set
32
+ : JSON string with key-value pairs representing custom properties to set on the term set.
30
33
 
31
34
  --8<-- "docs/cmd/_global.md"
32
35
 
@@ -36,30 +39,111 @@ m365 spo term set add [options]
36
39
  When using the `--customProperties` option it's possible to enter a JSON string. In PowerShell 5 to 7.2 [specific escaping rules](./../../../user-guide/using-cli.md#escaping-double-quotes-in-powershell) apply due to an issue. Remember that you can also use [file tokens](./../../../user-guide/using-cli.md#passing-complex-content-into-cli-options) instead.
37
40
 
38
41
  !!! important
39
- To use this command you have to have permissions to access the tenant admin site.
42
+ To use this command without the `--webUrl` option you have to have permissions to access the tenant admin site.
43
+
44
+ When using the `--webUrl` option you can connect to the term store with limited permissions, and do not need the SharePoint Administrator role. You need to be a site visitor or more. It allows you to add a term set to a term group in the tenant term store if you are listed as a term store administrator. It allows you to add a term set to a term group in the sitecollection term store if you are a site owner.
40
45
 
41
46
  ## Examples
42
47
 
43
- Add taxonomy term set to the term group specified by ID
48
+ Add taxonomy term set to the term group specified by ID.
44
49
 
45
50
  ```sh
46
51
  m365 spo term set add --name PnP-Organizations --termGroupId 0e8f395e-ff58-4d45-9ff7-e331ab728beb
47
52
  ```
48
53
 
49
- Add taxonomy term set to the term group specified by name. Create the term set with the specified ID
54
+ Add taxonomy term set to the specified sitecollection's term group specified by ID.
55
+
56
+ ```sh
57
+ m365 spo term set add --name PnP-Organizations --termGroupId 0e8f395e-ff58-4d45-9ff7-e331ab728beb --webUrl https://contoso.sharepoint.com/sites/project-x
58
+ ```
59
+
60
+ Add taxonomy term set to the term group specified by name. Create the term set with the specified ID.
50
61
 
51
62
  ```sh
52
63
  m365 spo term set add --name PnP-Organizations --termGroupName PnPTermSets --id aa70ede6-83d1-466d-8d95-30d29e9bbd7c
53
64
  ```
54
65
 
55
- Add taxonomy term set and set its description
66
+ Add taxonomy term set and set its description.
56
67
 
57
68
  ```sh
58
69
  m365 spo term set add --name PnP-Organizations --termGroupId 0e8f395e-ff58-4d45-9ff7-e331ab728beb --description 'Contains a list of organizations'
59
70
  ```
60
71
 
61
- Add taxonomy term set and set its custom properties
72
+ Add taxonomy term set and set its custom properties.
62
73
 
63
74
  ```sh
64
75
  m365 spo term set add --name PnP-Organizations --termGroupId 0e8f395e-ff58-4d45-9ff7-e331ab728beb --customProperties '{"Property":"Value"}'
65
76
  ```
77
+
78
+ ## Response
79
+
80
+ ### Standard response
81
+
82
+ === "JSON"
83
+
84
+ ```json
85
+ {
86
+ "CreatedDate": "2023-05-14T10:28:31.041Z",
87
+ "Id": "c28cfcd2-0705-4b7b-b8e6-ba2fb107e5ec",
88
+ "LastModifiedDate": "2023-05-14T10:28:31.041Z",
89
+ "Name": "PnP-Organizations",
90
+ "CustomProperties": {},
91
+ "CustomSortOrder": null,
92
+ "IsAvailableForTagging": true,
93
+ "Owner": "i:0#.f|membership|john.doe@contoso.com",
94
+ "Contact": "",
95
+ "Description": "",
96
+ "IsOpenForTermCreation": false,
97
+ "Names": {
98
+ "1033": "PnP-Organizations"
99
+ },
100
+ "Stakeholders": []
101
+ }
102
+ ```
103
+
104
+ === "Text"
105
+
106
+ ```text
107
+ Contact :
108
+ CreatedDate : 2023-05-14T10:30:41.018Z
109
+ CustomProperties : {}
110
+ CustomSortOrder : null
111
+ Description :
112
+ Id : 41102744-9f7b-448b-a265-3bbe3db5c064
113
+ IsAvailableForTagging: true
114
+ IsOpenForTermCreation: false
115
+ LastModifiedDate : 2023-05-14T10:30:41.018Z
116
+ Name : PnP-Organizations
117
+ Names : {"1033":"PnP-Organizations"}
118
+ Owner : i:0#.f|membership|john.doe@contoso.com
119
+ Stakeholders : []
120
+ ```
121
+
122
+ === "CSV"
123
+
124
+ ```csv
125
+ CreatedDate,Id,LastModifiedDate,Name,IsAvailableForTagging,Owner,Contact,Description,IsOpenForTermCreation
126
+ 2023-05-14T10:31:11.299Z,8f212d7d-eeb3-454b-811a-01b38fea56e1,2023-05-14T10:31:11.299Z,PnP-Organizations,1,i:0#.f|membership|john.doe@contoso.com,,,
127
+ ```
128
+
129
+ === "Markdown"
130
+
131
+ ```md
132
+ # spo term set add --name "PnP-Organizations" --termGroupId "0e8f395e-ff58-4d45-9ff7-e331ab728beb"
133
+
134
+ Date: 5/14/2023
135
+
136
+ ## PnP-Organizations (73824553-d254-44ef-ac0f-61926b65e925)
137
+
138
+ Property | Value
139
+ ---------|-------
140
+ CreatedDate | 2023-05-14T10:31:42.422Z
141
+ Id | 73824553-d254-44ef-ac0f-61926b65e925
142
+ LastModifiedDate | 2023-05-14T10:31:42.422Z
143
+ Name | PnP-Organizations
144
+ IsAvailableForTagging | true
145
+ Owner | i:0#.f\|membership\|john.doe@contoso.com
146
+ Contact |
147
+ Description |
148
+ IsOpenForTermCreation | false
149
+ ```
@@ -32,7 +32,7 @@ m365 spo term set get [options]
32
32
  !!! important
33
33
  To use this command without the --webUrl option you have to have permissions to access the tenant admin site.
34
34
 
35
- When using the `--webUrl` option you can connect to the term store with limited permissions, and do not need the SharePoint Adminstrator role. You need to be a site visitor or more. It allows you to get a term set from the tenant term store as well as a term set from the sitecollection term store.
35
+ When using the `--webUrl` option you can connect to the term store with limited permissions, and do not need the SharePoint Administrator role. You need to be a site visitor or more. It allows you to get a term set from the tenant term store as well as a term set from the sitecollection term store.
36
36
 
37
37
  ## Examples
38
38
 
@@ -10,29 +10,109 @@ m365 spo term set list [options]
10
10
 
11
11
  ## Options
12
12
 
13
+ `-u, --webUrl [webUrl]`
14
+ : If specified, allows you to list term sets from the tenant term store as well as the sitecollection specific term store. Defaults to the tenant admin site.
15
+
13
16
  `--termGroupId [termGroupId]`
14
- : ID of the term group from which to retrieve term sets. Specify `termGroupName` or `termGroupId` but not both
17
+ : ID of the term group from which to retrieve term sets. Specify `termGroupName` or `termGroupId` but not both.
15
18
 
16
19
  `--termGroupName [termGroupName]`
17
- : Name of the term group from which to retrieve term sets. Specify `termGroupName` or `termGroupId` but not both
20
+ : Name of the term group from which to retrieve term sets. Specify `termGroupName` or `termGroupId` but not both.
18
21
 
19
22
  --8<-- "docs/cmd/_global.md"
20
23
 
21
24
  ## Remarks
22
25
 
23
26
  !!! important
24
- To use this command you have to have permissions to access the tenant admin site.
27
+ To use this command without the --webUrl option you have to have permissions to access the tenant admin site.
28
+
29
+ When using the `--webUrl` option you can connect to the term store with limited permissions, and do not need the SharePoint Administrator role. You need to be a site visitor or more. It allows you to list term sets from the tenant term store as well as term sets from the sitecollection term store.
25
30
 
26
31
  ## Examples
27
32
 
28
- List taxonomy term sets from the term group with the given name
33
+ List taxonomy term sets from the term group with the given name.
29
34
 
30
35
  ```sh
31
36
  m365 spo term set list --termGroupName PnPTermSets
32
37
  ```
33
38
 
34
- List taxonomy term sets from the term group with the given ID
39
+ List taxonomy term sets from the term group with the given ID.
35
40
 
36
41
  ```sh
37
42
  m365 spo term set list --termGroupId 0e8f395e-ff58-4d45-9ff7-e331ab728beb
38
43
  ```
44
+
45
+ List taxonomy term sets from the specified sitecollection, from the term group with the given name.
46
+
47
+ ```sh
48
+ m365 spo term set list --termGroupName PnPTermSets --webUrl https://contoso.sharepoint.com/sites/project-x
49
+ ```
50
+
51
+ ## Response
52
+
53
+ === "JSON"
54
+
55
+ ```json
56
+ [
57
+ {
58
+ "_ObjectType_": "SP.Taxonomy.TermSet",
59
+ "_ObjectIdentity_": "676eb2a0-80e7-2000-3976-610eb3f5a91e|fec14c62-7c3b-481b-851b-c80d7802b224:se:aCf0Cz4D9UOS7+b/OlUY5XrNqUp10tpPhLK4MIXc7g/qydiOUnAdTKTXucEL/+pv",
60
+ "CreatedDate": "2019-09-03T06:41:32.110Z",
61
+ "Id": "8ed8c9ea-7052-4c1d-a4d7-b9c10bffea6f",
62
+ "LastModifiedDate": "2019-09-03T06:41:32.260Z",
63
+ "Name": "Department",
64
+ "CustomProperties": {
65
+ "SearchCenterNavVer": "15"
66
+ },
67
+ "CustomSortOrder": null,
68
+ "IsAvailableForTagging": true,
69
+ "Owner": "",
70
+ "Contact": "",
71
+ "Description": "",
72
+ "IsOpenForTermCreation": true,
73
+ "Names": {
74
+ "1033": "Department"
75
+ },
76
+ "Stakeholders": []
77
+ }
78
+ ]
79
+ ```
80
+
81
+ === "Text"
82
+
83
+ ```text
84
+ Id Name
85
+ ------------------------------------ ----------
86
+ 8ed8c9ea-7052-4c1d-a4d7-b9c10bffea6f Department
87
+ ```
88
+
89
+ === "CSV"
90
+
91
+ ```csv
92
+ _ObjectType_,_ObjectIdentity_,CreatedDate,Id,LastModifiedDate,Name,IsAvailableForTagging,Owner,Contact,Description,IsOpenForTermCreation
93
+ SP.Taxonomy.TermSet,7c6eb2a0-20fe-2000-47f1-69774ac909f5|fec14c62-7c3b-481b-851b-c80d7802b224:se:aCf0Cz4D9UOS7+b/OlUY5XrNqUp10tpPhLK4MIXc7g/qydiOUnAdTKTXucEL/+pv,2019-09-03T06:41:32.110Z,8ed8c9ea-7052-4c1d-a4d7-b9c10bffea6f,2019-09-03T06:41:32.260Z,Department,1,,,,1
94
+ ```
95
+
96
+ === "Markdown"
97
+
98
+ ```md
99
+ # spo term set list --termGroupName "PnPTermSets"
100
+
101
+ Date: 5/13/2023
102
+
103
+ ## Department (8ed8c9ea-7052-4c1d-a4d7-b9c10bffea6f)
104
+
105
+ Property | Value
106
+ ---------|-------
107
+ \_ObjectType\_ | SP.Taxonomy.TermSet
108
+ \_ObjectIdentity\_ | 826eb2a0-405f-2000-41be-bfe56d4cdc73\|fec14c62-7c3b-481b-851b-c80d7802b224:se:aCf0Cz4D9UOS7+b/OlUY5XrNqUp10tpPhLK4MIXc7g/qydiOUnAdTKTXucEL/+pv
109
+ CreatedDate | 2019-09-03T06:41:32.110Z
110
+ Id | 8ed8c9ea-7052-4c1d-a4d7-b9c10bffea6f
111
+ LastModifiedDate | 2019-09-03T06:41:32.260Z
112
+ Name | Department
113
+ IsAvailableForTagging | true
114
+ Owner |
115
+ Contact |
116
+ Description |
117
+ IsOpenForTermCreation | true
118
+ ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pnp/cli-microsoft365",
3
- "version": "6.8.0-beta.c5c3c32",
3
+ "version": "6.8.0-beta.c74eb4b",
4
4
  "description": "Manage Microsoft 365 and SharePoint Framework projects on any platform",
5
5
  "license": "MIT",
6
6
  "main": "./dist/api.js",