@pnp/cli-microsoft365 5.3.0-beta.1ed1aa2 → 5.3.0-beta.24cd8e4
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/.eslintrc.js +1 -0
- package/dist/m365/aad/commands/approleassignment/approleassignment-list.js +55 -22
- package/dist/m365/aad/commands.js +1 -1
- package/dist/m365/app/commands/app-open.js +64 -0
- package/dist/m365/app/commands.js +1 -0
- package/dist/m365/planner/commands/bucket/bucket-add.js +5 -0
- package/dist/m365/planner/commands/bucket/bucket-get.js +203 -0
- package/dist/m365/planner/commands/bucket/bucket-list.js +6 -1
- package/dist/m365/planner/commands/bucket/bucket-remove.js +219 -0
- package/dist/m365/planner/commands/bucket/bucket-set.js +6 -1
- package/dist/m365/planner/commands/plan/plan-add.js +6 -1
- package/dist/m365/planner/commands/plan/plan-details-get.js +6 -1
- package/dist/m365/planner/commands/plan/plan-get.js +6 -1
- package/dist/m365/planner/commands/plan/plan-list.js +6 -1
- package/dist/m365/planner/commands/task/task-add.js +5 -0
- package/dist/m365/planner/commands/task/task-details-get.js +6 -0
- package/dist/m365/planner/commands/task/task-get.js +156 -7
- package/dist/m365/planner/commands/task/task-list.js +6 -1
- package/dist/m365/planner/commands/task/task-set.js +6 -1
- package/dist/m365/planner/commands.js +2 -0
- package/dist/m365/spo/commands/field/field-list.js +84 -0
- package/dist/m365/spo/commands/list/list-roleinheritance-break.js +84 -0
- package/dist/m365/spo/commands/list/list-roleinheritance-reset.js +76 -0
- package/dist/m365/spo/commands/listitem/listitem-roleinheritance-break.js +83 -0
- package/dist/m365/spo/commands/listitem/listitem-roleinheritance-reset.js +79 -0
- package/dist/m365/spo/commands/roledefinition/roledefinition-list.js +49 -0
- package/dist/m365/spo/commands.js +6 -0
- package/dist/m365/tenant/commands/security/security-alerts-list.js +71 -0
- package/dist/m365/tenant/commands.js +1 -0
- package/dist/utils/accessToken.js +18 -0
- package/docs/docs/cmd/app/app-open.md +45 -0
- package/docs/docs/cmd/planner/bucket/bucket-get.md +57 -0
- package/docs/docs/cmd/planner/bucket/bucket-remove.md +60 -0
- package/docs/docs/cmd/planner/task/task-get.md +30 -3
- package/docs/docs/cmd/spo/field/field-list.md +51 -0
- package/docs/docs/cmd/spo/list/list-roleinheritance-break.md +55 -0
- package/docs/docs/cmd/spo/list/list-roleinheritance-reset.md +36 -0
- package/docs/docs/cmd/spo/listitem/listitem-roleinheritance-break.md +58 -0
- package/docs/docs/cmd/spo/listitem/listitem-roleinheritance-reset.md +39 -0
- package/docs/docs/cmd/spo/roledefinition/roledefinition-list.md +24 -0
- package/docs/docs/cmd/teams/channel/channel-member-list.md +4 -4
- package/docs/docs/cmd/teams/channel/channel-member-remove.md +2 -2
- package/docs/docs/cmd/teams/channel/channel-member-set.md +2 -2
- package/docs/docs/cmd/tenant/security/security-alerts-list.md +30 -0
- package/npm-shrinkwrap.json +1515 -1282
- package/package.json +24 -24
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const request_1 = require("../../../../request");
|
|
4
|
+
const utils_1 = require("../../../../utils");
|
|
5
|
+
const SpoCommand_1 = require("../../../base/SpoCommand");
|
|
6
|
+
const commands_1 = require("../../commands");
|
|
7
|
+
class SpoListItemRoleInheritanceBreakCommand extends SpoCommand_1.default {
|
|
8
|
+
get name() {
|
|
9
|
+
return commands_1.default.LISTITEM_ROLEINHERITANCE_BREAK;
|
|
10
|
+
}
|
|
11
|
+
get description() {
|
|
12
|
+
return 'Break inheritance of list item';
|
|
13
|
+
}
|
|
14
|
+
optionSets() {
|
|
15
|
+
return [
|
|
16
|
+
['listId', 'listTitle']
|
|
17
|
+
];
|
|
18
|
+
}
|
|
19
|
+
commandAction(logger, args, cb) {
|
|
20
|
+
if (this.verbose) {
|
|
21
|
+
logger.logToStderr(`Breaking role inheritance of list item in site at ${args.options.webUrl}...`);
|
|
22
|
+
}
|
|
23
|
+
let requestUrl = `${args.options.webUrl}/_api/web/lists`;
|
|
24
|
+
if (args.options.listId) {
|
|
25
|
+
requestUrl += `(guid'${encodeURIComponent(args.options.listId)}')`;
|
|
26
|
+
}
|
|
27
|
+
else {
|
|
28
|
+
requestUrl += `/getbytitle('${encodeURIComponent(args.options.listTitle)}')`;
|
|
29
|
+
}
|
|
30
|
+
let keepExistingPermissions = true;
|
|
31
|
+
if (args.options.clearExistingPermissions) {
|
|
32
|
+
keepExistingPermissions = !args.options.clearExistingPermissions;
|
|
33
|
+
}
|
|
34
|
+
const requestOptions = {
|
|
35
|
+
url: `${requestUrl}/items(${args.options.listItemId})/breakroleinheritance(${keepExistingPermissions})`,
|
|
36
|
+
method: 'POST',
|
|
37
|
+
headers: {
|
|
38
|
+
'accept': 'application/json;odata=nometadata',
|
|
39
|
+
'content-type': 'application/json'
|
|
40
|
+
},
|
|
41
|
+
responseType: 'json'
|
|
42
|
+
};
|
|
43
|
+
request_1.default
|
|
44
|
+
.post(requestOptions)
|
|
45
|
+
.then(_ => cb(), (err) => this.handleRejectedODataJsonPromise(err, logger, cb));
|
|
46
|
+
}
|
|
47
|
+
options() {
|
|
48
|
+
const options = [
|
|
49
|
+
{
|
|
50
|
+
option: '-u, --webUrl <webUrl>'
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
option: '--listItemId <listItemId>'
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
option: '-l, --listId [listId]'
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
option: '-t, --listTitle [listTitle]'
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
option: '-c, --clearExistingPermissions'
|
|
63
|
+
}
|
|
64
|
+
];
|
|
65
|
+
const parentOptions = super.options();
|
|
66
|
+
return options.concat(parentOptions);
|
|
67
|
+
}
|
|
68
|
+
validate(args) {
|
|
69
|
+
const isValidSharePointUrl = utils_1.validation.isValidSharePointUrl(args.options.webUrl);
|
|
70
|
+
if (isValidSharePointUrl !== true) {
|
|
71
|
+
return isValidSharePointUrl;
|
|
72
|
+
}
|
|
73
|
+
if (args.options.listId && !utils_1.validation.isValidGuid(args.options.listId)) {
|
|
74
|
+
return `${args.options.listId} is not a valid GUID`;
|
|
75
|
+
}
|
|
76
|
+
if (isNaN(args.options.listItemId)) {
|
|
77
|
+
return `${args.options.listItemId} is not a number`;
|
|
78
|
+
}
|
|
79
|
+
return true;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
module.exports = new SpoListItemRoleInheritanceBreakCommand();
|
|
83
|
+
//# sourceMappingURL=listitem-roleinheritance-break.js.map
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const request_1 = require("../../../../request");
|
|
4
|
+
const utils_1 = require("../../../../utils");
|
|
5
|
+
const SpoCommand_1 = require("../../../base/SpoCommand");
|
|
6
|
+
const commands_1 = require("../../commands");
|
|
7
|
+
class SpoListItemRoleInheritanceResetCommand extends SpoCommand_1.default {
|
|
8
|
+
get name() {
|
|
9
|
+
return commands_1.default.LISTITEM_ROLEINHERITANCE_RESET;
|
|
10
|
+
}
|
|
11
|
+
get description() {
|
|
12
|
+
return 'Restores the role inheritance of list item, file, or folder';
|
|
13
|
+
}
|
|
14
|
+
getTelemetryProperties(args) {
|
|
15
|
+
const telemetryProps = super.getTelemetryProperties(args);
|
|
16
|
+
telemetryProps.listId = typeof args.options.listId !== 'undefined';
|
|
17
|
+
telemetryProps.listTitle = typeof args.options.listTitle !== 'undefined';
|
|
18
|
+
return telemetryProps;
|
|
19
|
+
}
|
|
20
|
+
commandAction(logger, args, cb) {
|
|
21
|
+
let requestUrl = `${args.options.webUrl}/_api/web/lists`;
|
|
22
|
+
if (args.options.listId) {
|
|
23
|
+
requestUrl += `(guid'${encodeURIComponent(args.options.listId)}')`;
|
|
24
|
+
}
|
|
25
|
+
else {
|
|
26
|
+
requestUrl += `/getbytitle('${encodeURIComponent(args.options.listTitle)}')`;
|
|
27
|
+
}
|
|
28
|
+
const requestOptions = {
|
|
29
|
+
url: `${requestUrl}/items(${args.options.listItemId})/resetroleinheritance`,
|
|
30
|
+
method: 'POST',
|
|
31
|
+
headers: {
|
|
32
|
+
'accept': 'application/json;odata=nometadata',
|
|
33
|
+
'content-type': 'application/json'
|
|
34
|
+
},
|
|
35
|
+
responseType: 'json'
|
|
36
|
+
};
|
|
37
|
+
request_1.default
|
|
38
|
+
.post(requestOptions)
|
|
39
|
+
.then(_ => cb(), (err) => this.handleRejectedODataJsonPromise(err, logger, cb));
|
|
40
|
+
}
|
|
41
|
+
optionSets() {
|
|
42
|
+
return [
|
|
43
|
+
['listId', 'listTitle']
|
|
44
|
+
];
|
|
45
|
+
}
|
|
46
|
+
options() {
|
|
47
|
+
const options = [
|
|
48
|
+
{
|
|
49
|
+
option: '-u, --webUrl <webUrl>'
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
option: '--listItemId <listItemId>'
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
option: '--listId [listId]'
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
option: '--listTitle [listTitle]'
|
|
59
|
+
}
|
|
60
|
+
];
|
|
61
|
+
const parentOptions = super.options();
|
|
62
|
+
return options.concat(parentOptions);
|
|
63
|
+
}
|
|
64
|
+
validate(args) {
|
|
65
|
+
const isValidSharePointUrl = utils_1.validation.isValidSharePointUrl(args.options.webUrl);
|
|
66
|
+
if (isValidSharePointUrl !== true) {
|
|
67
|
+
return isValidSharePointUrl;
|
|
68
|
+
}
|
|
69
|
+
if (args.options.listId && !utils_1.validation.isValidGuid(args.options.listId)) {
|
|
70
|
+
return `${args.options.listId} is not a valid GUID`;
|
|
71
|
+
}
|
|
72
|
+
if (isNaN(args.options.listItemId)) {
|
|
73
|
+
return `${args.options.listItemId} is not a number`;
|
|
74
|
+
}
|
|
75
|
+
return true;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
module.exports = new SpoListItemRoleInheritanceResetCommand();
|
|
79
|
+
//# sourceMappingURL=listitem-roleinheritance-reset.js.map
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const request_1 = require("../../../../request");
|
|
4
|
+
const utils_1 = require("../../../../utils");
|
|
5
|
+
const SpoCommand_1 = require("../../../base/SpoCommand");
|
|
6
|
+
const commands_1 = require("../../commands");
|
|
7
|
+
class SpoRoleDefinitionListCommand extends SpoCommand_1.default {
|
|
8
|
+
get name() {
|
|
9
|
+
return commands_1.default.ROLEDEFINITION_LIST;
|
|
10
|
+
}
|
|
11
|
+
get description() {
|
|
12
|
+
return 'Gets list of role definitions for the specified site';
|
|
13
|
+
}
|
|
14
|
+
defaultProperties() {
|
|
15
|
+
return ['Id', 'Name'];
|
|
16
|
+
}
|
|
17
|
+
commandAction(logger, args, cb) {
|
|
18
|
+
if (this.verbose) {
|
|
19
|
+
logger.logToStderr(`Getting role definitions list from ${args.options.webUrl}...`);
|
|
20
|
+
}
|
|
21
|
+
const requestOptions = {
|
|
22
|
+
url: `${args.options.webUrl}/_api/web/roledefinitions`,
|
|
23
|
+
headers: {
|
|
24
|
+
'accept': 'application/json;odata=nometadata'
|
|
25
|
+
},
|
|
26
|
+
responseType: 'json'
|
|
27
|
+
};
|
|
28
|
+
request_1.default
|
|
29
|
+
.get(requestOptions)
|
|
30
|
+
.then((response) => {
|
|
31
|
+
logger.log(response.value);
|
|
32
|
+
cb();
|
|
33
|
+
}, (err) => this.handleRejectedODataJsonPromise(err, logger, cb));
|
|
34
|
+
}
|
|
35
|
+
options() {
|
|
36
|
+
const options = [
|
|
37
|
+
{
|
|
38
|
+
option: '-u, --webUrl <webUrl>'
|
|
39
|
+
}
|
|
40
|
+
];
|
|
41
|
+
const parentOptions = super.options();
|
|
42
|
+
return options.concat(parentOptions);
|
|
43
|
+
}
|
|
44
|
+
validate(args) {
|
|
45
|
+
return utils_1.validation.isValidSharePointUrl(args.options.webUrl);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
module.exports = new SpoRoleDefinitionListCommand();
|
|
49
|
+
//# sourceMappingURL=roledefinition-list.js.map
|
|
@@ -41,6 +41,7 @@ exports.default = {
|
|
|
41
41
|
FEATURE_LIST: `${prefix} feature list`,
|
|
42
42
|
FIELD_ADD: `${prefix} field add`,
|
|
43
43
|
FIELD_GET: `${prefix} field get`,
|
|
44
|
+
FIELD_LIST: `${prefix} field list`,
|
|
44
45
|
FIELD_REMOVE: `${prefix} field remove`,
|
|
45
46
|
FIELD_SET: `${prefix} field set`,
|
|
46
47
|
FILE_ADD: `${prefix} file add`,
|
|
@@ -95,6 +96,8 @@ exports.default = {
|
|
|
95
96
|
LIST_LABEL_SET: `${prefix} list label set`,
|
|
96
97
|
LIST_LIST: `${prefix} list list`,
|
|
97
98
|
LIST_REMOVE: `${prefix} list remove`,
|
|
99
|
+
LIST_ROLEINHERITANCE_BREAK: `${prefix} list roleinheritance break`,
|
|
100
|
+
LIST_ROLEINHERITANCE_RESET: `${prefix} list roleinheritance reset`,
|
|
98
101
|
LIST_SET: `${prefix} list set`,
|
|
99
102
|
LIST_SITESCRIPT_GET: `${prefix} list sitescript get`,
|
|
100
103
|
LIST_VIEW_GET: `${prefix} list view get`,
|
|
@@ -117,6 +120,8 @@ exports.default = {
|
|
|
117
120
|
LISTITEM_RECORD_DECLARE: `${prefix} listitem record declare`,
|
|
118
121
|
LISTITEM_RECORD_UNDECLARE: `${prefix} listitem record undeclare`,
|
|
119
122
|
LISTITEM_REMOVE: `${prefix} listitem remove`,
|
|
123
|
+
LISTITEM_ROLEINHERITANCE_BREAK: `${prefix} listitem roleinheritance break`,
|
|
124
|
+
LISTITEM_ROLEINHERITANCE_RESET: `${prefix} listitem roleinheritance reset`,
|
|
120
125
|
LISTITEM_SET: `${prefix} listitem set`,
|
|
121
126
|
MAIL_SEND: `${prefix} mail send`,
|
|
122
127
|
NAVIGATION_NODE_ADD: `${prefix} navigation node add`,
|
|
@@ -159,6 +164,7 @@ exports.default = {
|
|
|
159
164
|
REPORT_SITEUSAGEPAGES: `${prefix} report siteusagepages`,
|
|
160
165
|
REPORT_SITEUSAGESITECOUNTS: `${prefix} report siteusagesitecounts`,
|
|
161
166
|
REPORT_SITEUSAGESTORAGE: `${prefix} report siteusagestorage`,
|
|
167
|
+
ROLEDEFINITION_LIST: `${prefix} roledefinition list`,
|
|
162
168
|
SEARCH: `${prefix} search`,
|
|
163
169
|
SERVICEPRINCIPAL_GRANT_ADD: `${prefix} serviceprincipal grant add`,
|
|
164
170
|
SERVICEPRINCIPAL_GRANT_LIST: `${prefix} serviceprincipal grant list`,
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const GraphCommand_1 = require("../../../base/GraphCommand");
|
|
4
|
+
const request_1 = require("../../../../request");
|
|
5
|
+
const commands_1 = require("../../commands");
|
|
6
|
+
class TenantSecurityAlertsListCommand extends GraphCommand_1.default {
|
|
7
|
+
get name() {
|
|
8
|
+
return commands_1.default.SECURITY_ALERTS_LIST;
|
|
9
|
+
}
|
|
10
|
+
get description() {
|
|
11
|
+
return 'Gets the security alerts for a tenant';
|
|
12
|
+
}
|
|
13
|
+
getTelemetryProperties(args) {
|
|
14
|
+
const telemetryProps = super.getTelemetryProperties(args);
|
|
15
|
+
telemetryProps.vendor = typeof args.options.vendor !== 'undefined';
|
|
16
|
+
return telemetryProps;
|
|
17
|
+
}
|
|
18
|
+
defaultProperties() {
|
|
19
|
+
return ['id', 'title', 'severity'];
|
|
20
|
+
}
|
|
21
|
+
commandAction(logger, args, cb) {
|
|
22
|
+
this
|
|
23
|
+
.listAlert(args.options)
|
|
24
|
+
.then((res) => {
|
|
25
|
+
logger.log(res);
|
|
26
|
+
cb();
|
|
27
|
+
}, (err) => this.handleRejectedODataJsonPromise(err, logger, cb));
|
|
28
|
+
}
|
|
29
|
+
listAlert(options) {
|
|
30
|
+
let queryFilter = '';
|
|
31
|
+
if (options.vendor) {
|
|
32
|
+
let vendorName = options.vendor;
|
|
33
|
+
switch (options.vendor.toLowerCase()) {
|
|
34
|
+
case 'azure security center':
|
|
35
|
+
vendorName = 'ASC';
|
|
36
|
+
break;
|
|
37
|
+
case 'microsoft cloud app security':
|
|
38
|
+
vendorName = 'MCAS';
|
|
39
|
+
break;
|
|
40
|
+
case 'azure active directory identity protection':
|
|
41
|
+
vendorName = 'IPC';
|
|
42
|
+
}
|
|
43
|
+
queryFilter = `?$filter=vendorInformation/provider eq '${encodeURIComponent(vendorName)}'`;
|
|
44
|
+
}
|
|
45
|
+
const requestOptions = {
|
|
46
|
+
url: `${this.resource}/v1.0/security/alerts${queryFilter}`,
|
|
47
|
+
headers: {
|
|
48
|
+
accept: 'application/json;odata.metadata=none'
|
|
49
|
+
},
|
|
50
|
+
responseType: 'json'
|
|
51
|
+
};
|
|
52
|
+
return request_1.default
|
|
53
|
+
.get(requestOptions)
|
|
54
|
+
.then(response => {
|
|
55
|
+
const alertList = response.value;
|
|
56
|
+
if (!alertList) {
|
|
57
|
+
return Promise.reject(`Error fetching security alerts`);
|
|
58
|
+
}
|
|
59
|
+
return Promise.resolve(alertList);
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
options() {
|
|
63
|
+
const options = [
|
|
64
|
+
{ option: '--vendor [vendor]' }
|
|
65
|
+
];
|
|
66
|
+
const parentOptions = super.options();
|
|
67
|
+
return options.concat(parentOptions);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
module.exports = new TenantSecurityAlertsListCommand();
|
|
71
|
+
//# sourceMappingURL=security-alerts-list.js.map
|
|
@@ -9,6 +9,7 @@ exports.default = {
|
|
|
9
9
|
REPORT_OFFICE365ACTIVATIONSUSERDETAIL: `${prefix} report office365activationsuserdetail`,
|
|
10
10
|
REPORT_OFFICE365ACTIVATIONSUSERCOUNTS: `${prefix} report office365activationsusercounts`,
|
|
11
11
|
REPORT_SERVICESUSERCOUNTS: `${prefix} report servicesusercounts`,
|
|
12
|
+
SECURITY_ALERTS_LIST: `${prefix} security alerts list`,
|
|
12
13
|
SERVICEANNOUNCEMENT_HEALTHISSUE_GET: `${prefix} serviceannouncement healthissue get`,
|
|
13
14
|
SERVICEANNOUNCEMENT_HEALTH_GET: `${prefix} serviceannouncement health get`,
|
|
14
15
|
SERVICEANNOUNCEMENT_HEALTH_LIST: `${prefix} serviceannouncement health list`,
|
|
@@ -2,6 +2,24 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.accessToken = void 0;
|
|
4
4
|
exports.accessToken = {
|
|
5
|
+
isAppOnlyAccessToken(accessToken) {
|
|
6
|
+
let isAppOnlyAccessToken = false;
|
|
7
|
+
if (!accessToken || accessToken.length === 0) {
|
|
8
|
+
return isAppOnlyAccessToken;
|
|
9
|
+
}
|
|
10
|
+
const chunks = accessToken.split('.');
|
|
11
|
+
if (chunks.length !== 3) {
|
|
12
|
+
return isAppOnlyAccessToken;
|
|
13
|
+
}
|
|
14
|
+
const tokenString = Buffer.from(chunks[1], 'base64').toString();
|
|
15
|
+
try {
|
|
16
|
+
const token = JSON.parse(tokenString);
|
|
17
|
+
isAppOnlyAccessToken = token.idtyp === 'app';
|
|
18
|
+
}
|
|
19
|
+
catch (_a) {
|
|
20
|
+
}
|
|
21
|
+
return isAppOnlyAccessToken;
|
|
22
|
+
},
|
|
5
23
|
getTenantIdFromAccessToken(accessToken) {
|
|
6
24
|
let tenantId = '';
|
|
7
25
|
if (!accessToken || accessToken.length === 0) {
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# aad app open
|
|
2
|
+
|
|
3
|
+
Returns deep link of the current AD app to open the Azure portal on the Azure AD app registration management page.
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
```sh
|
|
8
|
+
m365 app open [options]
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Options
|
|
12
|
+
|
|
13
|
+
`--appId [appId]`
|
|
14
|
+
: Optional Application (client) ID of the Azure AD application registration to open. Uses the app from the `.m365rc.json` file corresponding to the `appId`. If multiple apps are available, this will evade the prompt to choose an app. If the `appId` is not available in the list of apps, an error is thrown.
|
|
15
|
+
|
|
16
|
+
`--preview`
|
|
17
|
+
: Use to open the url of the Azure AD preview portal.
|
|
18
|
+
|
|
19
|
+
--8<-- "docs/cmd/_global.md"
|
|
20
|
+
|
|
21
|
+
## Remarks
|
|
22
|
+
|
|
23
|
+
If config setting `autoOpenLinksInBrowser` is configured to true, the command will automatically open the link to the Azure Portal in the browser.
|
|
24
|
+
|
|
25
|
+
Gets the app from the `.m365rc.json` file in the current directory. If the `--appId` option is not used and multiple apps are available, it will prompt the user to choose one.
|
|
26
|
+
|
|
27
|
+
## Examples
|
|
28
|
+
|
|
29
|
+
Prints the URL to the Azure AD application registration management page on the Azure Portal.
|
|
30
|
+
|
|
31
|
+
```sh
|
|
32
|
+
m365 app open
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Prints the url of the Azure AD application registration management page on the preview Azure Portal.
|
|
36
|
+
|
|
37
|
+
```sh
|
|
38
|
+
m365 app open --preview
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
Prints the URL to the Azure AD application registration management page on the Azure Portal, evading a possible choice prompt in the case of multiple saved apps in the `.m365rc.json` file.
|
|
42
|
+
|
|
43
|
+
```sh
|
|
44
|
+
m365 app open --appId d75be2e1-0204-4f95-857d-51a37cf40be8
|
|
45
|
+
```
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# planner bucket get
|
|
2
|
+
|
|
3
|
+
Gets the Microsoft Planner bucket in a plan
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
```sh
|
|
8
|
+
m365 planner bucket get [options]
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Options
|
|
12
|
+
|
|
13
|
+
`-i, --id [id]`
|
|
14
|
+
: ID of the bucket to retrieve details. Specify either `id` or `name` but not both.
|
|
15
|
+
|
|
16
|
+
`-name, --name [name]`
|
|
17
|
+
: Name of the bucket to retrieve details. Specify either `id` or `name` but not both.
|
|
18
|
+
|
|
19
|
+
`--planId [planId]`
|
|
20
|
+
: Plan ID to which the bucket belongs. Specify either `planId` or `planName` when using `name`.
|
|
21
|
+
|
|
22
|
+
`--planName [planName]`
|
|
23
|
+
: Plan Name to which the bucket belongs. Specify either `planId` or `planName` when using `name`.
|
|
24
|
+
|
|
25
|
+
`--ownerGroupId [ownerGroupId]`
|
|
26
|
+
: ID of the group to which the plan belongs. Specify `ownerGroupId` or `ownerGroupName` when using `planName`.
|
|
27
|
+
|
|
28
|
+
`--ownerGroupName [ownerGroupName]`
|
|
29
|
+
: Name of the group to which the plan belongs. Specify `ownerGroupId` or `ownerGroupName` when using `planName`.
|
|
30
|
+
|
|
31
|
+
--8<-- "docs/cmd/_global.md"
|
|
32
|
+
|
|
33
|
+
## Examples
|
|
34
|
+
|
|
35
|
+
Gets the specified Microsoft Planner bucket
|
|
36
|
+
|
|
37
|
+
```sh
|
|
38
|
+
m365 planner bucket get --id "5h1uuYFk4kKQ0hfoTUkRLpgALtYi"
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
Gets the Microsoft Planner bucket in the PlanId xqQg5FS2LkCp935s-FIFm2QAFkHM
|
|
42
|
+
|
|
43
|
+
```sh
|
|
44
|
+
m365 planner bucket get --name "Planner Bucket A" --planId "xqQg5FS2LkCp935s-FIFm2QAFkHM"
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Gets the Microsoft Planner bucket in the Plan _My Plan_ owned by group _My Group_
|
|
48
|
+
|
|
49
|
+
```sh
|
|
50
|
+
m365 planner bucket get --name "Planner Bucket A" --planName "My Plan" --ownerGroupName "My Group"
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
Gets the Microsoft Planner bucket in the Plan _My Plan_ owned by groupId ee0f40fc-b2f7-45c7-b62d-11b90dd2ea8e
|
|
54
|
+
|
|
55
|
+
```sh
|
|
56
|
+
m365 planner bucket get --name "Planner Bucket A" --planName "My Plan" --ownerGroupId "ee0f40fc-b2f7-45c7-b62d-11b90dd2ea8e"
|
|
57
|
+
```
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# planner bucket remove
|
|
2
|
+
|
|
3
|
+
Removes the Microsoft Planner bucket from a plan
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
```sh
|
|
8
|
+
m365 planner bucket remove [options]
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Options
|
|
12
|
+
|
|
13
|
+
`--id [id]`
|
|
14
|
+
: ID of the bucket to remove. Specify either `id` or `name` but not both.
|
|
15
|
+
|
|
16
|
+
`--name [name]`
|
|
17
|
+
: Name of the bucket to remove. Specify either `id` or `name` but not both.
|
|
18
|
+
|
|
19
|
+
`--planId [planId]`
|
|
20
|
+
: ID of the plan to which the bucket to remove belongs. Specify either `planId` or `planName` when using `name`.
|
|
21
|
+
|
|
22
|
+
`--planName [planName]`
|
|
23
|
+
: Name of the plan to which the bucket to remove belongs. Specify either `planId` or `planName` when using `name`.
|
|
24
|
+
|
|
25
|
+
`--ownerGroupId [ownerGroupId]`
|
|
26
|
+
: ID of the group to which the plan belongs. Specify either `ownerGroupId` or `ownerGroupName` when using `planName`.
|
|
27
|
+
|
|
28
|
+
`--ownerGroupName [ownerGroupName]`
|
|
29
|
+
: Name of the group to which the plan belongs. Specify either `ownerGroupId` or `ownerGroupName` when using `planName`.
|
|
30
|
+
|
|
31
|
+
`--confirm`
|
|
32
|
+
: Don't prompt for confirmation
|
|
33
|
+
|
|
34
|
+
--8<-- "docs/cmd/_global.md"
|
|
35
|
+
|
|
36
|
+
## Examples
|
|
37
|
+
|
|
38
|
+
Removes the Microsoft Planner bucket by ID
|
|
39
|
+
|
|
40
|
+
```sh
|
|
41
|
+
m365 planner bucket remove --id "vncYUXCRBke28qMLB-d4xJcACtNz"
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
Removes the Microsoft Planner bucket by ID without confirmation
|
|
45
|
+
|
|
46
|
+
```sh
|
|
47
|
+
m365 planner bucket remove --id "vncYUXCRBke28qMLB-d4xJcACtNz" --confirm
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
Removes the Microsoft Planner bucket with name _My Bucket_ in the Plan with ID _oUHpnKBFekqfGE_PS6GGUZcAFY7b_
|
|
51
|
+
|
|
52
|
+
```sh
|
|
53
|
+
m365 planner bucket remove --name "My Bucket" --planId "oUHpnKBFekqfGE_PS6GGUZcAFY7b"
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
Removes the Microsoft Planner bucket with name _My Bucket_ in the Plan _My Plan_ owned by group _My Group_
|
|
57
|
+
|
|
58
|
+
```sh
|
|
59
|
+
m365 planner bucket remove --name "My Bucket" --planName "My Plan" --ownerGroupName "My Group"
|
|
60
|
+
```
|
|
@@ -10,8 +10,29 @@ m365 planner task get [options]
|
|
|
10
10
|
|
|
11
11
|
## Options
|
|
12
12
|
|
|
13
|
-
`-i, --id
|
|
14
|
-
: ID of the task to
|
|
13
|
+
`-i, --id [id]`
|
|
14
|
+
: ID of the task. Specify either `id` or `title` but not both. When you specify the task ID, you no longer need to provide the information for `bucket`, `plan`, and `ownerGroup`.
|
|
15
|
+
|
|
16
|
+
`-t, --title [title]`
|
|
17
|
+
: Title of the task. Specify either `id` or `title` but not both.
|
|
18
|
+
|
|
19
|
+
`--bucketId [bucketId]`
|
|
20
|
+
: Bucket ID to which the task belongs. Specify `bucketId` or `bucketName` when using `title`.
|
|
21
|
+
|
|
22
|
+
`--bucketName [bucketName]`
|
|
23
|
+
: Bucket Name to which the task belongs. Specify `bucketId` or `bucketName` when using `title`.
|
|
24
|
+
|
|
25
|
+
`--planId [planId]`
|
|
26
|
+
: Plan ID to which the task belongs. Specify `planId` or `planName` when using `bucketName`.
|
|
27
|
+
|
|
28
|
+
`--planName [planName]`
|
|
29
|
+
: Plan Name to which the task belongs. Specify `planId` or `planName` when using `bucketName`.
|
|
30
|
+
|
|
31
|
+
`--ownerGroupId [ownerGroupId]`
|
|
32
|
+
: ID of the group to which the plan belongs. Specify `ownerGroupId` or `ownerGroupName` when using `planName`.
|
|
33
|
+
|
|
34
|
+
`--ownerGroupName [ownerGroupName]`
|
|
35
|
+
: Name of the group to which the plan belongs. Specify `ownerGroupId` or `ownerGroupName` when using `planName`.
|
|
15
36
|
|
|
16
37
|
--8<-- "docs/cmd/_global.md"
|
|
17
38
|
|
|
@@ -22,8 +43,14 @@ m365 planner task get [options]
|
|
|
22
43
|
|
|
23
44
|
## Examples
|
|
24
45
|
|
|
25
|
-
Retrieve the the specified planner task
|
|
46
|
+
Retrieve the the specified planner task by id.
|
|
26
47
|
|
|
27
48
|
```sh
|
|
28
49
|
m365 planner task get --id 'vzCcZoOv-U27PwydxHB8opcADJo-'
|
|
29
50
|
```
|
|
51
|
+
|
|
52
|
+
Retrieve the the specified planner task with the title _My Planner Task_ from the bucket named _My Planner Bucket_. Based on the plan with the name _My Planner Plan_ owned by the group _My Planner Group_.
|
|
53
|
+
|
|
54
|
+
```sh
|
|
55
|
+
m365 planner task get --title "My Planner Task" --bucketName "My Planner Bucket" --planName "My Planner Plan" --ownerGroupName "My Planner Group"
|
|
56
|
+
```
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# spo field list
|
|
2
|
+
|
|
3
|
+
Retrieves columns for the specified list or site
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
```sh
|
|
8
|
+
m365 spo field list [options]
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Options
|
|
12
|
+
|
|
13
|
+
`-u, --webUrl <webUrl>`
|
|
14
|
+
: Absolute URL of the site where fields are located
|
|
15
|
+
|
|
16
|
+
`-t, --listTitle [listTitle]`
|
|
17
|
+
: Title of the list where fields are located. Specify `listTitle`, `listId` or `listUrl`
|
|
18
|
+
|
|
19
|
+
`-i --listId [listId]`
|
|
20
|
+
: ID of the list where fields are located. Specify `listTitle`, `listId` or `listUrl`
|
|
21
|
+
|
|
22
|
+
`--listUrl [listUrl]`
|
|
23
|
+
: Server- or web-relative URL of the list where fields are located. Specify `listTitle`, `listId` or `listUrl`
|
|
24
|
+
|
|
25
|
+
--8<-- "docs/cmd/_global.md"
|
|
26
|
+
|
|
27
|
+
## Examples
|
|
28
|
+
|
|
29
|
+
Retrieves site columns for site _https://contoso.sharepoint.com/sites/contoso-sales_.
|
|
30
|
+
|
|
31
|
+
```sh
|
|
32
|
+
m365 spo field list --webUrl https://contoso.sharepoint.com/sites/contoso-sales
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Retrieves list columns for list _Events_ in site _https://contoso.sharepoint.com/sites/contoso-sales_
|
|
36
|
+
|
|
37
|
+
```sh
|
|
38
|
+
m365 spo field list --webUrl https://contoso.sharepoint.com/sites/contoso-sales --listTitle Events
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
Retrieves list columns for list _202b8199-b9de-43fd-9737-7f213f51c991_ in site _https://contoso.sharepoint.com/sites/contoso-sales_
|
|
42
|
+
|
|
43
|
+
```sh
|
|
44
|
+
m365 spo field list --webUrl https://contoso.sharepoint.com/sites/contoso-sales --listId '202b8199-b9de-43fd-9737-7f213f51c991'
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Retrieves list columns for list _/sites/contoso-sales/lists/Events_ in site _https://contoso.sharepoint.com/sites/contoso-sales_
|
|
48
|
+
|
|
49
|
+
```sh
|
|
50
|
+
m365 spo field list --webUrl https://contoso.sharepoint.com/sites/contoso-sales --listUrl '/sites/contoso-sales/lists/Events'
|
|
51
|
+
```
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# spo list roleinheritance break
|
|
2
|
+
|
|
3
|
+
Breaks role inheritance on list or library
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
```sh
|
|
8
|
+
m365 spo list roleinheritance break [options]
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Options
|
|
12
|
+
|
|
13
|
+
`-u, --webUrl <webUrl>`
|
|
14
|
+
: URL of the site where the list to retrieve is located
|
|
15
|
+
|
|
16
|
+
`-i, --listId [listId]`
|
|
17
|
+
: ID of the list to retrieve information for. Specify either id or title but not both
|
|
18
|
+
|
|
19
|
+
`-t, --listTitle [listTitle]`
|
|
20
|
+
: Title of the list to retrieve information for. Specify either id or title but not both
|
|
21
|
+
|
|
22
|
+
`-c, --clearExistingPermissions`
|
|
23
|
+
: Flag if used clears all roles from the list
|
|
24
|
+
|
|
25
|
+
--8<-- "docs/cmd/_global.md"
|
|
26
|
+
|
|
27
|
+
## Remarks
|
|
28
|
+
|
|
29
|
+
By default, when breaking permissions inheritance, the list will retain existing permissions. To remove existing permissions, use the `--clearExistingPermissions` option.
|
|
30
|
+
|
|
31
|
+
## Examples
|
|
32
|
+
|
|
33
|
+
Break inheritance of list _someList_ located in site _https://contoso.sharepoint.com/sites/project-x_
|
|
34
|
+
|
|
35
|
+
```sh
|
|
36
|
+
m365 spo list roleinheritance break --webUrl "https://contoso.sharepoint.com/sites/project-x" --listTitle "someList"
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
Break inheritance of list with ID _202b8199-b9de-43fd-9737-7f213f51c991_ located in site _https://contoso.sharepoint.com/sites/project-x_
|
|
40
|
+
|
|
41
|
+
```sh
|
|
42
|
+
m365 spo list roleinheritance break --webUrl "https://contoso.sharepoint.com/sites/project-x" --listId "202b8199-b9de-43fd-9737-7f213f51c991"
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
Break inheritance of list _someList_ located in site _https://contoso.sharepoint.com/sites/project-x_ with clearing permissions
|
|
46
|
+
|
|
47
|
+
```sh
|
|
48
|
+
m365 spo list roleinheritance break --webUrl "https://contoso.sharepoint.com/sites/project-x" --listTitle "someList" --clearExistingPermissions
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
Break inheritance of list with ID _202b8199-b9de-43fd-9737-7f213f51c991_ located in site _https://contoso.sharepoint.com/sites/project-x_ with clearing permissions
|
|
52
|
+
|
|
53
|
+
```sh
|
|
54
|
+
m365 spo list roleinheritance break --webUrl "https://contoso.sharepoint.com/sites/project-x" --listId "202b8199-b9de-43fd-9737-7f213f51c991" --clearExistingPermissions
|
|
55
|
+
```
|