@pnp/cli-microsoft365 5.9.0-beta.47e46ea → 5.9.0-beta.5009818
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 +11 -0
- package/dist/m365/pp/commands/Environment.js +3 -0
- package/dist/m365/pp/commands/card/card-list.js +68 -0
- package/dist/m365/pp/commands/dataverse/dataverse-table-list.js +6 -12
- package/dist/m365/pp/commands/environment/environment-get.js +75 -0
- package/dist/m365/pp/commands.js +2 -0
- package/dist/m365/spo/commands/eventreceiver/EventReceiver.js +3 -0
- package/dist/m365/spo/commands/eventreceiver/eventreceiver-remove.js +182 -0
- package/dist/m365/spo/commands/file/file-roleinheritance-break.js +129 -0
- package/dist/m365/spo/commands/folder/folder-roleassignment-remove.js +168 -0
- package/dist/m365/spo/commands/group/AssociatedGroupPropertiesCollection.js +3 -0
- package/dist/m365/spo/commands/group/group-list.js +49 -10
- package/dist/m365/spo/commands/list/list-contenttype-add.js +21 -18
- package/dist/m365/spo/commands/list/list-contenttype-default-set.js +59 -47
- package/dist/m365/spo/commands/list/list-contenttype-list.js +16 -8
- package/dist/m365/spo/commands/list/list-contenttype-remove.js +16 -8
- package/dist/m365/spo/commands/list/list-roleassignment-add.js +10 -10
- package/dist/m365/spo/commands/list/list-roleassignment-remove.js +8 -8
- package/dist/m365/spo/commands/listitem/listitem-roleassignment-remove.js +8 -8
- package/dist/m365/spo/commands/web/web-roleassignment-add.js +10 -10
- package/dist/m365/spo/commands/web/web-roleassignment-remove.js +8 -8
- package/dist/m365/spo/commands.js +3 -0
- package/dist/m365/teams/commands/channel/channel-add.js +9 -9
- package/docs/docs/cmd/pp/card/card-list.md +33 -0
- package/docs/docs/cmd/pp/dataverse/dataverse-table-list.md +2 -2
- package/docs/docs/cmd/pp/environment/environment-get.md +38 -0
- package/docs/docs/cmd/pp/environment/environment-list.md +1 -1
- package/docs/docs/cmd/pp/solution/solution-list.md +2 -2
- package/docs/docs/cmd/spo/eventreceiver/eventreceiver-remove.md +69 -0
- package/docs/docs/cmd/spo/file/file-roleinheritance-break.md +54 -0
- package/docs/docs/cmd/spo/folder/folder-roleassignment-remove.md +57 -0
- package/docs/docs/cmd/spo/group/group-list.md +10 -1
- package/docs/docs/cmd/spo/list/list-contenttype-add.md +16 -7
- package/docs/docs/cmd/spo/list/list-contenttype-default-set.md +16 -7
- package/docs/docs/cmd/spo/list/list-contenttype-list.md +15 -6
- package/docs/docs/cmd/spo/list/list-contenttype-remove.md +17 -8
- package/docs/docs/cmd/teams/channel/channel-add.md +4 -4
- package/package.json +2 -1
|
@@ -18,6 +18,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
18
18
|
const Cli_1 = require("../../../../cli/Cli");
|
|
19
19
|
const request_1 = require("../../../../request");
|
|
20
20
|
const formatting_1 = require("../../../../utils/formatting");
|
|
21
|
+
const urlUtil_1 = require("../../../../utils/urlUtil");
|
|
21
22
|
const validation_1 = require("../../../../utils/validation");
|
|
22
23
|
const SpoCommand_1 = require("../../../base/SpoCommand");
|
|
23
24
|
const commands_1 = require("../../commands");
|
|
@@ -41,18 +42,22 @@ class SpoListContentTypeRemoveCommand extends SpoCommand_1.default {
|
|
|
41
42
|
return __awaiter(this, void 0, void 0, function* () {
|
|
42
43
|
const removeContentTypeFromList = () => __awaiter(this, void 0, void 0, function* () {
|
|
43
44
|
if (this.verbose) {
|
|
44
|
-
const list = (args.options.listId ? args.options.listId : args.options.listTitle);
|
|
45
|
+
const list = (args.options.listId ? args.options.listId : args.options.listTitle ? args.options.listTitle : args.options.listUrl);
|
|
45
46
|
logger.logToStderr(`Removing content type ${args.options.contentTypeId} from list ${list} in site at ${args.options.webUrl}...`);
|
|
46
47
|
}
|
|
47
|
-
let requestUrl =
|
|
48
|
+
let requestUrl = `${args.options.webUrl}/_api/web/`;
|
|
48
49
|
if (args.options.listId) {
|
|
49
|
-
requestUrl
|
|
50
|
+
requestUrl += `lists(guid'${formatting_1.formatting.encodeQueryParameter(args.options.listId)}')`;
|
|
50
51
|
}
|
|
51
|
-
else {
|
|
52
|
-
requestUrl
|
|
52
|
+
else if (args.options.listTitle) {
|
|
53
|
+
requestUrl += `lists/getByTitle('${formatting_1.formatting.encodeQueryParameter(args.options.listTitle)}')`;
|
|
54
|
+
}
|
|
55
|
+
else if (args.options.listUrl) {
|
|
56
|
+
const listServerRelativeUrl = urlUtil_1.urlUtil.getServerRelativePath(args.options.webUrl, args.options.listUrl);
|
|
57
|
+
requestUrl += `GetList('${formatting_1.formatting.encodeQueryParameter(listServerRelativeUrl)}')`;
|
|
53
58
|
}
|
|
54
59
|
const requestOptions = {
|
|
55
|
-
url: requestUrl
|
|
60
|
+
url: `${requestUrl}/ContentTypes('${encodeURIComponent(args.options.contentTypeId)}')`,
|
|
56
61
|
headers: {
|
|
57
62
|
'X-HTTP-Method': 'DELETE',
|
|
58
63
|
'If-Match': '*',
|
|
@@ -75,7 +80,7 @@ class SpoListContentTypeRemoveCommand extends SpoCommand_1.default {
|
|
|
75
80
|
type: 'confirm',
|
|
76
81
|
name: 'continue',
|
|
77
82
|
default: false,
|
|
78
|
-
message: `Are you sure you want to remove the content type ${args.options.contentTypeId} from the list ${args.options.listId
|
|
83
|
+
message: `Are you sure you want to remove the content type ${args.options.contentTypeId} from the list ${args.options.listId ? args.options.listId : args.options.listTitle ? args.options.listTitle : args.options.listUrl} in site ${args.options.webUrl}?`
|
|
79
84
|
});
|
|
80
85
|
if (result.continue) {
|
|
81
86
|
yield removeContentTypeFromList();
|
|
@@ -89,6 +94,7 @@ _SpoListContentTypeRemoveCommand_instances = new WeakSet(), _SpoListContentTypeR
|
|
|
89
94
|
Object.assign(this.telemetryProperties, {
|
|
90
95
|
listId: typeof args.options.listId !== 'undefined',
|
|
91
96
|
listTitle: typeof args.options.listTitle !== 'undefined',
|
|
97
|
+
listUrl: typeof args.options.listUrl !== 'undefined',
|
|
92
98
|
confirm: (!(!args.options.confirm)).toString()
|
|
93
99
|
});
|
|
94
100
|
});
|
|
@@ -99,6 +105,8 @@ _SpoListContentTypeRemoveCommand_instances = new WeakSet(), _SpoListContentTypeR
|
|
|
99
105
|
option: '-l, --listId [listId]'
|
|
100
106
|
}, {
|
|
101
107
|
option: '-t, --listTitle [listTitle]'
|
|
108
|
+
}, {
|
|
109
|
+
option: '--listUrl [listUrl]'
|
|
102
110
|
}, {
|
|
103
111
|
option: '-c, --contentTypeId <contentTypeId>'
|
|
104
112
|
}, {
|
|
@@ -120,7 +128,7 @@ _SpoListContentTypeRemoveCommand_instances = new WeakSet(), _SpoListContentTypeR
|
|
|
120
128
|
}, _SpoListContentTypeRemoveCommand_initTypes = function _SpoListContentTypeRemoveCommand_initTypes() {
|
|
121
129
|
this.types.string.push('contentTypeId', 'c');
|
|
122
130
|
}, _SpoListContentTypeRemoveCommand_initOptionSets = function _SpoListContentTypeRemoveCommand_initOptionSets() {
|
|
123
|
-
this.optionSets.push(['listId', 'listTitle']);
|
|
131
|
+
this.optionSets.push(['listId', 'listTitle', 'listUrl']);
|
|
124
132
|
};
|
|
125
133
|
module.exports = new SpoListContentTypeRemoveCommand();
|
|
126
134
|
//# sourceMappingURL=list-contenttype-remove.js.map
|
|
@@ -56,17 +56,17 @@ class SpoListRoleAssignmentAddCommand extends SpoCommand_1.default {
|
|
|
56
56
|
const listServerRelativeUrl = urlUtil_1.urlUtil.getServerRelativePath(args.options.webUrl, args.options.listUrl);
|
|
57
57
|
requestUrl += `GetList('${formatting_1.formatting.encodeQueryParameter(listServerRelativeUrl)}')/`;
|
|
58
58
|
}
|
|
59
|
-
args.options.roleDefinitionId = yield this.
|
|
59
|
+
args.options.roleDefinitionId = yield this.getRoleDefinitionId(args.options);
|
|
60
60
|
if (args.options.upn) {
|
|
61
|
-
args.options.principalId = yield this.
|
|
62
|
-
yield this.
|
|
61
|
+
args.options.principalId = yield this.getUserPrincipalId(args.options);
|
|
62
|
+
yield this.addRoleAssignment(requestUrl, logger, args.options);
|
|
63
63
|
}
|
|
64
64
|
else if (args.options.groupName) {
|
|
65
|
-
args.options.principalId = yield this.
|
|
66
|
-
this.
|
|
65
|
+
args.options.principalId = yield this.getGroupPrincipalId(args.options);
|
|
66
|
+
this.addRoleAssignment(requestUrl, logger, args.options);
|
|
67
67
|
}
|
|
68
68
|
else {
|
|
69
|
-
yield this.
|
|
69
|
+
yield this.addRoleAssignment(requestUrl, logger, args.options);
|
|
70
70
|
}
|
|
71
71
|
}
|
|
72
72
|
catch (err) {
|
|
@@ -74,7 +74,7 @@ class SpoListRoleAssignmentAddCommand extends SpoCommand_1.default {
|
|
|
74
74
|
}
|
|
75
75
|
});
|
|
76
76
|
}
|
|
77
|
-
|
|
77
|
+
addRoleAssignment(requestUrl, logger, options) {
|
|
78
78
|
const requestOptions = {
|
|
79
79
|
url: `${requestUrl}roleassignments/addroleassignment(principalid='${options.principalId}',roledefid='${options.roleDefinitionId}')`,
|
|
80
80
|
method: 'POST',
|
|
@@ -89,7 +89,7 @@ class SpoListRoleAssignmentAddCommand extends SpoCommand_1.default {
|
|
|
89
89
|
.then(_ => Promise.resolve())
|
|
90
90
|
.catch((err) => Promise.reject(err));
|
|
91
91
|
}
|
|
92
|
-
|
|
92
|
+
getRoleDefinitionId(options) {
|
|
93
93
|
if (!options.roleDefinitionName) {
|
|
94
94
|
return Promise.resolve(options.roleDefinitionId);
|
|
95
95
|
}
|
|
@@ -108,7 +108,7 @@ class SpoListRoleAssignmentAddCommand extends SpoCommand_1.default {
|
|
|
108
108
|
return Promise.reject(err);
|
|
109
109
|
});
|
|
110
110
|
}
|
|
111
|
-
|
|
111
|
+
getGroupPrincipalId(options) {
|
|
112
112
|
const groupGetCommandOptions = {
|
|
113
113
|
webUrl: options.webUrl,
|
|
114
114
|
name: options.groupName,
|
|
@@ -124,7 +124,7 @@ class SpoListRoleAssignmentAddCommand extends SpoCommand_1.default {
|
|
|
124
124
|
return Promise.reject(err);
|
|
125
125
|
});
|
|
126
126
|
}
|
|
127
|
-
|
|
127
|
+
getUserPrincipalId(options) {
|
|
128
128
|
const userGetCommandOptions = {
|
|
129
129
|
webUrl: options.webUrl,
|
|
130
130
|
email: options.upn,
|
|
@@ -57,15 +57,15 @@ class SpoListRoleAssignmentRemoveCommand extends SpoCommand_1.default {
|
|
|
57
57
|
requestUrl += `GetList('${formatting_1.formatting.encodeQueryParameter(listServerRelativeUrl)}')/`;
|
|
58
58
|
}
|
|
59
59
|
if (args.options.upn) {
|
|
60
|
-
args.options.principalId = yield this.
|
|
61
|
-
yield this.
|
|
60
|
+
args.options.principalId = yield this.getUserPrincipalId(args.options);
|
|
61
|
+
yield this.removeRoleAssignment(requestUrl, logger, args.options);
|
|
62
62
|
}
|
|
63
63
|
else if (args.options.groupName) {
|
|
64
|
-
args.options.principalId = yield this.
|
|
65
|
-
yield this.
|
|
64
|
+
args.options.principalId = yield this.getGroupPrincipalId(args.options);
|
|
65
|
+
yield this.removeRoleAssignment(requestUrl, logger, args.options);
|
|
66
66
|
}
|
|
67
67
|
else {
|
|
68
|
-
yield this.
|
|
68
|
+
yield this.removeRoleAssignment(requestUrl, logger, args.options);
|
|
69
69
|
}
|
|
70
70
|
}
|
|
71
71
|
catch (err) {
|
|
@@ -88,7 +88,7 @@ class SpoListRoleAssignmentRemoveCommand extends SpoCommand_1.default {
|
|
|
88
88
|
}
|
|
89
89
|
});
|
|
90
90
|
}
|
|
91
|
-
|
|
91
|
+
removeRoleAssignment(requestUrl, logger, options) {
|
|
92
92
|
const requestOptions = {
|
|
93
93
|
url: `${requestUrl}roleassignments/removeroleassignment(principalid='${options.principalId}')`,
|
|
94
94
|
method: 'POST',
|
|
@@ -103,7 +103,7 @@ class SpoListRoleAssignmentRemoveCommand extends SpoCommand_1.default {
|
|
|
103
103
|
.then(_ => Promise.resolve())
|
|
104
104
|
.catch((err) => Promise.reject(err));
|
|
105
105
|
}
|
|
106
|
-
|
|
106
|
+
getGroupPrincipalId(options) {
|
|
107
107
|
const groupGetCommandOptions = {
|
|
108
108
|
webUrl: options.webUrl,
|
|
109
109
|
name: options.groupName,
|
|
@@ -119,7 +119,7 @@ class SpoListRoleAssignmentRemoveCommand extends SpoCommand_1.default {
|
|
|
119
119
|
return Promise.reject(err);
|
|
120
120
|
});
|
|
121
121
|
}
|
|
122
|
-
|
|
122
|
+
getUserPrincipalId(options) {
|
|
123
123
|
const userGetCommandOptions = {
|
|
124
124
|
webUrl: options.webUrl,
|
|
125
125
|
email: options.upn,
|
|
@@ -58,15 +58,15 @@ class SpoListItemRoleAssignmentRemoveCommand extends SpoCommand_1.default {
|
|
|
58
58
|
}
|
|
59
59
|
requestUrl += `items(${args.options.listItemId})/`;
|
|
60
60
|
if (args.options.upn) {
|
|
61
|
-
args.options.principalId = yield this.
|
|
62
|
-
yield this.
|
|
61
|
+
args.options.principalId = yield this.getUserPrincipalId(args.options);
|
|
62
|
+
yield this.removeRoleAssignment(requestUrl, logger, args.options);
|
|
63
63
|
}
|
|
64
64
|
else if (args.options.groupName) {
|
|
65
|
-
args.options.principalId = yield this.
|
|
66
|
-
yield this.
|
|
65
|
+
args.options.principalId = yield this.getGroupPrincipalId(args.options);
|
|
66
|
+
yield this.removeRoleAssignment(requestUrl, logger, args.options);
|
|
67
67
|
}
|
|
68
68
|
else {
|
|
69
|
-
yield this.
|
|
69
|
+
yield this.removeRoleAssignment(requestUrl, logger, args.options);
|
|
70
70
|
}
|
|
71
71
|
}
|
|
72
72
|
catch (err) {
|
|
@@ -89,7 +89,7 @@ class SpoListItemRoleAssignmentRemoveCommand extends SpoCommand_1.default {
|
|
|
89
89
|
}
|
|
90
90
|
});
|
|
91
91
|
}
|
|
92
|
-
|
|
92
|
+
removeRoleAssignment(requestUrl, logger, options) {
|
|
93
93
|
const requestOptions = {
|
|
94
94
|
url: `${requestUrl}roleassignments/removeroleassignment(principalid='${options.principalId}')`,
|
|
95
95
|
method: 'POST',
|
|
@@ -104,7 +104,7 @@ class SpoListItemRoleAssignmentRemoveCommand extends SpoCommand_1.default {
|
|
|
104
104
|
.then(_ => Promise.resolve())
|
|
105
105
|
.catch((err) => Promise.reject(err));
|
|
106
106
|
}
|
|
107
|
-
|
|
107
|
+
getGroupPrincipalId(options) {
|
|
108
108
|
const groupGetCommandOptions = {
|
|
109
109
|
webUrl: options.webUrl,
|
|
110
110
|
name: options.groupName,
|
|
@@ -120,7 +120,7 @@ class SpoListItemRoleAssignmentRemoveCommand extends SpoCommand_1.default {
|
|
|
120
120
|
return Promise.reject(err);
|
|
121
121
|
});
|
|
122
122
|
}
|
|
123
|
-
|
|
123
|
+
getUserPrincipalId(options) {
|
|
124
124
|
const userGetCommandOptions = {
|
|
125
125
|
webUrl: options.webUrl,
|
|
126
126
|
email: options.upn,
|
|
@@ -43,17 +43,17 @@ class SpoWebRoleAssignmentAddCommand extends SpoCommand_1.default {
|
|
|
43
43
|
logger.logToStderr(`Adding role assignment to web ${args.options.webUrl}...`);
|
|
44
44
|
}
|
|
45
45
|
try {
|
|
46
|
-
args.options.roleDefinitionId = yield this.
|
|
46
|
+
args.options.roleDefinitionId = yield this.getRoleDefinitionId(args.options);
|
|
47
47
|
if (args.options.upn) {
|
|
48
|
-
args.options.principalId = yield this.
|
|
49
|
-
yield this.
|
|
48
|
+
args.options.principalId = yield this.getUserPrincipalId(args.options);
|
|
49
|
+
yield this.addRoleAssignment(logger, args.options);
|
|
50
50
|
}
|
|
51
51
|
else if (args.options.groupName) {
|
|
52
|
-
args.options.principalId = yield this.
|
|
53
|
-
yield this.
|
|
52
|
+
args.options.principalId = yield this.getGroupPrincipalId(args.options);
|
|
53
|
+
yield this.addRoleAssignment(logger, args.options);
|
|
54
54
|
}
|
|
55
55
|
else {
|
|
56
|
-
yield this.
|
|
56
|
+
yield this.addRoleAssignment(logger, args.options);
|
|
57
57
|
}
|
|
58
58
|
}
|
|
59
59
|
catch (err) {
|
|
@@ -61,7 +61,7 @@ class SpoWebRoleAssignmentAddCommand extends SpoCommand_1.default {
|
|
|
61
61
|
}
|
|
62
62
|
});
|
|
63
63
|
}
|
|
64
|
-
|
|
64
|
+
addRoleAssignment(logger, options) {
|
|
65
65
|
const requestOptions = {
|
|
66
66
|
url: `${options.webUrl}/_api/web/roleassignments/addroleassignment(principalid='${options.principalId}',roledefid='${options.roleDefinitionId}')`,
|
|
67
67
|
method: 'POST',
|
|
@@ -76,7 +76,7 @@ class SpoWebRoleAssignmentAddCommand extends SpoCommand_1.default {
|
|
|
76
76
|
.then(_ => Promise.resolve())
|
|
77
77
|
.catch((err) => Promise.reject(err));
|
|
78
78
|
}
|
|
79
|
-
|
|
79
|
+
getRoleDefinitionId(options) {
|
|
80
80
|
if (!options.roleDefinitionName) {
|
|
81
81
|
return Promise.resolve(options.roleDefinitionId);
|
|
82
82
|
}
|
|
@@ -95,7 +95,7 @@ class SpoWebRoleAssignmentAddCommand extends SpoCommand_1.default {
|
|
|
95
95
|
return Promise.reject(err);
|
|
96
96
|
});
|
|
97
97
|
}
|
|
98
|
-
|
|
98
|
+
getGroupPrincipalId(options) {
|
|
99
99
|
const groupGetCommandOptions = {
|
|
100
100
|
webUrl: options.webUrl,
|
|
101
101
|
name: options.groupName,
|
|
@@ -111,7 +111,7 @@ class SpoWebRoleAssignmentAddCommand extends SpoCommand_1.default {
|
|
|
111
111
|
return Promise.reject(err);
|
|
112
112
|
});
|
|
113
113
|
}
|
|
114
|
-
|
|
114
|
+
getUserPrincipalId(options) {
|
|
115
115
|
const userGetCommandOptions = {
|
|
116
116
|
webUrl: options.webUrl,
|
|
117
117
|
email: options.upn,
|
|
@@ -44,15 +44,15 @@ class SpoWebRoleAssignmentRemoveCommand extends SpoCommand_1.default {
|
|
|
44
44
|
}
|
|
45
45
|
try {
|
|
46
46
|
if (args.options.upn) {
|
|
47
|
-
args.options.principalId = yield this.
|
|
48
|
-
yield this.
|
|
47
|
+
args.options.principalId = yield this.getUserPrincipalId(args.options);
|
|
48
|
+
yield this.removeRoleAssignment(logger, args.options);
|
|
49
49
|
}
|
|
50
50
|
else if (args.options.groupName) {
|
|
51
|
-
args.options.principalId = yield this.
|
|
52
|
-
yield this.
|
|
51
|
+
args.options.principalId = yield this.getGroupPrincipalId(args.options);
|
|
52
|
+
yield this.removeRoleAssignment(logger, args.options);
|
|
53
53
|
}
|
|
54
54
|
else {
|
|
55
|
-
yield this.
|
|
55
|
+
yield this.removeRoleAssignment(logger, args.options);
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
58
|
catch (err) {
|
|
@@ -75,7 +75,7 @@ class SpoWebRoleAssignmentRemoveCommand extends SpoCommand_1.default {
|
|
|
75
75
|
}
|
|
76
76
|
});
|
|
77
77
|
}
|
|
78
|
-
|
|
78
|
+
removeRoleAssignment(logger, options) {
|
|
79
79
|
const requestOptions = {
|
|
80
80
|
url: `${options.webUrl}/_api/web/roleassignments/removeroleassignment(principalid='${options.principalId}')`,
|
|
81
81
|
method: 'POST',
|
|
@@ -90,7 +90,7 @@ class SpoWebRoleAssignmentRemoveCommand extends SpoCommand_1.default {
|
|
|
90
90
|
.then(_ => Promise.resolve())
|
|
91
91
|
.catch((err) => Promise.reject(err));
|
|
92
92
|
}
|
|
93
|
-
|
|
93
|
+
getGroupPrincipalId(options) {
|
|
94
94
|
const groupGetCommandOptions = {
|
|
95
95
|
webUrl: options.webUrl,
|
|
96
96
|
name: options.groupName,
|
|
@@ -106,7 +106,7 @@ class SpoWebRoleAssignmentRemoveCommand extends SpoCommand_1.default {
|
|
|
106
106
|
return Promise.reject(err);
|
|
107
107
|
});
|
|
108
108
|
}
|
|
109
|
-
|
|
109
|
+
getUserPrincipalId(options) {
|
|
110
110
|
const userGetCommandOptions = {
|
|
111
111
|
webUrl: options.webUrl,
|
|
112
112
|
email: options.upn,
|
|
@@ -38,6 +38,7 @@ exports.default = {
|
|
|
38
38
|
CUSTOMACTION_REMOVE: `${prefix} customaction remove`,
|
|
39
39
|
EVENTRECEIVER_GET: `${prefix} eventreceiver get`,
|
|
40
40
|
EVENTRECEIVER_LIST: `${prefix} eventreceiver list`,
|
|
41
|
+
EVENTRECEIVER_REMOVE: `${prefix} eventreceiver remove`,
|
|
41
42
|
EXTERNALUSER_LIST: `${prefix} externaluser list`,
|
|
42
43
|
FEATURE_DISABLE: `${prefix} feature disable`,
|
|
43
44
|
FEATURE_ENABLE: `${prefix} feature enable`,
|
|
@@ -58,6 +59,7 @@ exports.default = {
|
|
|
58
59
|
FILE_RENAME: `${prefix} file rename`,
|
|
59
60
|
FILE_ROLEASSIGNMENT_ADD: `${prefix} file roleassignment add`,
|
|
60
61
|
FILE_ROLEASSIGNMENT_REMOVE: `${prefix} file roleassignment remove`,
|
|
62
|
+
FILE_ROLEINHERITANCE_BREAK: `${prefix} file roleinheritance break`,
|
|
61
63
|
FILE_ROLEINHERITANCE_RESET: `${prefix} file roleinheritance reset`,
|
|
62
64
|
FILE_SHARINGINFO_GET: `${prefix} file sharinginfo get`,
|
|
63
65
|
FOLDER_ADD: `${prefix} folder add`,
|
|
@@ -67,6 +69,7 @@ exports.default = {
|
|
|
67
69
|
FOLDER_MOVE: `${prefix} folder move`,
|
|
68
70
|
FOLDER_REMOVE: `${prefix} folder remove`,
|
|
69
71
|
FOLDER_RENAME: `${prefix} folder rename`,
|
|
72
|
+
FOLDER_ROLEASSIGNMENT_REMOVE: `${prefix} folder roleassignment remove`,
|
|
70
73
|
FOLDER_ROLEINHERITANCE_BREAK: `${prefix} folder roleinheritance break`,
|
|
71
74
|
FOLDER_ROLEINHERITANCE_RESET: `${prefix} folder roleinheritance reset`,
|
|
72
75
|
GET: `${prefix} get`,
|
|
@@ -73,8 +73,8 @@ class TeamsChannelAddCommand extends GraphCommand_1.default {
|
|
|
73
73
|
},
|
|
74
74
|
responseType: 'json'
|
|
75
75
|
};
|
|
76
|
-
if (args.options.type === 'private') {
|
|
77
|
-
// Private channels must have at least 1 owner
|
|
76
|
+
if (args.options.type === 'private' || args.options.type === 'shared') {
|
|
77
|
+
// Private and Shared channels must have at least 1 owner
|
|
78
78
|
requestOptions.data.members = [
|
|
79
79
|
{
|
|
80
80
|
'@odata.type': '#microsoft.graph.aadUserConversationMember',
|
|
@@ -119,7 +119,7 @@ _TeamsChannelAddCommand_instances = new WeakSet(), _TeamsChannelAddCommand_initT
|
|
|
119
119
|
option: '-d, --description [description]'
|
|
120
120
|
}, {
|
|
121
121
|
option: '--type [type]',
|
|
122
|
-
autocomplete: ['standard', 'private']
|
|
122
|
+
autocomplete: ['standard', 'private', 'shared']
|
|
123
123
|
}, {
|
|
124
124
|
option: '--owner [owner]'
|
|
125
125
|
});
|
|
@@ -128,14 +128,14 @@ _TeamsChannelAddCommand_instances = new WeakSet(), _TeamsChannelAddCommand_initT
|
|
|
128
128
|
if (args.options.teamId && !validation_1.validation.isValidGuid(args.options.teamId)) {
|
|
129
129
|
return `${args.options.teamId} is not a valid GUID`;
|
|
130
130
|
}
|
|
131
|
-
if (args.options.type && ['standard', 'private'].indexOf(args.options.type) === -1) {
|
|
132
|
-
return `${args.options.type} is not a valid type value. Allowed values standard|private.`;
|
|
131
|
+
if (args.options.type && ['standard', 'private', 'shared'].indexOf(args.options.type) === -1) {
|
|
132
|
+
return `${args.options.type} is not a valid type value. Allowed values standard|private|shared.`;
|
|
133
133
|
}
|
|
134
|
-
if (args.options.type === 'private' && !args.options.owner) {
|
|
135
|
-
return
|
|
134
|
+
if ((args.options.type === 'private' || args.options.type === 'shared') && !args.options.owner) {
|
|
135
|
+
return `Specify owner when creating a ${args.options.type} channel.`;
|
|
136
136
|
}
|
|
137
|
-
if (args.options.type !== 'private' && args.options.owner) {
|
|
138
|
-
return
|
|
137
|
+
if ((args.options.type !== 'private' && args.options.type !== 'shared') && args.options.owner) {
|
|
138
|
+
return `Specify owner only when creating a private or shared channel.`;
|
|
139
139
|
}
|
|
140
140
|
return true;
|
|
141
141
|
}));
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# pp card list
|
|
2
|
+
|
|
3
|
+
Lists Microsoft Power Platform cards in the specified Power Platform environment.
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
```sh
|
|
8
|
+
pp card list [options]
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Options
|
|
12
|
+
|
|
13
|
+
`-e, --environment <environment>`
|
|
14
|
+
: The name of the environment.
|
|
15
|
+
|
|
16
|
+
`-a, --asAdmin`
|
|
17
|
+
: Run the command as admin for environments you do not have explicitly assigned permissions to.
|
|
18
|
+
|
|
19
|
+
--8<-- "docs/cmd/_global.md"
|
|
20
|
+
|
|
21
|
+
## Examples
|
|
22
|
+
|
|
23
|
+
List cards in a specific environment.
|
|
24
|
+
|
|
25
|
+
```sh
|
|
26
|
+
m365 pp card list --environment "Default-d87a7535-dd31-4437-bfe1-95340acd55c5"
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
List cards in a specific environment as admin.
|
|
30
|
+
|
|
31
|
+
```sh
|
|
32
|
+
m365 pp card list --environment "Default-d87a7535-dd31-4437-bfe1-95340acd55c5" --asAdmin
|
|
33
|
+
```
|
|
@@ -11,10 +11,10 @@ pp dataverse table list [options]
|
|
|
11
11
|
## Options
|
|
12
12
|
|
|
13
13
|
`-e, --environment <environment>`
|
|
14
|
-
The name of the environment to list all tables for
|
|
14
|
+
: The name of the environment to list all tables for
|
|
15
15
|
|
|
16
16
|
`-a, --asAdmin`
|
|
17
|
-
Set, to retrieve the dataverse tables as admin for environments you are not a member of.
|
|
17
|
+
: Set, to retrieve the dataverse tables as admin for environments you are not a member of.
|
|
18
18
|
|
|
19
19
|
--8<-- "docs/cmd/_global.md"
|
|
20
20
|
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# pp environment get
|
|
2
|
+
|
|
3
|
+
Gets information about the specified Power Platform environment
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
```sh
|
|
8
|
+
m365 pp environment get [options]
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Options
|
|
12
|
+
|
|
13
|
+
`-n, --name <name>`
|
|
14
|
+
: The name of the environment to get information about
|
|
15
|
+
|
|
16
|
+
`-a, --asAdmin`
|
|
17
|
+
: Run the command as admin and retrieve details of environments you do not have explicitly assigned permissions to
|
|
18
|
+
|
|
19
|
+
## Remarks
|
|
20
|
+
|
|
21
|
+
!!! attention
|
|
22
|
+
This command is based on an API that is currently in preview and is subject to change once the API reached general availability.
|
|
23
|
+
Register CLI for Microsoft 365 or Azure AD application as a management application for the Power Platform using
|
|
24
|
+
m365 pp managementapp add [options]
|
|
25
|
+
|
|
26
|
+
## Examples
|
|
27
|
+
|
|
28
|
+
Get information about the Power Platform environment by name
|
|
29
|
+
|
|
30
|
+
```sh
|
|
31
|
+
m365 pp environment get --name Default-d87a7535-dd31-4437-bfe1-95340acd55c5
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
Get information as admin about the Power Platform environment by name
|
|
35
|
+
|
|
36
|
+
```sh
|
|
37
|
+
m365 pp environment get --name Default-d87a7535-dd31-4437-bfe1-95340acd55c5 --asAdmin
|
|
38
|
+
```
|
|
@@ -11,7 +11,7 @@ m365 pp environment list [options]
|
|
|
11
11
|
## Options
|
|
12
12
|
|
|
13
13
|
`-a, --asAdmin`
|
|
14
|
-
Run the command as admin and retrieve all environments. Lists only environments you have explicitly are assigned permissions to by default.
|
|
14
|
+
: Run the command as admin and retrieve all environments. Lists only environments you have explicitly are assigned permissions to by default.
|
|
15
15
|
|
|
16
16
|
--8<-- "docs/cmd/_global.md"
|
|
17
17
|
|
|
@@ -11,10 +11,10 @@ m365 pp solution list [options]
|
|
|
11
11
|
## Options
|
|
12
12
|
|
|
13
13
|
`-e, --environment <environment>`
|
|
14
|
-
The name of the environment
|
|
14
|
+
: The name of the environment
|
|
15
15
|
|
|
16
16
|
`-a, --asAdmin`
|
|
17
|
-
Run the command as admin for environments you do not have explicitly assigned permissions to.
|
|
17
|
+
: Run the command as admin for environments you do not have explicitly assigned permissions to.
|
|
18
18
|
|
|
19
19
|
--8<-- "docs/cmd/_global.md"
|
|
20
20
|
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
# spo eventreceiver remove
|
|
2
|
+
|
|
3
|
+
Removes event receivers for the specified web, site, or list.
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
```sh
|
|
8
|
+
m365 spo eventreceiver remove [options]
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Options
|
|
12
|
+
|
|
13
|
+
`-u, --webUrl <webUrl>`
|
|
14
|
+
: The URL of the web.
|
|
15
|
+
|
|
16
|
+
`--listTitle [listTitle]`
|
|
17
|
+
: The title of the list, _if the event receiver should be removed from a list_. Specify either `listTitle`, `listId` or `listUrl`.
|
|
18
|
+
|
|
19
|
+
`--listId [listId]`
|
|
20
|
+
: The id of the list, _if the event receiver should be retrieved from a list_. Specify either `listTitle`, `listId` or `listUrl`.
|
|
21
|
+
|
|
22
|
+
`--listUrl [listUrl]`
|
|
23
|
+
: The url of the list, _if the event receiver should be retrieved from a list_. Specify either `listTitle`, `listId` or `listUrl`.
|
|
24
|
+
|
|
25
|
+
`-n, --name [name]`
|
|
26
|
+
The name. Specify either `name` or `id` but not both.
|
|
27
|
+
|
|
28
|
+
`-i, --id [id]`
|
|
29
|
+
The id. Specify either `name` or `id` but not both.
|
|
30
|
+
|
|
31
|
+
`-s, --scope [scope]`
|
|
32
|
+
: The scope. Can be either "site" or "web". Defaults to "web". Only applicable when not specifying any of the list properties.
|
|
33
|
+
|
|
34
|
+
`--confirm`
|
|
35
|
+
: Don't prompt for confirming removing the event receiver
|
|
36
|
+
|
|
37
|
+
--8<-- "docs/cmd/_global.md"
|
|
38
|
+
|
|
39
|
+
## Examples
|
|
40
|
+
|
|
41
|
+
Remove event receiver in a specific web by name.
|
|
42
|
+
|
|
43
|
+
```sh
|
|
44
|
+
m365 spo eventreceiver remove --webUrl https://contoso.sharepoint.com/sites/contoso-sales --name 'PnP Test Receiver'
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Remove event receiver in a specific site by id.
|
|
48
|
+
|
|
49
|
+
```sh
|
|
50
|
+
m365 spo eventreceiver remove --webUrl https://contoso.sharepoint.com/sites/contoso-sales --scope site --id c5a6444a-9c7f-4a0d-9e29-fc6fe30e34ec
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
Remove event receiver in a specific list retrieved by title by name.
|
|
54
|
+
|
|
55
|
+
```sh
|
|
56
|
+
m365 spo eventreceiver remove --webUrl https://contoso.sharepoint.com/sites/contoso-sales --listTitle Events --name 'PnP Test Receiver'
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
Remove event receiver in a specific list retrieved by list id by id.
|
|
60
|
+
|
|
61
|
+
```sh
|
|
62
|
+
m365 spo eventreceiver remove --webUrl https://contoso.sharepoint.com/sites/contoso-sales --listId '202b8199-b9de-43fd-9737-7f213f51c991' --id c5a6444a-9c7f-4a0d-9e29-fc6fe30e34ec
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
Remove event receiver in a specific list retrieved by list url by name.
|
|
66
|
+
|
|
67
|
+
```sh
|
|
68
|
+
m365 spo eventreceiver remove --webUrl https://contoso.sharepoint.com/sites/contoso-sales --listUrl '/sites/contoso-sales/lists/Events' --name 'PnP Test Receiver'
|
|
69
|
+
```
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# spo file roleinheritance break
|
|
2
|
+
|
|
3
|
+
Breaks inheritance of a file. Keeping existing permissions is the default behavior.
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
```sh
|
|
8
|
+
m365 spo file roleinheritance break [options]
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Options
|
|
12
|
+
|
|
13
|
+
`-u, --webUrl <webUrl>`
|
|
14
|
+
: URL of the site where the file is located
|
|
15
|
+
|
|
16
|
+
`--fileUrl [fileUrl]`
|
|
17
|
+
: The server-relative URL of the file. Specify either `fileUrl` or `fileId` but not both
|
|
18
|
+
|
|
19
|
+
`i, --fileId [fileId]`
|
|
20
|
+
: The UniqueId (GUID) of the file. Specify either `fileUrl` or `fileId` but not both
|
|
21
|
+
|
|
22
|
+
`-c, --clearExistingPermissions`
|
|
23
|
+
: Clear all existing permissions from the file
|
|
24
|
+
|
|
25
|
+
`--confirm`
|
|
26
|
+
: Don't prompt for confirmation
|
|
27
|
+
|
|
28
|
+
--8<-- "docs/cmd/_global.md"
|
|
29
|
+
|
|
30
|
+
## Examples
|
|
31
|
+
|
|
32
|
+
Break the inheritance of a file with a specific id (UniqueId).
|
|
33
|
+
|
|
34
|
+
```sh
|
|
35
|
+
m365 spo file roleinheritance break --webUrl "https://contoso.sharepoint.com/sites/project-x" --fileId "b2307a39-e878-458b-bc90-03bc578531d6"
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
Break the inheritance of a file with a specific id (UniqueId) and clear all existing permissions.
|
|
39
|
+
|
|
40
|
+
```sh
|
|
41
|
+
m365 spo file roleinheritance break --webUrl "https://contoso.sharepoint.com/sites/project-x" --fileId "b2307a39-e878-458b-bc90-03bc578531d6" --clearExistingPermissions
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
Break the inheritance of a file with a specific server-relative URL.
|
|
45
|
+
|
|
46
|
+
```sh
|
|
47
|
+
m365 spo file roleinheritance break --webUrl "https://contoso.sharepoint.com/sites/project-x" --fileUrl "/sites/project-x/documents/Test1.docx"
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
Break the inheritance of a file with a specific server-relative URL and clear all existing permissions.
|
|
51
|
+
|
|
52
|
+
```sh
|
|
53
|
+
m365 spo file roleinheritance break --webUrl "https://contoso.sharepoint.com/sites/project-x" --fileUrl "/sites/project-x/documents/Test1.docx" --clearExistingPermissions
|
|
54
|
+
```
|