@pnp/cli-microsoft365 6.1.0-beta.3e0114a → 6.1.0-beta.539ef23

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (93) hide show
  1. package/dist/m365/aad/commands/group/group-get.js +79 -0
  2. package/dist/m365/aad/commands/user/user-set.js +84 -11
  3. package/dist/m365/aad/commands.js +1 -0
  4. package/dist/m365/base/ContextCommand.js +33 -0
  5. package/dist/m365/context/commands/context-init.js +28 -0
  6. package/dist/m365/context/commands/context-remove.js +103 -0
  7. package/dist/m365/context/commands.js +8 -0
  8. package/dist/m365/pp/commands/dataverse/dataverse-table-row-remove.js +133 -0
  9. package/dist/m365/pp/commands/environment/environment-get.js +5 -13
  10. package/dist/m365/pp/commands.js +1 -0
  11. package/dist/m365/purview/commands/retentionlabel/retentionlabel-set.js +142 -0
  12. package/dist/m365/purview/commands.js +2 -1
  13. package/dist/m365/search/commands/externalconnection/externalconnection-schema-add.js +86 -0
  14. package/dist/m365/search/commands.js +2 -1
  15. package/dist/m365/spo/commands/group/group-member-add.js +68 -30
  16. package/dist/m365/spo/commands/group/group-member-remove.js +50 -7
  17. package/dist/m365/spo/commands/list/{list-label-set.js → list-retentionlabel-ensure.js} +25 -15
  18. package/dist/m365/spo/commands/list/{list-label-get.js → list-retentionlabel-get.js} +19 -15
  19. package/dist/m365/spo/commands/listitem/listitem-remove.js +1 -1
  20. package/dist/m365/spo/commands/listitem/listitem-retentionlabel-remove.js +143 -0
  21. package/dist/m365/spo/commands/page/page-add.js +60 -63
  22. package/dist/m365/spo/commands/page/page-set.js +59 -70
  23. package/dist/m365/spo/commands/site/site-appcatalog-list.js +43 -0
  24. package/dist/m365/spo/commands/web/web-retentionlabel-list.js +63 -0
  25. package/dist/m365/spo/commands.js +5 -0
  26. package/dist/request.js +2 -1
  27. package/dist/utils/pid.js +31 -15
  28. package/docs/docs/cmd/aad/group/group-get.md +127 -0
  29. package/docs/docs/cmd/aad/user/user-set.md +31 -3
  30. package/docs/docs/cmd/context/context-init.md +25 -0
  31. package/docs/docs/cmd/context/context-remove.md +34 -0
  32. package/docs/docs/cmd/pp/dataverse/dataverse-table-row-remove.md +61 -0
  33. package/docs/docs/cmd/pp/environment/environment-get.md +9 -3
  34. package/docs/docs/cmd/purview/retentionlabel/retentionlabel-set.md +63 -0
  35. package/docs/docs/cmd/search/externalconnection/externalconnection-schema-add.md +31 -0
  36. package/docs/docs/cmd/spo/group/group-member-add.md +58 -6
  37. package/docs/docs/cmd/spo/group/group-member-remove.md +24 -8
  38. package/docs/docs/cmd/spo/list/list-retentionlabel-ensure.md +65 -0
  39. package/docs/docs/cmd/spo/list/{list-label-get.md → list-retentionlabel-get.md} +17 -11
  40. package/docs/docs/cmd/spo/listitem/listitem-remove.md +6 -6
  41. package/docs/docs/cmd/spo/listitem/listitem-retentionlabel-remove.md +55 -0
  42. package/docs/docs/cmd/spo/orgassetslibrary/orgassetslibrary-add.md +9 -5
  43. package/docs/docs/cmd/spo/orgassetslibrary/orgassetslibrary-list.md +42 -0
  44. package/docs/docs/cmd/spo/orgassetslibrary/orgassetslibrary-remove.md +25 -3
  45. package/docs/docs/cmd/spo/orgnewssite/orgnewssite-list.md +22 -0
  46. package/docs/docs/cmd/spo/orgnewssite/orgnewssite-remove.md +6 -2
  47. package/docs/docs/cmd/spo/orgnewssite/orgnewssite-set.md +5 -1
  48. package/docs/docs/cmd/spo/page/page-add.md +13 -9
  49. package/docs/docs/cmd/spo/page/page-clientsidewebpart-add.md +6 -2
  50. package/docs/docs/cmd/spo/page/page-column-get.md +68 -5
  51. package/docs/docs/cmd/spo/page/page-column-list.md +36 -4
  52. package/docs/docs/cmd/spo/page/page-control-get.md +70 -3
  53. package/docs/docs/cmd/spo/page/page-control-list.md +69 -3
  54. package/docs/docs/cmd/spo/page/page-control-set.md +11 -7
  55. package/docs/docs/cmd/spo/page/page-copy.md +65 -4
  56. package/docs/docs/cmd/spo/page/page-get.md +100 -4
  57. package/docs/docs/cmd/spo/page/page-header-set.md +17 -13
  58. package/docs/docs/cmd/spo/page/page-list.md +122 -1
  59. package/docs/docs/cmd/spo/page/page-remove.md +9 -5
  60. package/docs/docs/cmd/spo/page/page-section-add.md +10 -6
  61. package/docs/docs/cmd/spo/page/page-section-get.md +36 -4
  62. package/docs/docs/cmd/spo/page/page-section-list.md +38 -3
  63. package/docs/docs/cmd/spo/page/page-set.md +10 -10
  64. package/docs/docs/cmd/spo/page/page-template-list.md +58 -1
  65. package/docs/docs/cmd/spo/page/page-text-add.md +9 -5
  66. package/docs/docs/cmd/spo/propertybag/propertybag-get.md +28 -8
  67. package/docs/docs/cmd/spo/propertybag/propertybag-list.md +35 -7
  68. package/docs/docs/cmd/spo/propertybag/propertybag-remove.md +13 -9
  69. package/docs/docs/cmd/spo/propertybag/propertybag-set.md +13 -5
  70. package/docs/docs/cmd/spo/report/report-activityfilecounts.md +34 -2
  71. package/docs/docs/cmd/spo/report/report-activitypages.md +31 -2
  72. package/docs/docs/cmd/spo/report/report-activityusercounts.md +35 -2
  73. package/docs/docs/cmd/spo/report/report-activityuserdetail.md +40 -3
  74. package/docs/docs/cmd/spo/report/report-siteusagedetail.md +43 -3
  75. package/docs/docs/cmd/spo/report/report-siteusagefilecounts.md +33 -2
  76. package/docs/docs/cmd/spo/report/report-siteusagepages.md +32 -2
  77. package/docs/docs/cmd/spo/report/report-siteusagesitecounts.md +33 -2
  78. package/docs/docs/cmd/spo/report/report-siteusagestorage.md +32 -2
  79. package/docs/docs/cmd/spo/roledefinition/roledefinition-add.md +10 -6
  80. package/docs/docs/cmd/spo/roledefinition/roledefinition-get.md +80 -2
  81. package/docs/docs/cmd/spo/roledefinition/roledefinition-list.md +76 -2
  82. package/docs/docs/cmd/spo/roledefinition/roledefinition-remove.md +9 -5
  83. package/docs/docs/cmd/spo/serviceprincipal/serviceprincipal-grant-add.md +39 -2
  84. package/docs/docs/cmd/spo/serviceprincipal/serviceprincipal-grant-list.md +32 -0
  85. package/docs/docs/cmd/spo/serviceprincipal/serviceprincipal-grant-revoke.md +6 -2
  86. package/docs/docs/cmd/spo/serviceprincipal/serviceprincipal-permissionrequest-approve.md +14 -74
  87. package/docs/docs/cmd/spo/serviceprincipal/serviceprincipal-permissionrequest-deny.md +6 -2
  88. package/docs/docs/cmd/spo/serviceprincipal/serviceprincipal-permissionrequest-list.md +30 -0
  89. package/docs/docs/cmd/spo/serviceprincipal/serviceprincipal-set.md +36 -2
  90. package/docs/docs/cmd/spo/site/site-appcatalog-list.md +55 -0
  91. package/docs/docs/cmd/spo/web/web-retentionlabel-list.md +74 -0
  92. package/package.json +1 -1
  93. package/docs/docs/cmd/spo/list/list-label-set.md +0 -55
@@ -0,0 +1,63 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
12
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
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
+ return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
15
+ };
16
+ var _SpoWebRetentionLabelListCommand_instances, _SpoWebRetentionLabelListCommand_initOptions, _SpoWebRetentionLabelListCommand_initValidators;
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ const odata_1 = require("../../../../utils/odata");
19
+ const validation_1 = require("../../../../utils/validation");
20
+ const SpoCommand_1 = require("../../../base/SpoCommand");
21
+ const commands_1 = require("../../commands");
22
+ const formatting_1 = require("../../../../utils/formatting");
23
+ class SpoWebRetentionLabelListCommand extends SpoCommand_1.default {
24
+ get name() {
25
+ return commands_1.default.WEB_RETENTIONLABEL_LIST;
26
+ }
27
+ get description() {
28
+ return `Get a list of retention labels that are available on a site.`;
29
+ }
30
+ defaultProperties() {
31
+ return ['TagId', 'TagName'];
32
+ }
33
+ constructor() {
34
+ super();
35
+ _SpoWebRetentionLabelListCommand_instances.add(this);
36
+ __classPrivateFieldGet(this, _SpoWebRetentionLabelListCommand_instances, "m", _SpoWebRetentionLabelListCommand_initOptions).call(this);
37
+ __classPrivateFieldGet(this, _SpoWebRetentionLabelListCommand_instances, "m", _SpoWebRetentionLabelListCommand_initValidators).call(this);
38
+ }
39
+ commandAction(logger, args) {
40
+ return __awaiter(this, void 0, void 0, function* () {
41
+ if (this.verbose) {
42
+ logger.logToStderr(`Retrieving all retention labels that are available on ${args.options.webUrl}...`);
43
+ }
44
+ const requestUrl = `${args.options.webUrl}/_api/SP.CompliancePolicy.SPPolicyStoreProxy.GetAvailableTagsForSite(siteUrl=@a1)?@a1='${formatting_1.formatting.encodeQueryParameter(args.options.webUrl)}'`;
45
+ try {
46
+ const response = yield odata_1.odata.getAllItems(requestUrl);
47
+ logger.log(response);
48
+ }
49
+ catch (err) {
50
+ this.handleRejectedODataJsonPromise(err);
51
+ }
52
+ });
53
+ }
54
+ }
55
+ _SpoWebRetentionLabelListCommand_instances = new WeakSet(), _SpoWebRetentionLabelListCommand_initOptions = function _SpoWebRetentionLabelListCommand_initOptions() {
56
+ this.options.unshift({
57
+ option: '-u, --webUrl <webUrl>'
58
+ });
59
+ }, _SpoWebRetentionLabelListCommand_initValidators = function _SpoWebRetentionLabelListCommand_initValidators() {
60
+ this.validators.push((args) => __awaiter(this, void 0, void 0, function* () { return validation_1.validation.isValidSharePointUrl(args.options.webUrl); }));
61
+ };
62
+ module.exports = new SpoWebRetentionLabelListCommand();
63
+ //# sourceMappingURL=web-retentionlabel-list.js.map
@@ -115,6 +115,8 @@ exports.default = {
115
115
  LIST_LABEL_SET: `${prefix} list label set`,
116
116
  LIST_LIST: `${prefix} list list`,
117
117
  LIST_REMOVE: `${prefix} list remove`,
118
+ LIST_RETENTIONLABEL_ENSURE: `${prefix} list retentionlabel ensure`,
119
+ LIST_RETENTIONLABEL_GET: `${prefix} list retentionlabel get`,
118
120
  LIST_ROLEASSIGNMENT_REMOVE: `${prefix} list roleassignment remove`,
119
121
  LIST_ROLEASSIGNMENT_ADD: `${prefix} list roleassignment add`,
120
122
  LIST_ROLEINHERITANCE_BREAK: `${prefix} list roleinheritance break`,
@@ -143,6 +145,7 @@ exports.default = {
143
145
  LISTITEM_RECORD_DECLARE: `${prefix} listitem record declare`,
144
146
  LISTITEM_RECORD_UNDECLARE: `${prefix} listitem record undeclare`,
145
147
  LISTITEM_REMOVE: `${prefix} listitem remove`,
148
+ LISTITEM_RETENTIONLABEL_REMOVE: `${prefix} listitem retentionlabel remove`,
146
149
  LISTITEM_ROLEASSIGNMENT_ADD: `${prefix} listitem roleassignment add`,
147
150
  LISTITEM_ROLEASSIGNMENT_REMOVE: `${prefix} listitem roleassignment remove`,
148
151
  LISTITEM_ROLEINHERITANCE_BREAK: `${prefix} listitem roleinheritance break`,
@@ -204,6 +207,7 @@ exports.default = {
204
207
  SET: `${prefix} set`,
205
208
  SITE_ADD: `${prefix} site add`,
206
209
  SITE_APPCATALOG_ADD: `${prefix} site appcatalog add`,
210
+ SITE_APPCATALOG_LIST: `${prefix} site appcatalog list`,
207
211
  SITE_APPCATALOG_REMOVE: `${prefix} site appcatalog remove`,
208
212
  SITE_APPPERMISSION_ADD: `${prefix} site apppermission add`,
209
213
  SITE_APPPERMISSION_GET: `${prefix} site apppermission get`,
@@ -288,6 +292,7 @@ exports.default = {
288
292
  WEB_LIST: `${prefix} web list`,
289
293
  WEB_REINDEX: `${prefix} web reindex`,
290
294
  WEB_REMOVE: `${prefix} web remove`,
295
+ WEB_RETENTIONLABEL_LIST: `${prefix} web retentionlabel list`,
291
296
  WEB_ROLEASSIGNMENT_REMOVE: `${prefix} web roleassignment remove`,
292
297
  WEB_ROLEASSIGNMENT_ADD: `${prefix} web roleassignment add`,
293
298
  WEB_ROLEINHERITANCE_BREAK: `${prefix} web roleinheritance break`,
package/dist/request.js CHANGED
@@ -61,7 +61,8 @@ class Request {
61
61
  this.req = axios_1.default.create({
62
62
  headers: {
63
63
  'user-agent': `NONISV|SharePointPnP|CLIMicrosoft365/${packageJSON.version}`,
64
- 'accept-encoding': 'gzip, deflate'
64
+ 'accept-encoding': 'gzip, deflate',
65
+ 'X-ClientService-ClientTag': `M365CLI:${packageJSON.version}`
65
66
  },
66
67
  decompress: true,
67
68
  responseType: 'text',
package/dist/utils/pid.js CHANGED
@@ -1,13 +1,18 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.pid = void 0;
4
- const os = require("os");
5
- const fs = require("fs");
6
4
  const child_process_1 = require("child_process");
5
+ const fs = require("fs");
6
+ const os = require("os");
7
7
  const cache_1 = require("./cache");
8
8
  function getProcessNameOnMacOs(pid) {
9
- const stdout = (0, child_process_1.execSync)(`ps -o comm= ${pid}`, { encoding: 'utf8' });
10
- return stdout.trim();
9
+ const res = (0, child_process_1.spawnSync)('ps', ['-o', 'comm=', pid.toString()], { encoding: 'utf8' });
10
+ if (res.error || res.stderr) {
11
+ return undefined;
12
+ }
13
+ else {
14
+ return res.stdout.trim();
15
+ }
11
16
  }
12
17
  function getProcessNameOnLinux(pid) {
13
18
  if (!fs.existsSync(`/proc/${pid}/stat`)) {
@@ -19,8 +24,24 @@ function getProcessNameOnLinux(pid) {
19
24
  return procName;
20
25
  }
21
26
  function getProcessNameOnWindows(pid) {
22
- const stdout = (0, child_process_1.execSync)(`wmic PROCESS where ProcessId=${pid} get Caption | find /V "Caption"`, { encoding: 'utf8' });
23
- return stdout.trim();
27
+ const findProcess = (0, child_process_1.spawnSync)('wmic', ['PROCESS', 'where', `ProcessId=${pid}`, 'get', 'Caption'], { encoding: 'utf8' });
28
+ if (findProcess.error || findProcess.stderr) {
29
+ return undefined;
30
+ }
31
+ else {
32
+ const getPid = (0, child_process_1.spawnSync)('find', ['/V', '"Caption"'], {
33
+ encoding: 'utf8',
34
+ input: findProcess.stdout,
35
+ // must include or passing quoted "Caption" will fail
36
+ windowsVerbatimArguments: true
37
+ });
38
+ if (getPid.error || getPid.stderr) {
39
+ return undefined;
40
+ }
41
+ else {
42
+ return getPid.stdout.trim();
43
+ }
44
+ }
24
45
  }
25
46
  exports.pid = {
26
47
  getProcessName(pid) {
@@ -40,16 +61,11 @@ exports.pid = {
40
61
  getPidName = getProcessNameOnLinux;
41
62
  }
42
63
  if (getPidName) {
43
- try {
44
- processName = getPidName(pid);
45
- if (processName) {
46
- cache_1.cache.setValue(pid.toString(), processName);
47
- }
48
- return processName;
49
- }
50
- catch (_a) {
51
- return undefined;
64
+ processName = getPidName(pid);
65
+ if (processName) {
66
+ cache_1.cache.setValue(pid.toString(), processName);
52
67
  }
68
+ return processName;
53
69
  }
54
70
  return undefined;
55
71
  }
@@ -0,0 +1,127 @@
1
+ # aad group get
2
+
3
+ Gets information about the specified Azure AD Group
4
+
5
+ ## Usage
6
+
7
+ ```sh
8
+ m365 aad group get [options]
9
+ ```
10
+
11
+ ## Options
12
+
13
+ `-i, --id [id]`
14
+ : The object Id of the Azure AD group. Specify either `id` or `title` but not both
15
+
16
+ `-t, --title [title]`
17
+ : The display name of the Azure AD group. Specify either `id` or `title` but not both
18
+
19
+ --8<-- "docs/cmd/_global.md"
20
+
21
+ ## Examples
22
+
23
+ Get information about an Azure AD Group by id
24
+
25
+ ```sh
26
+ m365 aad group get --id 1caf7dcd-7e83-4c3a-94f7-932a1299c844
27
+ ```
28
+
29
+ Get information about an Azure AD Group by title
30
+
31
+ ```sh
32
+ m365 aad group get --title "Finance"
33
+ ```
34
+
35
+ ## Response
36
+
37
+ === "JSON"
38
+
39
+ ```json
40
+ {
41
+ "id": "c541afac-508e-40c7-8880-5a601b41737b",
42
+ "deletedDateTime": null,
43
+ "classification": null,
44
+ "createdDateTime": "2022-11-13T19:16:32Z",
45
+ "creationOptions": [
46
+ "YammerProvisioning"
47
+ ],
48
+ "description": "This is the default group for everyone in the network",
49
+ "displayName": "All Company",
50
+ "expirationDateTime": null,
51
+ "groupTypes": [
52
+ "Unified"
53
+ ],
54
+ "isAssignableToRole": null,
55
+ "mail": "allcompany@contoso.onmicrosoft.com",
56
+ "mailEnabled": true,
57
+ "mailNickname": "allcompany",
58
+ "membershipRule": null,
59
+ "membershipRuleProcessingState": null,
60
+ "onPremisesDomainName": null,
61
+ "onPremisesLastSyncDateTime": null,
62
+ "onPremisesNetBiosName": null,
63
+ "onPremisesSamAccountName": null,
64
+ "onPremisesSecurityIdentifier": null,
65
+ "onPremisesSyncEnabled": null,
66
+ "preferredDataLocation": null,
67
+ "preferredLanguage": null,
68
+ "proxyAddresses": [
69
+ "SPO:SPO_c3e7794d-0726-49ac-805b-2d6b0edaefdc@SPO_44744d00-3da0-45e5-9e28-da5ab48c61ac",
70
+ "SMTP:allcompany@contoso.onmicrosoft.com"
71
+ ],
72
+ "renewedDateTime": "2022-11-13T19:16:32Z",
73
+ "resourceBehaviorOptions": [
74
+ "CalendarMemberReadOnly"
75
+ ],
76
+ "resourceProvisioningOptions": [],
77
+ "securityEnabled": false,
78
+ "securityIdentifier": "S-1-12-1-4076547856-1079300050-1399127439-2879739702",
79
+ "theme": null,
80
+ "visibility": "Public",
81
+ "onPremisesProvisioningErrors": []
82
+ }
83
+ ```
84
+
85
+ === "Text"
86
+
87
+ ```text
88
+ classification : null
89
+ createdDateTime : 2022-11-13T19:16:32Z
90
+ creationOptions : ["YammerProvisioning"]
91
+ deletedDateTime : null
92
+ description : This is the default group for everyone in the network
93
+ displayName : All Company
94
+ expirationDateTime : null
95
+ groupTypes : ["Unified"]
96
+ id : c541afac-508e-40c7-8880-5a601b41737b
97
+ isAssignableToRole : null
98
+ mail : allcompany@contoso.onmicrosoft.com
99
+ mailEnabled : true
100
+ mailNickname : allcompany
101
+ membershipRule : null
102
+ membershipRuleProcessingState: null
103
+ onPremisesDomainName : null
104
+ onPremisesLastSyncDateTime : null
105
+ onPremisesNetBiosName : null
106
+ onPremisesProvisioningErrors : []
107
+ onPremisesSamAccountName : null
108
+ onPremisesSecurityIdentifier : null
109
+ onPremisesSyncEnabled : null
110
+ preferredDataLocation : null
111
+ preferredLanguage : null
112
+ proxyAddresses : ["SPO:SPO_c3e7794d-0726-49ac-805b-2d6b0edaefdc@SPO_44744d00-3da0-45e5-9e28-da5ab48c61ac","SMTP:allcompany@contoso.onmicrosoft.com"]
113
+ renewedDateTime : 2022-11-13T19:16:32Z
114
+ resourceBehaviorOptions : ["CalendarMemberReadOnly"]
115
+ resourceProvisioningOptions : []
116
+ securityEnabled : false
117
+ securityIdentifier : S-1-12-1-4076547856-1079300050-1399127439-2879739702
118
+ theme : null
119
+ visibility : Public
120
+ ```
121
+
122
+ === "CSV"
123
+
124
+ ```csv
125
+ id,deletedDateTime,classification,createdDateTime,creationOptions,description,displayName,expirationDateTime,groupTypes,isAssignableToRole,mail,mailEnabled,mailNickname,membershipRule,membershipRuleProcessingState,onPremisesDomainName,onPremisesLastSyncDateTime,onPremisesNetBiosName,onPremisesSamAccountName,onPremisesSecurityIdentifier,onPremisesSyncEnabled,preferredDataLocation,preferredLanguage,proxyAddresses,renewedDateTime,resourceBehaviorOptions,resourceProvisioningOptions,securityEnabled,securityIdentifier,theme,visibility,onPremisesProvisioningErrors
126
+ c541afac-508e-40c7-8880-5a601b41737b,,,2022-11-13T19:16:32Z,"[""YammerProvisioning""]",This is the default group for everyone in the network,All Company,,"[""Unified""]",,allcompany@contoso.onmicrosoft.com,1,allcompany,,,,,,,,,,,"[""SPO:SPO_c3e7794d-0726-49ac-805b-2d6b0edaefdc@SPO_44744d00-3da0-45e5-9e28-da5ab48c61ac"",""SMTP:allcompany@contoso.onmicrosoft.com""]",2022-11-13T19:16:32Z,"[""CalendarMemberReadOnly""]",[],,S-1-12-1-4076547856-1079300050-1399127439-2879739702,,Public,[]
127
+ ```
@@ -11,13 +11,25 @@ m365 aad user set [options]
11
11
  ## Options
12
12
 
13
13
  `-i, --objectId [objectId]`
14
- : The object ID of the user to update. Specify `objectId` or `userPrincipalName` but not both
14
+ : The object ID of the user to update. Specify `objectId` or `userPrincipalName` but not both.
15
15
 
16
16
  `-n, --userPrincipalName [userPrincipalName]`
17
- : User principal name of the user to update. Specify `objectId` or `userPrincipalName` but not both
17
+ : User principal name of the user to update. Specify `objectId` or `userPrincipalName` but not both.
18
18
 
19
19
  `--accountEnabled [accountEnabled]`
20
- : Boolean value specifying whether the account is enabled. Valid values are `true,false`
20
+ : Boolean value specifying whether the account is enabled. Valid values are `true` or `false`.
21
+
22
+ `--resetPassword`
23
+ : If specified, the password of the user will be reset. This will make the parameter `newPassword` required.
24
+
25
+ `--forceChangePasswordNextSignIn`
26
+ : If specified, the user will have to change his password the next time they log in. Can only be set in combination with `resetPassword`.
27
+
28
+ `--currentPassword [currentPassword]`
29
+ : Current password of the user that is signed in. If this parameter is set, `newPassword` is mandatory. Can't be combined with `resetPassword`.
30
+
31
+ `--newPassword [newPassword]`
32
+ : New password to be set. Must be set when specifying either `resetPassword` or `currentPassword`.
21
33
 
22
34
  --8<-- "docs/cmd/_global.md"
23
35
 
@@ -58,3 +70,19 @@ Enable user with id _1caf7dcd-7e83-4c3a-94f7-932a1299c844_
58
70
  ```sh
59
71
  m365 aad user set --objectId 1caf7dcd-7e83-4c3a-94f7-932a1299c844 --accountEnabled true
60
72
  ```
73
+
74
+ Reset password of a given user by userPrincipalName and require the user to change the password on the next sign in
75
+
76
+ ```sh
77
+ m365 aad user set --userPrincipalName steve@contoso.onmicrosoft.com --resetPassword --password 6NLUId79Lc24 --forceChangePasswordNextSignIn
78
+ ```
79
+
80
+ Change password of the currently logged in user
81
+
82
+ ```sh
83
+ m365 aad user set --objectId 1caf7dcd-7e83-4c3a-94f7-932a1299c844 --currentPassword SLBF5gnRtyYc --newPassword 6NLUId79Lc24
84
+ ```
85
+
86
+ ### Response
87
+
88
+ The command won't return a response on success.
@@ -0,0 +1,25 @@
1
+ # context init
2
+
3
+ Initiates CLI for Microsoft 365 context in the current working folder
4
+
5
+ ## Usage
6
+
7
+ ```sh
8
+ m365 context init [options]
9
+ ```
10
+
11
+ ## Options
12
+
13
+ --8<-- "docs/cmd/_global.md"
14
+
15
+ ## Examples
16
+
17
+ Initiates CLI for Microsoft 365 context in the current working folder
18
+
19
+ ```sh
20
+ m365 context init
21
+ ```
22
+
23
+ ## Response
24
+
25
+ The command won't return a response on success.
@@ -0,0 +1,34 @@
1
+ # context remove
2
+
3
+ Removes the CLI for Microsoft 365 context in the current working folder
4
+
5
+ ## Usage
6
+
7
+ ```sh
8
+ m365 context remove [options]
9
+ ```
10
+
11
+ ## Options
12
+
13
+ `--confirm`
14
+ : Don't prompt for confirmation to remove the context
15
+
16
+ --8<-- "docs/cmd/_global.md"
17
+
18
+ ## Examples
19
+
20
+ Removes the CLI for Microsoft 365 context in the current working folder
21
+
22
+ ```sh
23
+ m365 context remove
24
+ ```
25
+
26
+ Removes the CLI for Microsoft 365 context in the current working folder and does not prompt for confirmation before deleting.
27
+
28
+ ```sh
29
+ m365 context remove --confirm
30
+ ```
31
+
32
+ ## Response
33
+
34
+ The command won't return a response on success.
@@ -0,0 +1,61 @@
1
+ # pp dataverse table row remove
2
+
3
+ Removes a row from a dataverse table in a given environment.
4
+
5
+ ## Usage
6
+
7
+ ```sh
8
+ pp dataverse table row remove [options]
9
+ ```
10
+
11
+ ## Options
12
+
13
+ `-e, --environment <environment>`
14
+ : The name of the environment to remove a row from a table from.
15
+
16
+ `-i, --id <id>`
17
+ : The id of the row to remove.
18
+
19
+ `--entitySetName [entitySetName]`
20
+ : The entity set name of the table. Specify either `entitySetName` or `tableName` but not both
21
+
22
+ `--tableName [tableName]`
23
+ : The name of the table. Specify either `entitySetName` or `tableName` but not both
24
+
25
+ `--confirm`
26
+ : Don't prompt for confirmation
27
+
28
+ `--asAdmin`
29
+ : Set, to remove the row from the dataverse table as admin for environments you are not a member of.
30
+
31
+ --8<-- "docs/cmd/_global.md"
32
+
33
+ ## Examples
34
+
35
+ Removes a row from a dataverse table in a given environment
36
+
37
+ ```sh
38
+ m365 pp dataverse table row remove --environment "Default-2ca3eaa5-140f-4175-8261-3272edf9f339" --tableName "aadusers" --id "21d01cf4-356c-ed11-9561-000d3a4bbea4"
39
+ ```
40
+
41
+ Removes a row from a dataverse table in a given environment as Admin
42
+
43
+ ```sh
44
+ m365 pp dataverse table row remove --environment "Default-2ca3eaa5-140f-4175-8261-3272edf9f339" --tableName "aadusers" --id "21d01cf4-356c-ed11-9561-000d3a4bbea4" --asAdmin
45
+ ```
46
+
47
+ Removes a row from a dataverse table in a given environment without prompting for confirmation
48
+
49
+ ```sh
50
+ m365 pp dataverse table row remove --environment "Default-2ca3eaa5-140f-4175-8261-3272edf9f339" --tableName "aadusers" --id "21d01cf4-356c-ed11-9561-000d3a4bbea4" --confirm
51
+ ```
52
+
53
+ Removes a row from a dataverse table in a given environment based on the entity set name without prompting for confirmation
54
+
55
+ ```sh
56
+ m365 pp dataverse table row remove --environment "Default-2ca3eaa5-140f-4175-8261-3272edf9f339" --entitySetName "cr6c3_accounts" --id "21d01cf4-356c-ed11-9561-000d3a4bbea4" --confirm
57
+ ```
58
+
59
+ ## Response
60
+
61
+ The command won't return a response on success.
@@ -10,11 +10,11 @@ m365 pp environment get [options]
10
10
 
11
11
  ## Options
12
12
 
13
- `-n, --name <name>`
14
- : The name of the environment to get information about
13
+ `-n, --name [name]`
14
+ : The name of the environment. When not specified, the default environment is retrieved.
15
15
 
16
16
  `--asAdmin`
17
- : Run the command as admin and retrieve details of environments you do not have explicitly assigned permissions to
17
+ : Run the command as admin and retrieve details of environments you do not have explicitly assigned permissions to.
18
18
 
19
19
  --8<-- "docs/cmd/_global.md"
20
20
 
@@ -39,6 +39,12 @@ Get information as admin about the Power Platform environment by name
39
39
  m365 pp environment get --name Default-d87a7535-dd31-4437-bfe1-95340acd55c5 --asAdmin
40
40
  ```
41
41
 
42
+ Get information about the default Power Platform environment
43
+
44
+ ```sh
45
+ m365 pp environment get
46
+ ```
47
+
42
48
  ## Response
43
49
 
44
50
  === "JSON"
@@ -0,0 +1,63 @@
1
+ # purview retentionlabel set
2
+
3
+ Update a retention label
4
+
5
+ ## Usage
6
+
7
+ ```sh
8
+ m365 purview retentionlabel set [options]
9
+ ```
10
+
11
+ ## Options
12
+
13
+ `-i, --id <id>`
14
+ : The Id of the retention label.
15
+
16
+ `--behaviorDuringRetentionPeriod [behaviorDuringRetentionPeriod]`
17
+ : Specifies how the behavior of a document with this label should be during the retention period. Allowed values: `doNotRetain`, `retain`, `retainAsRecord`, `retainAsRegulatoryRecord`.
18
+
19
+ `--actionAfterRetentionPeriod [actionAfterRetentionPeriod]`
20
+ : Specifies the action to take on a document with this label applied after the retention period. Allowed values: `none`, `delete`, `startDispositionReview`.
21
+
22
+ `--retentionDuration [retentionDuration]`
23
+ : The number of days to retain the content.
24
+
25
+ `-t, --retentionTrigger [retentionTrigger]`
26
+ : Specifies whether the retention duration is calculated from the content creation date, labeled date, or last modification date. Allowed values: `dateLabeled`, `dateCreated`, `dateModified`, `dateOfEvent`.
27
+
28
+ `--defaultRecordBehavior [defaultRecordBehavior]`
29
+ : Specifies the locked or unlocked state of a record label when it is created. Allowed values: `startLocked`, `startUnlocked`.
30
+
31
+ `--descriptionForUsers [descriptionForUsers]`
32
+ : The label information for the user.
33
+
34
+ `--descriptionForAdmins [descriptionForAdmins]`
35
+ : The label information for the admin.
36
+
37
+ `--labelToBeApplied [labelToBeApplied]`
38
+ : Specifies the replacement label to be applied automatically after the retention period of the current label ends.
39
+
40
+ --8<-- "docs/cmd/_global.md"
41
+
42
+ ## Examples
43
+
44
+ Update a retention label so that it retains documents as records and deletes them after one year.
45
+
46
+ ```sh
47
+ m365 purview retentionlabel set --id c37d695e-d581-4ae9-82a0-9364eba4291e --behaviorDuringRetentionPeriod retainAsRecord --actionAfterRetentionPeriod delete --retentionDuration 365
48
+ ```
49
+
50
+ Update a retention label so that it retains documents as regulatory records and starts a disposition review one year after the last modification date.
51
+
52
+ ```sh
53
+ m365 purview retentionlabel set --id c37d695e-d581-4ae9-82a0-9364eba4291e --behaviorDuringRetentionPeriod retainAsRegulatoryRecord --actionAfterRetentionPeriod startDispositionReview --retentionDuration 365 --retentionTrigger dateModified
54
+ ```
55
+
56
+ ## Remarks
57
+
58
+ !!! attention
59
+ This command is based on a Microsoft Graph API that is currently in preview and is subject to change once the API reached general availability.
60
+
61
+ ## Response
62
+
63
+ The command won't return a response on success.
@@ -0,0 +1,31 @@
1
+ # search externalconnection schema add
2
+
3
+ This command allows the administrator to add a schema to a specific external connection for use in Microsoft Search.
4
+
5
+ ## Usage
6
+
7
+ ```sh
8
+ m365 search externalconnection schema add [options]
9
+ ```
10
+
11
+ ## Options
12
+
13
+ `-i, --externalConnectionId <externalConnectionId>`
14
+ : ID of the External Connection.
15
+
16
+ `-s, --schema [schema]`
17
+ : The schema object to be added.
18
+
19
+ --8<-- "docs/cmd/_global.md"
20
+
21
+ ## Examples
22
+
23
+ Adds a new schema to a specific external connection.
24
+
25
+ ```sh
26
+ m365 search externalconnection schema add --externalConnectionId 'CliConnectionId' --schema '{"baseType":"microsoft.graph.externalItem","properties":[{"name":"ticketTitle","type":"String","isSearchable":"true","isRetrievable":"true","labels":["title"]},{"name":"priority","type":"String","isQueryable":"true","isRetrievable":"true","isSearchable":"false"},{"name":"assignee","type":"String","isRetrievable":"true"}]}'
27
+ ```
28
+
29
+ ## Response
30
+
31
+ The command won't return a response on success.