@pnp/cli-microsoft365 6.1.0-beta.c68d208 → 6.1.0-beta.d3a109a
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/m365/aad/commands/group/group-get.js +79 -0
- package/dist/m365/aad/commands.js +1 -0
- package/dist/m365/context/commands/context-remove.js +103 -0
- package/dist/m365/context/commands.js +2 -1
- package/dist/m365/pp/commands/environment/environment-get.js +5 -13
- package/dist/m365/purview/commands/retentionlabel/retentionlabel-set.js +142 -0
- package/dist/m365/purview/commands.js +2 -1
- package/dist/m365/search/commands/externalconnection/externalconnection-schema-add.js +86 -0
- package/dist/m365/search/commands.js +2 -1
- package/dist/m365/spo/commands/group/group-member-add.js +68 -30
- package/dist/m365/spo/commands/group/group-member-remove.js +50 -7
- package/dist/m365/spo/commands/list/{list-retentionlabel-set.js → list-retentionlabel-ensure.js} +21 -15
- package/dist/m365/spo/commands/listitem/listitem-remove.js +1 -1
- package/dist/m365/spo/commands/listitem/listitem-retentionlabel-remove.js +143 -0
- package/dist/m365/spo/commands/page/page-add.js +60 -63
- package/dist/m365/spo/commands/page/page-set.js +59 -70
- package/dist/m365/spo/commands/site/site-appcatalog-list.js +43 -0
- package/dist/m365/spo/commands.js +3 -1
- package/dist/request.js +2 -1
- package/docs/docs/cmd/aad/group/group-get.md +127 -0
- package/docs/docs/cmd/context/context-remove.md +34 -0
- package/docs/docs/cmd/pp/environment/environment-get.md +9 -3
- package/docs/docs/cmd/purview/retentionlabel/retentionlabel-set.md +63 -0
- package/docs/docs/cmd/search/externalconnection/externalconnection-schema-add.md +31 -0
- package/docs/docs/cmd/spo/group/group-member-add.md +58 -6
- package/docs/docs/cmd/spo/group/group-member-remove.md +24 -8
- package/docs/docs/cmd/spo/list/list-retentionlabel-ensure.md +65 -0
- package/docs/docs/cmd/spo/listitem/listitem-remove.md +6 -6
- package/docs/docs/cmd/spo/listitem/listitem-retentionlabel-remove.md +55 -0
- package/docs/docs/cmd/spo/site/site-appcatalog-list.md +55 -0
- package/package.json +1 -1
- package/docs/docs/cmd/spo/list/list-retentionlabel-set.md +0 -65
|
@@ -77,28 +77,21 @@ class SpoPageSetCommand extends SpoCommand_1.default {
|
|
|
77
77
|
authorByline = page.AuthorByline;
|
|
78
78
|
}
|
|
79
79
|
if (args.options.layoutType) {
|
|
80
|
-
const
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
data: {
|
|
90
|
-
PageLayoutType: args.options.layoutType
|
|
91
|
-
},
|
|
92
|
-
responseType: 'json'
|
|
80
|
+
const itemId = yield this.getFileListItemId(args.options.webUrl, serverRelativeFileUrl);
|
|
81
|
+
const listItemSetOptions = {
|
|
82
|
+
webUrl: args.options.webUrl,
|
|
83
|
+
listUrl: listServerRelativeUrl,
|
|
84
|
+
id: itemId,
|
|
85
|
+
systemUpdate: true,
|
|
86
|
+
PageLayoutType: args.options.layoutType,
|
|
87
|
+
verbose: this.verbose,
|
|
88
|
+
debug: this.debug
|
|
93
89
|
};
|
|
94
90
|
if (args.options.layoutType === 'Article') {
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
Description: '/_layouts/15/images/sitepagethumbnail.png',
|
|
98
|
-
Url: `${resource}/_layouts/15/images/sitepagethumbnail.png`
|
|
99
|
-
};
|
|
91
|
+
listItemSetOptions.PromotedState = 0;
|
|
92
|
+
listItemSetOptions.BannerImageUrl = `${resource}/_layouts/15/images/sitepagethumbnail.png, /_layouts/15/images/sitepagethumbnail.png`;
|
|
100
93
|
}
|
|
101
|
-
yield
|
|
94
|
+
yield Cli_1.Cli.executeCommand(spoListItemSetCommand, { options: Object.assign(Object.assign({}, listItemSetOptions), { _: [] }) });
|
|
102
95
|
}
|
|
103
96
|
if (args.options.promoteAs) {
|
|
104
97
|
const requestOptions = {
|
|
@@ -117,60 +110,50 @@ class SpoPageSetCommand extends SpoCommand_1.default {
|
|
|
117
110
|
requestOptions.data = {
|
|
118
111
|
WelcomePage: `SitePages/${pageName}`
|
|
119
112
|
};
|
|
113
|
+
yield request_1.default.post(requestOptions);
|
|
120
114
|
break;
|
|
121
115
|
case 'NewsPage':
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
accept: 'application/json;odata=nometadata'
|
|
129
|
-
};
|
|
130
|
-
requestOptions.data = {
|
|
116
|
+
const newsPageItemId = yield this.getFileListItemId(args.options.webUrl, serverRelativeFileUrl);
|
|
117
|
+
const listItemSetOptions = {
|
|
118
|
+
webUrl: args.options.webUrl,
|
|
119
|
+
listUrl: listServerRelativeUrl,
|
|
120
|
+
id: newsPageItemId,
|
|
121
|
+
systemUpdate: true,
|
|
131
122
|
PromotedState: 2,
|
|
132
|
-
FirstPublishedDate: new Date().toISOString()
|
|
123
|
+
FirstPublishedDate: new Date().toISOString(),
|
|
124
|
+
verbose: this.verbose,
|
|
125
|
+
debug: this.debug
|
|
133
126
|
};
|
|
127
|
+
yield Cli_1.Cli.executeCommand(spoListItemSetCommand, { options: Object.assign(Object.assign({}, listItemSetOptions), { _: [] }) });
|
|
134
128
|
break;
|
|
135
129
|
case 'Template':
|
|
136
|
-
|
|
130
|
+
const templateItemId = yield this.getFileListItemId(args.options.webUrl, serverRelativeFileUrl);
|
|
137
131
|
requestOptions.headers = {
|
|
138
|
-
'X-RequestDigest': requestDigest,
|
|
139
|
-
'content-type': 'application/json;odata=nometadata',
|
|
140
|
-
accept: 'application/json;odata=nometadata'
|
|
141
|
-
};
|
|
142
|
-
break;
|
|
143
|
-
}
|
|
144
|
-
const pageRes = yield request_1.default.post(requestOptions);
|
|
145
|
-
if (args.options.promoteAs === 'Template') {
|
|
146
|
-
const requestOptions = {
|
|
147
|
-
responseType: 'json',
|
|
148
|
-
url: `${args.options.webUrl}/_api/SitePages/Pages(${pageRes.Id})/SavePageAsTemplate`,
|
|
149
|
-
headers: {
|
|
150
132
|
'X-RequestDigest': requestDigest,
|
|
151
133
|
'content-type': 'application/json;odata=nometadata',
|
|
152
134
|
'X-HTTP-Method': 'POST',
|
|
153
135
|
'IF-MATCH': '*',
|
|
154
136
|
accept: 'application/json;odata=nometadata'
|
|
137
|
+
};
|
|
138
|
+
requestOptions.url = `${args.options.webUrl}/_api/SitePages/Pages(${templateItemId})/SavePageAsTemplate`;
|
|
139
|
+
const res = yield request_1.default.post(requestOptions);
|
|
140
|
+
if (fileNameWithoutExtension) {
|
|
141
|
+
pageData.Title = fileNameWithoutExtension;
|
|
142
|
+
}
|
|
143
|
+
if (pageDescription) {
|
|
144
|
+
pageData.Description = pageDescription;
|
|
155
145
|
}
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
if (res.LayoutWebpartsContent) {
|
|
168
|
-
pageData.LayoutWebpartsContent = res.LayoutWebpartsContent;
|
|
169
|
-
}
|
|
170
|
-
if (res.CanvasContent1) {
|
|
171
|
-
pageData.CanvasContent1 = res.CanvasContent1;
|
|
172
|
-
}
|
|
173
|
-
pageId = res.Id;
|
|
146
|
+
if (res.BannerImageUrl) {
|
|
147
|
+
pageData.BannerImageUrl = res.BannerImageUrl;
|
|
148
|
+
}
|
|
149
|
+
if (res.LayoutWebpartsContent) {
|
|
150
|
+
pageData.LayoutWebpartsContent = res.LayoutWebpartsContent;
|
|
151
|
+
}
|
|
152
|
+
if (res.CanvasContent1) {
|
|
153
|
+
pageData.CanvasContent1 = res.CanvasContent1;
|
|
154
|
+
}
|
|
155
|
+
pageId = res.Id;
|
|
156
|
+
break;
|
|
174
157
|
}
|
|
175
158
|
}
|
|
176
159
|
if (args.options.promoteAs !== 'Template') {
|
|
@@ -239,19 +222,11 @@ class SpoPageSetCommand extends SpoCommand_1.default {
|
|
|
239
222
|
yield request_1.default.post(requestOptions);
|
|
240
223
|
}
|
|
241
224
|
if (args.options.demoteFrom === 'NewsPage') {
|
|
242
|
-
const
|
|
243
|
-
webUrl: args.options.webUrl,
|
|
244
|
-
url: serverRelativeFileUrl,
|
|
245
|
-
asListItem: true,
|
|
246
|
-
verbose: this.verbose,
|
|
247
|
-
debug: this.debug
|
|
248
|
-
};
|
|
249
|
-
const fileGetOutput = yield Cli_1.Cli.executeCommandWithOutput(spoFileGetCommand, { options: Object.assign(Object.assign({}, fileGetOptions), { _: [] }) });
|
|
250
|
-
const fileGetOutputJson = JSON.parse(fileGetOutput.stdout);
|
|
225
|
+
const fileId = yield this.getFileListItemId(args.options.webUrl, serverRelativeFileUrl);
|
|
251
226
|
const listItemSetOptions = {
|
|
252
227
|
webUrl: args.options.webUrl,
|
|
253
228
|
listUrl: listServerRelativeUrl,
|
|
254
|
-
id:
|
|
229
|
+
id: fileId,
|
|
255
230
|
systemUpdate: true,
|
|
256
231
|
PromotedState: 0,
|
|
257
232
|
verbose: this.verbose,
|
|
@@ -292,6 +267,20 @@ class SpoPageSetCommand extends SpoCommand_1.default {
|
|
|
292
267
|
}
|
|
293
268
|
});
|
|
294
269
|
}
|
|
270
|
+
getFileListItemId(webUrl, serverRelativeFileUrl) {
|
|
271
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
272
|
+
const fileGetOptions = {
|
|
273
|
+
webUrl: webUrl,
|
|
274
|
+
url: serverRelativeFileUrl,
|
|
275
|
+
asListItem: true,
|
|
276
|
+
verbose: this.verbose,
|
|
277
|
+
debug: this.debug
|
|
278
|
+
};
|
|
279
|
+
const fileGetOutput = yield Cli_1.Cli.executeCommandWithOutput(spoFileGetCommand, { options: Object.assign(Object.assign({}, fileGetOptions), { _: [] }) });
|
|
280
|
+
const fileGetOutputJson = JSON.parse(fileGetOutput.stdout);
|
|
281
|
+
return fileGetOutputJson.Id;
|
|
282
|
+
});
|
|
283
|
+
}
|
|
295
284
|
}
|
|
296
285
|
_SpoPageSetCommand_instances = new WeakSet(), _SpoPageSetCommand_initTelemetry = function _SpoPageSetCommand_initTelemetry() {
|
|
297
286
|
this.telemetry.push((args) => {
|
|
@@ -0,0 +1,43 @@
|
|
|
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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
const odata_1 = require("../../../../utils/odata");
|
|
13
|
+
const spo_1 = require("../../../../utils/spo");
|
|
14
|
+
const SpoCommand_1 = require("../../../base/SpoCommand");
|
|
15
|
+
const commands_1 = require("../../commands");
|
|
16
|
+
class SpoSiteAppCatalogListCommand extends SpoCommand_1.default {
|
|
17
|
+
get name() {
|
|
18
|
+
return commands_1.default.SITE_APPCATALOG_LIST;
|
|
19
|
+
}
|
|
20
|
+
get description() {
|
|
21
|
+
return 'List all site collection app catalogs within the tenant';
|
|
22
|
+
}
|
|
23
|
+
defaultProperties() {
|
|
24
|
+
return ['AbsoluteUrl', 'SiteID'];
|
|
25
|
+
}
|
|
26
|
+
commandAction(logger) {
|
|
27
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
28
|
+
try {
|
|
29
|
+
if (this.verbose) {
|
|
30
|
+
logger.logToStderr('Retrieving site collection app catalogs...');
|
|
31
|
+
}
|
|
32
|
+
const spoUrl = yield spo_1.spo.getSpoUrl(logger, this.debug);
|
|
33
|
+
const appCatalogs = yield odata_1.odata.getAllItems(`${spoUrl}/_api/Web/TenantAppCatalog/SiteCollectionAppCatalogsSites`);
|
|
34
|
+
logger.log(appCatalogs);
|
|
35
|
+
}
|
|
36
|
+
catch (err) {
|
|
37
|
+
this.handleRejectedODataJsonPromise(err);
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
module.exports = new SpoSiteAppCatalogListCommand();
|
|
43
|
+
//# sourceMappingURL=site-appcatalog-list.js.map
|
|
@@ -115,8 +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`,
|
|
118
119
|
LIST_RETENTIONLABEL_GET: `${prefix} list retentionlabel get`,
|
|
119
|
-
LIST_RETENTIONLABEL_SET: `${prefix} list retentionlabel set`,
|
|
120
120
|
LIST_ROLEASSIGNMENT_REMOVE: `${prefix} list roleassignment remove`,
|
|
121
121
|
LIST_ROLEASSIGNMENT_ADD: `${prefix} list roleassignment add`,
|
|
122
122
|
LIST_ROLEINHERITANCE_BREAK: `${prefix} list roleinheritance break`,
|
|
@@ -145,6 +145,7 @@ exports.default = {
|
|
|
145
145
|
LISTITEM_RECORD_DECLARE: `${prefix} listitem record declare`,
|
|
146
146
|
LISTITEM_RECORD_UNDECLARE: `${prefix} listitem record undeclare`,
|
|
147
147
|
LISTITEM_REMOVE: `${prefix} listitem remove`,
|
|
148
|
+
LISTITEM_RETENTIONLABEL_REMOVE: `${prefix} listitem retentionlabel remove`,
|
|
148
149
|
LISTITEM_ROLEASSIGNMENT_ADD: `${prefix} listitem roleassignment add`,
|
|
149
150
|
LISTITEM_ROLEASSIGNMENT_REMOVE: `${prefix} listitem roleassignment remove`,
|
|
150
151
|
LISTITEM_ROLEINHERITANCE_BREAK: `${prefix} listitem roleinheritance break`,
|
|
@@ -206,6 +207,7 @@ exports.default = {
|
|
|
206
207
|
SET: `${prefix} set`,
|
|
207
208
|
SITE_ADD: `${prefix} site add`,
|
|
208
209
|
SITE_APPCATALOG_ADD: `${prefix} site appcatalog add`,
|
|
210
|
+
SITE_APPCATALOG_LIST: `${prefix} site appcatalog list`,
|
|
209
211
|
SITE_APPCATALOG_REMOVE: `${prefix} site appcatalog remove`,
|
|
210
212
|
SITE_APPPERMISSION_ADD: `${prefix} site apppermission add`,
|
|
211
213
|
SITE_APPPERMISSION_GET: `${prefix} site apppermission get`,
|
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',
|
|
@@ -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
|
+
```
|
|
@@ -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.
|
|
@@ -10,11 +10,11 @@ m365 pp environment get [options]
|
|
|
10
10
|
|
|
11
11
|
## Options
|
|
12
12
|
|
|
13
|
-
`-n, --name
|
|
14
|
-
: The name of the environment
|
|
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.
|
|
@@ -20,10 +20,13 @@ m365 spo group member add [options]
|
|
|
20
20
|
: Name of the SharePoint Group to which the user needs to be added, specify either `groupId` or `groupName`
|
|
21
21
|
|
|
22
22
|
`--userName [userName]`
|
|
23
|
-
: User's UPN (user principal name, eg. megan.bowen@contoso.com). If multiple users need to be added, they have to be comma separated (ex. megan.bowen@contoso.com,alex.wilber@contoso.com), specify either `userName` or `
|
|
23
|
+
: User's UPN (user principal name, eg. megan.bowen@contoso.com). If multiple users need to be added, they have to be comma separated (ex. megan.bowen@contoso.com,alex.wilber@contoso.com), specify either `userName`, `email` or `userId`
|
|
24
24
|
|
|
25
25
|
`--email [email]`
|
|
26
|
-
: User's email (eg. megan.bowen@contoso.com). If multiple users need to be added, they have to be comma separated (ex. megan.bowen@contoso.com,alex.wilber@contoso.com), specify either `userName` or `
|
|
26
|
+
: User's email (eg. megan.bowen@contoso.com). If multiple users need to be added, they have to be comma separated (ex. megan.bowen@contoso.com,alex.wilber@contoso.com), specify either `userName`, `email` or `userId`
|
|
27
|
+
|
|
28
|
+
`--userId [userId]`
|
|
29
|
+
: The user Id of the user to add as a member. (Id of the site user, for example: 14) If multiple users need to be added, the Id's have to be comma separated. Specify either `userName`, `email` or `userId`
|
|
27
30
|
|
|
28
31
|
--8<-- "docs/cmd/_global.md"
|
|
29
32
|
|
|
@@ -33,26 +36,75 @@ For the `--userName` or `--email` options you can specify multiple values by sep
|
|
|
33
36
|
|
|
34
37
|
## Examples
|
|
35
38
|
|
|
36
|
-
Add a user with
|
|
39
|
+
Add a user with the userName parameter to a SharePoint group with the groupId parameter
|
|
37
40
|
|
|
38
41
|
```sh
|
|
39
42
|
m365 spo group member add --webUrl https://contoso.sharepoint.com/sites/SiteA --groupId 5 --userName "Alex.Wilber@contoso.com"
|
|
40
43
|
```
|
|
41
44
|
|
|
42
|
-
Add multiple users
|
|
45
|
+
Add multiple users with the userName parameter to a SharePoint group with the groupId parameter
|
|
43
46
|
|
|
44
47
|
```sh
|
|
45
48
|
m365 spo group member add --webUrl https://contoso.sharepoint.com/sites/SiteA --groupId 5 --userName "Alex.Wilber@contoso.com, Adele.Vance@contoso.com"
|
|
46
49
|
```
|
|
47
50
|
|
|
48
|
-
Add a user with email
|
|
51
|
+
Add a user with the email parameter to a SharePoint group with the groupName parameter
|
|
49
52
|
|
|
50
53
|
```sh
|
|
51
54
|
m365 spo group member add --webUrl https://contoso.sharepoint.com/sites/SiteA --groupName "Contoso Site Owners" --email "Alex.Wilber@contoso.com"
|
|
52
55
|
```
|
|
53
56
|
|
|
54
|
-
Add multiple users
|
|
57
|
+
Add multiple users with the email parameter to a SharePoint group with the groupName parameter
|
|
55
58
|
|
|
56
59
|
```sh
|
|
57
60
|
m365 spo group member add --webUrl https://contoso.sharepoint.com/sites/SiteA --groupName "Contoso Site Owners" --email "Alex.Wilber@contoso.com, Adele.Vance@contoso.com"
|
|
58
61
|
```
|
|
62
|
+
|
|
63
|
+
Add a user with the userId parameter to a SharePoint group with the groupId parameter
|
|
64
|
+
|
|
65
|
+
```sh
|
|
66
|
+
m365 spo group member add --webUrl https://contoso.sharepoint.com/sites/SiteA --groupId 5 --userId 5
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
Add multiple users with the userId parameter to a SharePoint group with the groupId parameter
|
|
70
|
+
|
|
71
|
+
```sh
|
|
72
|
+
m365 spo group member add --webUrl https://contoso.sharepoint.com/sites/SiteA --groupId 5 --userId "5,12"
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
## Response
|
|
76
|
+
|
|
77
|
+
=== "JSON"
|
|
78
|
+
|
|
79
|
+
```json
|
|
80
|
+
[
|
|
81
|
+
{
|
|
82
|
+
"AllowedRoles": [
|
|
83
|
+
0
|
|
84
|
+
],
|
|
85
|
+
"CurrentRole": 0,
|
|
86
|
+
"DisplayName": "John Doe",
|
|
87
|
+
"Email": "john.doe@contoso.onmicrosoft.com",
|
|
88
|
+
"InvitationLink": null,
|
|
89
|
+
"IsUserKnown": true,
|
|
90
|
+
"Message": null,
|
|
91
|
+
"Status": true,
|
|
92
|
+
"User": "i:0#.f|membership|john.doe@contoso.onmicrosoft.com"
|
|
93
|
+
}
|
|
94
|
+
]
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
=== "Text"
|
|
98
|
+
|
|
99
|
+
```text
|
|
100
|
+
DisplayName Email
|
|
101
|
+
----------- ---------------------------------
|
|
102
|
+
John Doe john.doe@contoso.onmicrosoft.com
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
=== "CSV"
|
|
106
|
+
|
|
107
|
+
```csv
|
|
108
|
+
DisplayName,Email
|
|
109
|
+
John Doe,john.doe@contoso.onmicrosoft.com
|
|
110
|
+
```
|