@pnp/cli-microsoft365 10.4.0-beta.47f1e4d → 10.4.0-beta.946980f

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.
@@ -29,8 +29,11 @@ class EntraGroupMemberAddCommand extends GraphCommand {
29
29
  }
30
30
  async commandAction(logger, args) {
31
31
  try {
32
+ if (args.options.groupDisplayName) {
33
+ await this.warn(logger, `Option 'groupDisplayName' is deprecated and will be removed in the next major release.`);
34
+ }
32
35
  if (this.verbose) {
33
- await logger.logToStderr(`Adding member(s) ${args.options.ids || args.options.userNames} to group ${args.options.groupId || args.options.groupDisplayName}...`);
36
+ await logger.logToStderr(`Adding member(s) ${args.options.ids || args.options.userNames} to group ${args.options.groupId || args.options.groupDisplayName || args.options.groupName}...`);
34
37
  }
35
38
  const groupId = await this.getGroupId(logger, args.options);
36
39
  const userIds = await this.getUserIds(logger, args.options);
@@ -77,9 +80,9 @@ class EntraGroupMemberAddCommand extends GraphCommand {
77
80
  return options.groupId;
78
81
  }
79
82
  if (this.verbose) {
80
- await logger.logToStderr(`Retrieving ID of group ${options.groupDisplayName}...`);
83
+ await logger.logToStderr(`Retrieving ID of group ${options.groupDisplayName || options.groupName}...`);
81
84
  }
82
- return entraGroup.getGroupIdByDisplayName(options.groupDisplayName);
85
+ return entraGroup.getGroupIdByDisplayName(options.groupDisplayName || options.groupName);
83
86
  }
84
87
  async getUserIds(logger, options) {
85
88
  if (options.ids) {
@@ -96,6 +99,7 @@ _EntraGroupMemberAddCommand_instances = new WeakSet(), _EntraGroupMemberAddComma
96
99
  Object.assign(this.telemetryProperties, {
97
100
  groupId: typeof args.options.groupId !== 'undefined',
98
101
  groupDisplayName: typeof args.options.groupDisplayName !== 'undefined',
102
+ groupName: typeof args.options.groupName !== 'undefined',
99
103
  ids: typeof args.options.ids !== 'undefined',
100
104
  userNames: typeof args.options.userNames !== 'undefined'
101
105
  });
@@ -104,7 +108,9 @@ _EntraGroupMemberAddCommand_instances = new WeakSet(), _EntraGroupMemberAddComma
104
108
  this.options.unshift({
105
109
  option: '-i, --groupId [groupId]'
106
110
  }, {
107
- option: '-n, --groupDisplayName [groupDisplayName]'
111
+ option: '--groupDisplayName [groupDisplayName]'
112
+ }, {
113
+ option: '-n, --groupName [groupName]'
108
114
  }, {
109
115
  option: '--ids [ids]'
110
116
  }, {
@@ -136,9 +142,9 @@ _EntraGroupMemberAddCommand_instances = new WeakSet(), _EntraGroupMemberAddComma
136
142
  return true;
137
143
  });
138
144
  }, _EntraGroupMemberAddCommand_initOptionSets = function _EntraGroupMemberAddCommand_initOptionSets() {
139
- this.optionSets.push({ options: ['groupId', 'groupDisplayName'] }, { options: ['ids', 'userNames'] });
145
+ this.optionSets.push({ options: ['groupId', 'groupDisplayName', 'groupName'] }, { options: ['ids', 'userNames'] });
140
146
  }, _EntraGroupMemberAddCommand_initTypes = function _EntraGroupMemberAddCommand_initTypes() {
141
- this.types.string.push('groupId', 'groupDisplayName', 'ids', 'userNames', 'role');
147
+ this.types.string.push('groupId', 'groupDisplayName', 'groupName', 'ids', 'userNames', 'role');
142
148
  };
143
149
  export default new EntraGroupMemberAddCommand();
144
150
  //# sourceMappingURL=group-member-add.js.map
@@ -29,8 +29,11 @@ class EntraGroupMemberSetCommand extends GraphCommand {
29
29
  }
30
30
  async commandAction(logger, args) {
31
31
  try {
32
+ if (args.options.groupDisplayName) {
33
+ await this.warn(logger, `Option 'groupDisplayName' is deprecated and will be removed in the next major release.`);
34
+ }
32
35
  if (this.verbose) {
33
- await logger.logToStderr(`Adding member(s) ${args.options.ids || args.options.userNames} to role ${args.options.role} of group ${args.options.groupId || args.options.groupDisplayName}...`);
36
+ await logger.logToStderr(`Adding member(s) ${args.options.ids || args.options.userNames} to role ${args.options.role} of group ${args.options.groupId || args.options.groupDisplayName || args.options.groupName}...`);
34
37
  }
35
38
  const groupId = await this.getGroupId(logger, args.options);
36
39
  const userIds = await this.getUserIds(logger, args.options);
@@ -49,9 +52,9 @@ class EntraGroupMemberSetCommand extends GraphCommand {
49
52
  return options.groupId;
50
53
  }
51
54
  if (this.verbose) {
52
- await logger.logToStderr(`Retrieving ID of group ${options.groupDisplayName}...`);
55
+ await logger.logToStderr(`Retrieving ID of group ${options.groupDisplayName || options.groupName}...`);
53
56
  }
54
- return entraGroup.getGroupIdByDisplayName(options.groupDisplayName);
57
+ return entraGroup.getGroupIdByDisplayName(options.groupDisplayName || options.groupName);
55
58
  }
56
59
  async getUserIds(logger, options) {
57
60
  if (options.ids) {
@@ -158,6 +161,7 @@ _EntraGroupMemberSetCommand_instances = new WeakSet(), _EntraGroupMemberSetComma
158
161
  Object.assign(this.telemetryProperties, {
159
162
  groupId: typeof args.options.groupId !== 'undefined',
160
163
  groupDisplayName: typeof args.options.groupDisplayName !== 'undefined',
164
+ groupName: typeof args.options.groupName !== 'undefined',
161
165
  ids: typeof args.options.ids !== 'undefined',
162
166
  userNames: typeof args.options.userNames !== 'undefined'
163
167
  });
@@ -166,7 +170,9 @@ _EntraGroupMemberSetCommand_instances = new WeakSet(), _EntraGroupMemberSetComma
166
170
  this.options.unshift({
167
171
  option: '-i, --groupId [groupId]'
168
172
  }, {
169
- option: '-n, --groupDisplayName [groupDisplayName]'
173
+ option: '--groupDisplayName [groupDisplayName]'
174
+ }, {
175
+ option: '-n, --groupName [groupName]'
170
176
  }, {
171
177
  option: '--ids [ids]'
172
178
  }, {
@@ -198,9 +204,9 @@ _EntraGroupMemberSetCommand_instances = new WeakSet(), _EntraGroupMemberSetComma
198
204
  return true;
199
205
  });
200
206
  }, _EntraGroupMemberSetCommand_initOptionSets = function _EntraGroupMemberSetCommand_initOptionSets() {
201
- this.optionSets.push({ options: ['groupId', 'groupDisplayName'] }, { options: ['ids', 'userNames'] });
207
+ this.optionSets.push({ options: ['groupId', 'groupDisplayName', 'groupName'] }, { options: ['ids', 'userNames'] });
202
208
  }, _EntraGroupMemberSetCommand_initTypes = function _EntraGroupMemberSetCommand_initTypes() {
203
- this.types.string.push('groupId', 'groupDisplayName', 'ids', 'userNames', 'role');
209
+ this.types.string.push('groupId', 'groupDisplayName', 'groupName', 'ids', 'userNames', 'role');
204
210
  };
205
211
  export default new EntraGroupMemberSetCommand();
206
212
  //# sourceMappingURL=group-member-set.js.map
@@ -42,7 +42,7 @@ class SpoFieldGetCommand extends SpoCommand {
42
42
  fieldRestUrl = `/getbyid('${formatting.encodeQueryParameter(args.options.id)}')`;
43
43
  }
44
44
  else {
45
- fieldRestUrl = `/getbyinternalnameortitle('${formatting.encodeQueryParameter(args.options.title)}')`;
45
+ fieldRestUrl = `/getbyinternalnameortitle('${formatting.encodeQueryParameter((args.options.title || args.options.internalName))}')`;
46
46
  }
47
47
  const requestOptions = {
48
48
  url: `${args.options.webUrl}/_api/web/${listRestUrl}fields${fieldRestUrl}`,
@@ -67,7 +67,8 @@ _SpoFieldGetCommand_instances = new WeakSet(), _SpoFieldGetCommand_initTelemetry
67
67
  listTitle: typeof args.options.listTitle !== 'undefined',
68
68
  listUrl: typeof args.options.listUrl !== 'undefined',
69
69
  id: typeof args.options.id !== 'undefined',
70
- title: typeof args.options.title !== 'undefined'
70
+ title: typeof args.options.title !== 'undefined',
71
+ internalName: typeof args.options.internalName !== 'undefined'
71
72
  });
72
73
  });
73
74
  }, _SpoFieldGetCommand_initOptions = function _SpoFieldGetCommand_initOptions() {
@@ -83,6 +84,8 @@ _SpoFieldGetCommand_instances = new WeakSet(), _SpoFieldGetCommand_initTelemetry
83
84
  option: '-i, --id [id]'
84
85
  }, {
85
86
  option: '-t, --title [title]'
87
+ }, {
88
+ option: '--internalName [internalName]'
86
89
  });
87
90
  }, _SpoFieldGetCommand_initValidators = function _SpoFieldGetCommand_initValidators() {
88
91
  this.validators.push(async (args) => {
@@ -99,7 +102,7 @@ _SpoFieldGetCommand_instances = new WeakSet(), _SpoFieldGetCommand_initTelemetry
99
102
  return true;
100
103
  });
101
104
  }, _SpoFieldGetCommand_initOptionSets = function _SpoFieldGetCommand_initOptionSets() {
102
- this.optionSets.push({ options: ['id', 'title'] });
105
+ this.optionSets.push({ options: ['id', 'title', 'internalName'] });
103
106
  };
104
107
  export default new SpoFieldGetCommand();
105
108
  //# sourceMappingURL=field-get.js.map
@@ -34,16 +34,16 @@ class SpoFieldRemoveCommand extends SpoCommand {
34
34
  else {
35
35
  messageEnd = `in site ${args.options.webUrl}`;
36
36
  }
37
- const removeField = async (listRestUrl, fieldId, title) => {
37
+ const removeField = async (listRestUrl, fieldId, title, internalName) => {
38
38
  if (this.verbose) {
39
- await logger.logToStderr(`Removing field ${fieldId || title} ${messageEnd}...`);
39
+ await logger.logToStderr(`Removing field ${fieldId || title || internalName} ${messageEnd}...`);
40
40
  }
41
41
  let fieldRestUrl = '';
42
42
  if (fieldId) {
43
43
  fieldRestUrl = `/getbyid('${formatting.encodeQueryParameter(fieldId)}')`;
44
44
  }
45
45
  else {
46
- fieldRestUrl = `/getbyinternalnameortitle('${formatting.encodeQueryParameter(title)}')`;
46
+ fieldRestUrl = `/getbyinternalnameortitle('${formatting.encodeQueryParameter(title || internalName)}')`;
47
47
  }
48
48
  const requestOptions = {
49
49
  url: `${args.options.webUrl}/_api/web/${listRestUrl}fields${fieldRestUrl}`,
@@ -88,7 +88,7 @@ class SpoFieldRemoveCommand extends SpoCommand {
88
88
  }
89
89
  const promises = [];
90
90
  for (let index = 0; index < filteredResults.length; index++) {
91
- promises.push(removeField(listRestUrl, filteredResults[index].Id, undefined));
91
+ promises.push(removeField(listRestUrl, filteredResults[index].Id));
92
92
  }
93
93
  await Promise.all(promises);
94
94
  }
@@ -98,8 +98,7 @@ class SpoFieldRemoveCommand extends SpoCommand {
98
98
  }
99
99
  else {
100
100
  try {
101
- await removeField(listRestUrl, args.options.id, args.options.title);
102
- // REST post call doesn't return anything
101
+ await removeField(listRestUrl, args.options.id, args.options.title, args.options.internalName);
103
102
  }
104
103
  catch (err) {
105
104
  this.handleRejectedODataJsonPromise(err);
@@ -110,7 +109,7 @@ class SpoFieldRemoveCommand extends SpoCommand {
110
109
  await prepareRemoval();
111
110
  }
112
111
  else {
113
- const confirmMessage = `Are you sure you want to remove the ${args.options.group ? 'fields' : 'field'} ${args.options.id || args.options.title || 'from group ' + args.options.group} ${messageEnd}?`;
112
+ const confirmMessage = `Are you sure you want to remove the ${args.options.group ? 'fields' : 'field'} ${args.options.id || args.options.title || args.options.internalName || 'from group ' + args.options.group} ${messageEnd}?`;
114
113
  const result = await cli.promptForConfirmation({ message: confirmMessage });
115
114
  if (result) {
116
115
  await prepareRemoval();
@@ -127,6 +126,7 @@ _SpoFieldRemoveCommand_instances = new WeakSet(), _SpoFieldRemoveCommand_initTel
127
126
  id: typeof args.options.id !== 'undefined',
128
127
  group: typeof args.options.group !== 'undefined',
129
128
  title: typeof args.options.title !== 'undefined',
129
+ internalName: typeof args.options.internalName !== 'undefined',
130
130
  force: (!(!args.options.force)).toString()
131
131
  });
132
132
  });
@@ -143,6 +143,8 @@ _SpoFieldRemoveCommand_instances = new WeakSet(), _SpoFieldRemoveCommand_initTel
143
143
  option: '-i, --id [id]'
144
144
  }, {
145
145
  option: '-t, --title [title]'
146
+ }, {
147
+ option: '--internalName [internalName]'
146
148
  }, {
147
149
  option: '-g, --group [group]'
148
150
  }, {
@@ -163,7 +165,7 @@ _SpoFieldRemoveCommand_instances = new WeakSet(), _SpoFieldRemoveCommand_initTel
163
165
  return true;
164
166
  });
165
167
  }, _SpoFieldRemoveCommand_initOptionSets = function _SpoFieldRemoveCommand_initOptionSets() {
166
- this.optionSets.push({ options: ['id', 'title', 'group'] });
168
+ this.optionSets.push({ options: ['id', 'title', 'internalName', 'group'] });
167
169
  };
168
170
  export default new SpoFieldRemoveCommand();
169
171
  //# sourceMappingURL=field-remove.js.map
@@ -66,7 +66,7 @@ class SpoFieldSetCommand extends SpoCommand {
66
66
  // retrieve column CSOM object id
67
67
  const fieldQuery = args.options.id ?
68
68
  `<Method Id="663" ParentId="7" Name="GetById"><Parameters><Parameter Type="Guid">${formatting.escapeXml(args.options.id)}</Parameter></Parameters></Method>` :
69
- `<Method Id="663" ParentId="7" Name="GetByInternalNameOrTitle"><Parameters><Parameter Type="String">${formatting.escapeXml(args.options.name || args.options.title)}</Parameter></Parameters></Method>`;
69
+ `<Method Id="663" ParentId="7" Name="GetByInternalNameOrTitle"><Parameters><Parameter Type="String">${formatting.escapeXml(args.options.title || args.options.internalName)}</Parameter></Parameters></Method>`;
70
70
  let requestOptions = {
71
71
  url: `${args.options.webUrl}/_vti_bin/client.svc/ProcessQuery`,
72
72
  headers: {
@@ -108,6 +108,7 @@ class SpoFieldSetCommand extends SpoCommand {
108
108
  'listUrl',
109
109
  'id',
110
110
  'title',
111
+ 'internalName',
111
112
  'updateExistingLists',
112
113
  'debug',
113
114
  'verbose',
@@ -125,6 +126,7 @@ _SpoFieldSetCommand_instances = new WeakSet(), _SpoFieldSetCommand_initTelemetry
125
126
  Object.assign(this.telemetryProperties, {
126
127
  id: typeof args.options.id !== 'undefined',
127
128
  title: typeof args.options.title !== 'undefined',
129
+ internalName: typeof args.options.internalName !== 'undefined',
128
130
  listId: typeof args.options.listId !== 'undefined',
129
131
  listTitle: typeof args.options.listTitle !== 'undefined',
130
132
  listUrl: typeof args.options.listUrl !== 'undefined',
@@ -144,6 +146,8 @@ _SpoFieldSetCommand_instances = new WeakSet(), _SpoFieldSetCommand_initTelemetry
144
146
  option: '-i, --id [id]'
145
147
  }, {
146
148
  option: '-t, --title [title]'
149
+ }, {
150
+ option: '--internalName [internalName]'
147
151
  }, {
148
152
  option: '--updateExistingLists'
149
153
  });
@@ -168,7 +172,7 @@ _SpoFieldSetCommand_instances = new WeakSet(), _SpoFieldSetCommand_initTelemetry
168
172
  return true;
169
173
  });
170
174
  }, _SpoFieldSetCommand_initOptionSets = function _SpoFieldSetCommand_initOptionSets() {
171
- this.optionSets.push({ options: ['id', 'title'] });
175
+ this.optionSets.push({ options: ['id', 'title', 'internalName'] });
172
176
  };
173
177
  export default new SpoFieldSetCommand();
174
178
  //# sourceMappingURL=field-set.js.map
@@ -14,10 +14,13 @@ m365 entra group member add [options]
14
14
 
15
15
  ```md definition-list
16
16
  `-i, --groupId [groupId]`
17
- : The ID of the Microsoft Entra group. Specify `groupId` or `groupDisplayName` but not both.
17
+ : The ID of the Microsoft Entra group. Specify `groupId`, `groupDisplayName` or `groupName` but not multiple.
18
18
 
19
19
  `-n, --groupDisplayName [groupDisplayName]`
20
- : The display name of the Microsoft Entra group. Specify `groupId` or `groupDisplayName` but not both.
20
+ : (deprecated. Use option `groupName` instead) The display name of the Microsoft Entra group. Specify `groupId`, `groupDisplayName` or `groupName` but not multiple.
21
+
22
+ `--groupName [groupName]`
23
+ : The display name of the Microsoft Entra group. Specify `groupId`, `groupDisplayName` or `groupName` but not multiple.
21
24
 
22
25
  `--ids [ids]`
23
26
  : Microsoft Entra IDs of users. You can also pass a comma-separated list of IDs. Specify either `ids` or `userNames` but not both.
@@ -39,6 +42,12 @@ Add a single member specified by ID as a member to a group specified by display
39
42
  m365 entra group member add --groupDisplayName Developers --ids 098b9f52-f48c-4401-819f-29c33794c3f5 --role Member
40
43
  ```
41
44
 
45
+ Add a single member specified by ID as a member to a group specified by group name.
46
+
47
+ ```sh
48
+ m365 entra group member add --groupName Developers --ids 098b9f52-f48c-4401-819f-29c33794c3f5 --role Member
49
+ ```
50
+
42
51
  Add multiple members specified by ID as members to a group specified by ID.
43
52
 
44
53
  ```sh
@@ -51,6 +60,12 @@ Add a single member specified by UPN as an owner to a group specified by display
51
60
  m365 entra group member add --groupDisplayName Developers --userNames john.doe@contoso.com --role Owner
52
61
  ```
53
62
 
63
+ Add a single member specified by UPN as an owner to a group specified by group name.
64
+
65
+ ```sh
66
+ m365 entra group member add --groupName Developers --userNames john.doe@contoso.com --role Owner
67
+ ```
68
+
54
69
  Adds multiple members specified by UPN as owners to a group specified by ID.
55
70
 
56
71
  ```sh
@@ -14,10 +14,13 @@ m365 entra group member set [options]
14
14
 
15
15
  ```md definition-list
16
16
  `-i, --groupId [groupId]`
17
- : The ID of the Entra ID group. Specify `groupId` or `groupDisplayName` but not both.
17
+ : The ID of the Entra ID group. Specify `groupId`, `groupDisplayName` or `groupName` but not multiple.
18
18
 
19
19
  `-n, --groupDisplayName [groupDisplayName]`
20
- : The display name of the Entra ID group. Specify `groupId` or `groupDisplayName` but not both.
20
+ : (deprecated. Use option `groupName` instead) The display name of the Entra ID group. Specify `groupId`, `groupDisplayName` or `groupName` but not multiple.
21
+
22
+ `--groupName [groupName]`
23
+ : The display name of the Microsoft Entra group. Specify `groupId`, `groupDisplayName` or `groupName` but not multiple.
21
24
 
22
25
  `--ids [ids]`
23
26
  : Comma-separated list of user IDs. Specify either `ids` or `userNames` but not both.
@@ -39,6 +42,12 @@ Update a single member specified by ID to a member of a group specified by displ
39
42
  m365 entra group member set --groupDisplayName Developers --ids 098b9f52-f48c-4401-819f-29c33794c3f5 --role Member
40
43
  ```
41
44
 
45
+ Update a single member specified by ID to a member of a group specified by group name
46
+
47
+ ```sh
48
+ m365 entra group member set --groupName Developers --ids 098b9f52-f48c-4401-819f-29c33794c3f5 --role Member
49
+ ```
50
+
42
51
  Update multiple members specified by ID to members of a group specified by ID
43
52
 
44
53
  ```sh
@@ -51,6 +60,12 @@ Update a single member specified by UPN to an owner of a group specified by disp
51
60
  m365 entra group member set --groupDisplayName Developers --userNames john.doe@contoso.com --role Owner
52
61
  ```
53
62
 
63
+ Update a single member specified by UPN to an owner of a group specified by group name
64
+
65
+ ```sh
66
+ m365 entra group member set --groupName Developers --userNames john.doe@contoso.com --role Owner
67
+ ```
68
+
54
69
  Update multiple members specified by UPN to owners of a group specified by ID
55
70
 
56
71
  ```sh
@@ -28,10 +28,14 @@ m365 spo field get [options]
28
28
  : Server- or web-relative URL of the list where the field is located. Specify either `listTitle`, `listId` or `listUrl`.
29
29
 
30
30
  `-i, --id [id]`
31
- : The ID of the field to retrieve. Specify `id` or `title` but not both.
31
+ : The ID of the field to retrieve. Specify either `id`, `title` or `internalName`.
32
32
 
33
33
  `-t, --title [title]`
34
- : The display name (case-sensitive) of the field to retrieve. Specify `id` or `title` but not both.
34
+ : The display name (case-sensitive) of the field to retrieve. Specify either `id`, `title` or `internalName`.
35
+ ```
36
+
37
+ `--internalName [internalName]`
38
+ : The internal name (case-sensitive) of the field to retrieve. Specify either `id`, `title` or `internalName`.
35
39
  ```
36
40
 
37
41
  <Global />
@@ -56,6 +60,12 @@ Retrieves list column by display name located in the specified site. Retrieves t
56
60
  m365 spo field get --webUrl https://contoso.sharepoint.com/sites/contoso-sales --listUrl "Lists/Events" --title "Title"
57
61
  ```
58
62
 
63
+ Retrieves list column by internal name located in the specified site. Retrieves the list by its url.
64
+
65
+ ```sh
66
+ m365 spo field get --webUrl https://contoso.sharepoint.com/sites/contoso-sales --listUrl "Lists/Events" --internalName "Title"
67
+ ```
68
+
59
69
  ## Response
60
70
 
61
71
  <Tabs>
@@ -26,13 +26,16 @@ m365 spo field remove [options]
26
26
  : Server- or web-relative URL of the list where the field is located. Specify either `listTitle`, `listId` or `listUrl`.
27
27
 
28
28
  `-i, --id [id]`
29
- : The ID of the field to remove. Specify either `id`, `title`, or `group`.
29
+ : The ID of the field to remove. Specify either `id`, `title`, `internalName`, or `group`.
30
30
 
31
31
  `-t, --title [title]`
32
- : The display name (case-sensitive) of the field to remove. Specify either `id`, `title`, or `group`.
32
+ : The display name (case-sensitive) of the field to remove. Specify either `id`, `title`, `internalName`, or `group`.
33
+
34
+ `--internalName [internalName]`
35
+ : The internal name (case-sensitive) of the field to remove. Specify either `id`, `title`, `internalName`, or `group`.
33
36
 
34
37
  `-g, --group [group]`
35
- : Delete all fields from this group (case-sensitive). Specify either `id`, `title`, or `group`.
38
+ : Delete all fields from this group (case-sensitive). Specify either `id`, `title`, `internalName`, or `group`.
36
39
 
37
40
  `-f, --force`
38
41
  : Don't prompt for confirming removing the field.
@@ -60,6 +63,12 @@ Remove the list column with the specified display name, located in the specified
60
63
  m365 spo field remove --webUrl https://contoso.sharepoint.com/sites/contoso-sales --listUrl "Lists/Events" --title "Title"
61
64
  ```
62
65
 
66
+ Remove the list column with the specified display name, located in the specified site. Retrieves the list by its url.
67
+
68
+ ```sh
69
+ m365 spo field remove --webUrl https://contoso.sharepoint.com/sites/contoso-sales --listUrl "Lists/Events" --internalName "Title"
70
+ ```
71
+
63
72
  Remove all site columns from the specified group.
64
73
 
65
74
  ```sh
@@ -26,10 +26,13 @@ m365 spo field set [options]
26
26
  : Server- or site-relative URL of the list where the field is located (if list column). Specify either `listTitle`, `listId` or `listUrl`.
27
27
 
28
28
  `-i, --id [id]`
29
- : ID of the field to update. Specify either `id` or `title` but not both.
29
+ : ID of the field to update. Specify either `id`, `title`, or 'internalName' but not all.
30
30
 
31
31
  `-t, --title [title]`
32
- : Title or internal name of the field to update. Specify either `id` or `title` but not both.
32
+ : Title of the field to update. Specify either `id`, `title`, or 'internalName' but not all.
33
+
34
+ `--internalName [internalName]`
35
+ : Internal name of the field to update. Specify either `id`, `title`, or 'internalName' but not all.
33
36
 
34
37
  `--updateExistingLists`
35
38
  : Set, to push the update to existing lists. Otherwise, the changes will apply to new lists only.
@@ -51,6 +54,12 @@ When updating column formatting for a field with the `--CustomFormatter` option,
51
54
 
52
55
  Update the title of the site column specified by its internal name and push changes to existing lists.
53
56
 
57
+ ```sh
58
+ m365 spo field set --webUrl https://contoso.sharepoint.com/sites/project-x --internalName 'MyColumn' --updateExistingLists --Title 'My column'
59
+ ```
60
+
61
+ Update the title of the site column specified by its title and push changes to existing lists.
62
+
54
63
  ```sh
55
64
  m365 spo field set --webUrl https://contoso.sharepoint.com/sites/project-x --title 'MyColumn' --updateExistingLists --Title 'My column'
56
65
  ```
@@ -67,11 +76,16 @@ Update the description of a column specified by the ID on a list retrieved by th
67
76
  m365 spo field set --webUrl https://contoso.sharepoint.com/sites/project-x --listUrl '/sites/project-x/Lists/My List' --id 330f29c5-5c4c-465f-9f4b-7903020ae1ce --Description 'My column Description'
68
77
  ```
69
78
 
70
- Update column formatting of the specified list column.
79
+ Update column formatting of the specified list column based on title.
71
80
 
72
81
  ```sh
73
82
  m365 spo field set --webUrl https://contoso.sharepoint.com/sites/project-x --listTitle 'My List' --title 'MyColumn' --CustomFormatter '{"schema":"https://developer.microsoft.com/json-schemas/sp/column-formatting.schema.json", "elmType": "div", "txtContent": "@currentField"}'
74
83
  ```
84
+ Update column formatting of the specified list column based on internalName.
85
+
86
+ ```sh
87
+ m365 spo field set --webUrl https://contoso.sharepoint.com/sites/project-x --listTitle 'My List' --internalName 'MyColumn' --CustomFormatter '{"schema":"https://developer.microsoft.com/json-schemas/sp/column-formatting.schema.json", "elmType": "div", "txtContent": "@currentField"}'
88
+ ```
75
89
 
76
90
  ## Response
77
91