@pnp/cli-microsoft365 5.9.0-beta.c14dbbc → 5.9.0-beta.db8b86a
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 +4 -2
- package/dist/m365/outlook/commands/mail/mail-send.js +1 -1
- package/dist/m365/planner/commands/bucket/bucket-get.js +1 -1
- 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/file/file-roleinheritance-break.js +129 -0
- package/dist/m365/spo/commands/folder/folder-roleassignment-remove.js +168 -0
- 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-webhook-add.js +19 -11
- package/dist/m365/spo/commands/list/list-webhook-get.js +17 -9
- package/dist/m365/spo/commands/list/list-webhook-list.js +23 -24
- package/dist/m365/spo/commands/list/list-webhook-remove.js +19 -11
- package/dist/m365/spo/commands/list/list-webhook-set.js +18 -10
- package/dist/m365/spo/commands.js +2 -0
- package/dist/m365/teams/commands/channel/channel-add.js +9 -9
- package/dist/m365/todo/commands/task/task-set.js +53 -1
- package/docs/docs/cmd/pp/card/card-list.md +33 -0
- package/docs/docs/cmd/pp/environment/environment-get.md +38 -0
- package/docs/docs/cmd/spo/eventreceiver/eventreceiver-get.md +2 -2
- package/docs/docs/cmd/spo/eventreceiver/eventreceiver-remove.md +2 -2
- 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/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/spo/list/list-webhook-add.md +15 -16
- package/docs/docs/cmd/spo/list/list-webhook-get.md +15 -6
- package/docs/docs/cmd/spo/list/list-webhook-list.md +16 -7
- package/docs/docs/cmd/spo/list/list-webhook-remove.md +12 -10
- package/docs/docs/cmd/spo/list/list-webhook-set.md +13 -11
- package/docs/docs/cmd/teams/channel/channel-add.md +4 -4
- package/docs/docs/cmd/todo/task/task-set.md +29 -2
- package/package.json +3 -1
|
@@ -18,6 +18,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
18
18
|
const chalk = require("chalk");
|
|
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");
|
|
@@ -39,14 +40,18 @@ class SpoListWebhookSetCommand extends SpoCommand_1.default {
|
|
|
39
40
|
commandAction(logger, args) {
|
|
40
41
|
return __awaiter(this, void 0, void 0, function* () {
|
|
41
42
|
if (this.verbose) {
|
|
42
|
-
logger.logToStderr(`Updating webhook ${args.options.id} belonging to list ${args.options.listId
|
|
43
|
+
logger.logToStderr(`Updating webhook ${args.options.id} belonging to list ${args.options.listId || args.options.listTitle || args.options.listUrl} located at site ${args.options.webUrl}...`);
|
|
43
44
|
}
|
|
44
|
-
let requestUrl =
|
|
45
|
+
let requestUrl = `${args.options.webUrl}/_api/web`;
|
|
45
46
|
if (args.options.listId) {
|
|
46
|
-
requestUrl
|
|
47
|
+
requestUrl += `/lists(guid'${formatting_1.formatting.encodeQueryParameter(args.options.listId)}')/Subscriptions('${formatting_1.formatting.encodeQueryParameter(args.options.id)}')`;
|
|
47
48
|
}
|
|
48
|
-
else {
|
|
49
|
-
requestUrl
|
|
49
|
+
else if (args.options.listTitle) {
|
|
50
|
+
requestUrl += `/lists/GetByTitle('${formatting_1.formatting.encodeQueryParameter(args.options.listTitle)}')/Subscriptions('${formatting_1.formatting.encodeQueryParameter(args.options.id)}')`;
|
|
51
|
+
}
|
|
52
|
+
else if (args.options.listUrl) {
|
|
53
|
+
const listServerRelativeUrl = urlUtil_1.urlUtil.getServerRelativePath(args.options.webUrl, args.options.listUrl);
|
|
54
|
+
requestUrl += `/GetList('${formatting_1.formatting.encodeQueryParameter(listServerRelativeUrl)}')/Subscriptions('${formatting_1.formatting.encodeQueryParameter(args.options.id)}')`;
|
|
50
55
|
}
|
|
51
56
|
const requestBody = {};
|
|
52
57
|
if (args.options.notificationUrl) {
|
|
@@ -77,10 +82,11 @@ class SpoListWebhookSetCommand extends SpoCommand_1.default {
|
|
|
77
82
|
_SpoListWebhookSetCommand_instances = new WeakSet(), _SpoListWebhookSetCommand_initTelemetry = function _SpoListWebhookSetCommand_initTelemetry() {
|
|
78
83
|
this.telemetry.push((args) => {
|
|
79
84
|
Object.assign(this.telemetryProperties, {
|
|
80
|
-
listId:
|
|
81
|
-
listTitle:
|
|
82
|
-
|
|
83
|
-
|
|
85
|
+
listId: typeof args.options.listId !== 'undefined',
|
|
86
|
+
listTitle: typeof args.options.listTitle !== 'undefined',
|
|
87
|
+
listUrl: typeof args.options.listUrl !== 'undefined',
|
|
88
|
+
notificationUrl: typeof args.options.notificationUrl !== 'undefined',
|
|
89
|
+
expirationDateTime: typeof args.options.expirationDateTime !== 'undefined'
|
|
84
90
|
});
|
|
85
91
|
});
|
|
86
92
|
}, _SpoListWebhookSetCommand_initOptions = function _SpoListWebhookSetCommand_initOptions() {
|
|
@@ -90,6 +96,8 @@ _SpoListWebhookSetCommand_instances = new WeakSet(), _SpoListWebhookSetCommand_i
|
|
|
90
96
|
option: '-l, --listId [listId]'
|
|
91
97
|
}, {
|
|
92
98
|
option: '-t, --listTitle [listTitle]'
|
|
99
|
+
}, {
|
|
100
|
+
option: '--listUrl [listUrl]'
|
|
93
101
|
}, {
|
|
94
102
|
option: '-i, --id <id>'
|
|
95
103
|
}, {
|
|
@@ -125,7 +133,7 @@ _SpoListWebhookSetCommand_instances = new WeakSet(), _SpoListWebhookSetCommand_i
|
|
|
125
133
|
return true;
|
|
126
134
|
}));
|
|
127
135
|
}, _SpoListWebhookSetCommand_initOptionSets = function _SpoListWebhookSetCommand_initOptionSets() {
|
|
128
|
-
this.optionSets.push(['listId', 'listTitle']);
|
|
136
|
+
this.optionSets.push(['listId', 'listTitle', 'listUrl']);
|
|
129
137
|
};
|
|
130
138
|
module.exports = new SpoListWebhookSetCommand();
|
|
131
139
|
//# sourceMappingURL=list-webhook-set.js.map
|
|
@@ -59,6 +59,7 @@ exports.default = {
|
|
|
59
59
|
FILE_RENAME: `${prefix} file rename`,
|
|
60
60
|
FILE_ROLEASSIGNMENT_ADD: `${prefix} file roleassignment add`,
|
|
61
61
|
FILE_ROLEASSIGNMENT_REMOVE: `${prefix} file roleassignment remove`,
|
|
62
|
+
FILE_ROLEINHERITANCE_BREAK: `${prefix} file roleinheritance break`,
|
|
62
63
|
FILE_ROLEINHERITANCE_RESET: `${prefix} file roleinheritance reset`,
|
|
63
64
|
FILE_SHARINGINFO_GET: `${prefix} file sharinginfo get`,
|
|
64
65
|
FOLDER_ADD: `${prefix} folder add`,
|
|
@@ -68,6 +69,7 @@ exports.default = {
|
|
|
68
69
|
FOLDER_MOVE: `${prefix} folder move`,
|
|
69
70
|
FOLDER_REMOVE: `${prefix} folder remove`,
|
|
70
71
|
FOLDER_RENAME: `${prefix} folder rename`,
|
|
72
|
+
FOLDER_ROLEASSIGNMENT_REMOVE: `${prefix} folder roleassignment remove`,
|
|
71
73
|
FOLDER_ROLEINHERITANCE_BREAK: `${prefix} folder roleinheritance break`,
|
|
72
74
|
FOLDER_ROLEINHERITANCE_RESET: `${prefix} folder roleinheritance reset`,
|
|
73
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
|
}));
|
|
@@ -16,6 +16,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
16
16
|
var _TodoTaskSetCommand_instances, _TodoTaskSetCommand_initTelemetry, _TodoTaskSetCommand_initOptions, _TodoTaskSetCommand_initValidators, _TodoTaskSetCommand_initOptionSets;
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
18
|
const request_1 = require("../../../../request");
|
|
19
|
+
const validation_1 = require("../../../../utils/validation");
|
|
19
20
|
const GraphCommand_1 = require("../../../base/GraphCommand");
|
|
20
21
|
const commands_1 = require("../../commands");
|
|
21
22
|
class TodoTaskSetCommand extends GraphCommand_1.default {
|
|
@@ -76,7 +77,14 @@ class TodoTaskSetCommand extends GraphCommand_1.default {
|
|
|
76
77
|
return Promise.resolve(taskList.id);
|
|
77
78
|
});
|
|
78
79
|
}
|
|
80
|
+
getDateTimeTimeZone(dateTime) {
|
|
81
|
+
return {
|
|
82
|
+
dateTime: dateTime,
|
|
83
|
+
timeZone: 'Etc/GMT'
|
|
84
|
+
};
|
|
85
|
+
}
|
|
79
86
|
mapRequestBody(options) {
|
|
87
|
+
var _a;
|
|
80
88
|
const requestBody = {};
|
|
81
89
|
if (options.status) {
|
|
82
90
|
requestBody.status = options.status;
|
|
@@ -84,6 +92,21 @@ class TodoTaskSetCommand extends GraphCommand_1.default {
|
|
|
84
92
|
if (options.title) {
|
|
85
93
|
requestBody.title = options.title;
|
|
86
94
|
}
|
|
95
|
+
if (options.importance) {
|
|
96
|
+
requestBody.importance = options.importance.toLowerCase();
|
|
97
|
+
}
|
|
98
|
+
if (options.bodyContentType || options.bodyContent) {
|
|
99
|
+
requestBody.body = {
|
|
100
|
+
content: options.bodyContent,
|
|
101
|
+
contentType: ((_a = options.bodyContentType) === null || _a === void 0 ? void 0 : _a.toLowerCase()) || 'text'
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
if (options.dueDateTime) {
|
|
105
|
+
requestBody.dueDateTime = this.getDateTimeTimeZone(options.dueDateTime);
|
|
106
|
+
}
|
|
107
|
+
if (options.reminderDateTime) {
|
|
108
|
+
requestBody.reminderDateTime = this.getDateTimeTimeZone(options.reminderDateTime);
|
|
109
|
+
}
|
|
87
110
|
return requestBody;
|
|
88
111
|
}
|
|
89
112
|
}
|
|
@@ -93,7 +116,12 @@ _TodoTaskSetCommand_instances = new WeakSet(), _TodoTaskSetCommand_initTelemetry
|
|
|
93
116
|
listId: typeof args.options.listId !== 'undefined',
|
|
94
117
|
listName: typeof args.options.listName !== 'undefined',
|
|
95
118
|
status: typeof args.options.status !== 'undefined',
|
|
96
|
-
title: typeof args.options.title !== 'undefined'
|
|
119
|
+
title: typeof args.options.title !== 'undefined',
|
|
120
|
+
bodyContent: typeof args.options.bodyContent !== 'undefined',
|
|
121
|
+
bodyContentType: args.options.bodyContentType,
|
|
122
|
+
dueDateTime: typeof args.options.dueDateTime !== 'undefined',
|
|
123
|
+
importance: args.options.importance,
|
|
124
|
+
reminderDateTime: typeof args.options.reminderDateTime !== 'undefined'
|
|
97
125
|
});
|
|
98
126
|
});
|
|
99
127
|
}, _TodoTaskSetCommand_initOptions = function _TodoTaskSetCommand_initOptions() {
|
|
@@ -108,6 +136,18 @@ _TodoTaskSetCommand_instances = new WeakSet(), _TodoTaskSetCommand_initTelemetry
|
|
|
108
136
|
option: '--listName [listName]'
|
|
109
137
|
}, {
|
|
110
138
|
option: '--listId [listId]'
|
|
139
|
+
}, {
|
|
140
|
+
option: '--bodyContent [bodyContent]'
|
|
141
|
+
}, {
|
|
142
|
+
option: '--bodyContentType [bodyContentType]',
|
|
143
|
+
autocomplete: ['text', 'html']
|
|
144
|
+
}, {
|
|
145
|
+
option: '--dueDateTime [dueDateTime]'
|
|
146
|
+
}, {
|
|
147
|
+
option: '--importance [importance]',
|
|
148
|
+
autocomplete: ['low', 'normal', 'high']
|
|
149
|
+
}, {
|
|
150
|
+
option: '--reminderDateTime [reminderDateTime]'
|
|
111
151
|
});
|
|
112
152
|
}, _TodoTaskSetCommand_initValidators = function _TodoTaskSetCommand_initValidators() {
|
|
113
153
|
this.validators.push((args) => __awaiter(this, void 0, void 0, function* () {
|
|
@@ -119,6 +159,18 @@ _TodoTaskSetCommand_instances = new WeakSet(), _TodoTaskSetCommand_initTelemetry
|
|
|
119
159
|
args.options.status !== 'deferred') {
|
|
120
160
|
return `${args.options.status} is not a valid value. Allowed values are notStarted|inProgress|completed|waitingOnOthers|deferred`;
|
|
121
161
|
}
|
|
162
|
+
if (args.options.bodyContentType && ['text', 'html'].indexOf(args.options.bodyContentType.toLowerCase()) === -1) {
|
|
163
|
+
return `'${args.options.bodyContentType}' is not a valid value for the bodyContentType option. Allowed values are text|html`;
|
|
164
|
+
}
|
|
165
|
+
if (args.options.importance && ['low', 'normal', 'high'].indexOf(args.options.importance.toLowerCase()) === -1) {
|
|
166
|
+
return `'${args.options.importance}' is not a valid value for the importance option. Allowed values are low|normal|high`;
|
|
167
|
+
}
|
|
168
|
+
if (args.options.dueDateTime && !validation_1.validation.isValidISODateTime(args.options.dueDateTime)) {
|
|
169
|
+
return `'${args.options.dueDateTime}' is not a valid ISO date string`;
|
|
170
|
+
}
|
|
171
|
+
if (args.options.reminderDateTime && !validation_1.validation.isValidISODateTime(args.options.reminderDateTime)) {
|
|
172
|
+
return `'${args.options.reminderDateTime}' is not a valid ISO date string`;
|
|
173
|
+
}
|
|
122
174
|
return true;
|
|
123
175
|
}));
|
|
124
176
|
}, _TodoTaskSetCommand_initOptionSets = function _TodoTaskSetCommand_initOptionSets() {
|
|
@@ -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
|
+
```
|
|
@@ -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
|
+
```
|
|
@@ -26,10 +26,10 @@ Specify either `listTitle`, `listId` or `listUrl`.
|
|
|
26
26
|
Specify either `listTitle`, `listId` or `listUrl`.
|
|
27
27
|
|
|
28
28
|
`-n, --name [name]`
|
|
29
|
-
The name of the event receiver to retrieve. Specify either `name` or `id` but not both.
|
|
29
|
+
: The name of the event receiver to retrieve. Specify either `name` or `id` but not both.
|
|
30
30
|
|
|
31
31
|
`-i, --id [id]`
|
|
32
|
-
The id of the event receiver to retrieve. Specify either `name` or `id` but not both.
|
|
32
|
+
: The id of the event receiver to retrieve. Specify either `name` or `id` but not both.
|
|
33
33
|
|
|
34
34
|
`-s, --scope [scope]`
|
|
35
35
|
: The scope of which to retrieve the Event Receivers.
|
|
@@ -23,10 +23,10 @@ m365 spo eventreceiver remove [options]
|
|
|
23
23
|
: The url of the list, _if the event receiver should be retrieved from a list_. Specify either `listTitle`, `listId` or `listUrl`.
|
|
24
24
|
|
|
25
25
|
`-n, --name [name]`
|
|
26
|
-
The name. Specify either `name` or `id` but not both.
|
|
26
|
+
: The name. Specify either `name` or `id` but not both.
|
|
27
27
|
|
|
28
28
|
`-i, --id [id]`
|
|
29
|
-
The id. Specify either `name` or `id` but not both.
|
|
29
|
+
: The id. Specify either `name` or `id` but not both.
|
|
30
30
|
|
|
31
31
|
`-s, --scope [scope]`
|
|
32
32
|
: The scope. Can be either "site" or "web". Defaults to "web". Only applicable when not specifying any of the list properties.
|
|
@@ -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
|
+
```
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# spo folder roleassignment remove
|
|
2
|
+
|
|
3
|
+
Removes a role assignment from the specified folder.
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
```sh
|
|
8
|
+
m365 spo folder roleassignment remove [options]
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Options
|
|
12
|
+
|
|
13
|
+
`-u, --webUrl <webUrl>`
|
|
14
|
+
: The URL of the site where the folder is located.
|
|
15
|
+
|
|
16
|
+
`-f, --folderUrl <folderUrl>`
|
|
17
|
+
: The server- or site-relative URL of the folder.
|
|
18
|
+
|
|
19
|
+
`--principalId [principalId]`
|
|
20
|
+
: The SharePoint principal id. It may be either an user id or group id for which the role assignment will be removed. Specify either upn, groupName or principalId but not multiple.
|
|
21
|
+
|
|
22
|
+
`--upn [upn]`
|
|
23
|
+
: The upn/email of the user. Specify either upn, groupName or principalId but not multiple.
|
|
24
|
+
|
|
25
|
+
`--groupName [groupName]`
|
|
26
|
+
: The Azure AD or SharePoint group name. Specify either upn, groupName or principalId but not multiple.
|
|
27
|
+
|
|
28
|
+
`--confirm`
|
|
29
|
+
: Don't prompt for confirmation when removing the role assignment.
|
|
30
|
+
|
|
31
|
+
--8<-- "docs/cmd/_global.md"
|
|
32
|
+
|
|
33
|
+
## Examples
|
|
34
|
+
|
|
35
|
+
Remove roleassignment from folder based on group name
|
|
36
|
+
|
|
37
|
+
```sh
|
|
38
|
+
m365 spo folder roleassignment remove --webUrl "https://contoso.sharepoint.com/sites/contoso-sales" --folderUrl "/Shared Documents/FolderPermission" --groupName "saleGroup"
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
Remove the role assignment from the specified folder based on the principal id.
|
|
42
|
+
|
|
43
|
+
```sh
|
|
44
|
+
m365 spo folder roleassignment remove --webUrl "https://contoso.sharepoint.com/sites/contoso-sales" --folderUrl "/Shared Documents/FolderPermission" --principalId 2
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Remove the role assignment from the specified folder based on the principal id without prompting for removal confirmation.
|
|
48
|
+
|
|
49
|
+
```sh
|
|
50
|
+
m365 spo folder roleassignment remove --webUrl "https://contoso.sharepoint.com/sites/contoso-sales" --folderUrl "/Shared Documents/FolderPermission" --principalId 2 --confirm
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
Remove the role assignment from the specified folder based on the upn.
|
|
54
|
+
|
|
55
|
+
```sh
|
|
56
|
+
m365 spo folder roleassignment remove --webUrl "https://contoso.sharepoint.com/sites/contoso-sales" --folderUrl "/Shared Documents/FolderPermission" --upn "test@contoso.onmicrosoft.com"
|
|
57
|
+
```
|
|
@@ -11,29 +11,38 @@ m365 spo list contenttype add [options]
|
|
|
11
11
|
## Options
|
|
12
12
|
|
|
13
13
|
`-u, --webUrl <webUrl>`
|
|
14
|
-
: URL of the site where the list is located
|
|
14
|
+
: URL of the site where the list is located.
|
|
15
15
|
|
|
16
|
-
`-
|
|
17
|
-
: ID of the list
|
|
16
|
+
`-i, --listId [listId]`
|
|
17
|
+
: ID of the list. Specify either `listTitle`, `listId` or `listUrl`.
|
|
18
18
|
|
|
19
19
|
`-t, --listTitle [listTitle]`
|
|
20
|
-
: Title of the list
|
|
20
|
+
: Title of the list. Specify either `listTitle`, `listId` or `listUrl`.
|
|
21
|
+
|
|
22
|
+
`--listUrl [listUrl]`
|
|
23
|
+
: Server- or site-relative URL of the list. Specify either `listTitle`, `listId` or `listUrl`.
|
|
21
24
|
|
|
22
25
|
`-c, --contentTypeId <contentTypeId>`
|
|
23
|
-
: ID of the content type
|
|
26
|
+
: ID of the content type
|
|
24
27
|
|
|
25
28
|
--8<-- "docs/cmd/_global.md"
|
|
26
29
|
|
|
27
30
|
## Examples
|
|
28
31
|
|
|
29
|
-
|
|
32
|
+
Adds a specific existing content type to a list retrieved by id in a specific site.
|
|
30
33
|
|
|
31
34
|
```sh
|
|
32
35
|
m365 spo list contenttype add --webUrl https://contoso.sharepoint.com/sites/project-x --listId 0cd891ef-afce-4e55-b836-fce03286cccf --contentTypeId 0x0120
|
|
33
36
|
```
|
|
34
37
|
|
|
35
|
-
|
|
38
|
+
Adds a specific existing content type to a list retrieved by title in a specific site.
|
|
36
39
|
|
|
37
40
|
```sh
|
|
38
41
|
m365 spo list contenttype add --webUrl https://contoso.sharepoint.com/sites/project-x --listTitle Documents --contentTypeId 0x0120
|
|
39
42
|
```
|
|
43
|
+
|
|
44
|
+
Adds a specific existing content type to a list retrieved by server relative URL in a specific site.
|
|
45
|
+
|
|
46
|
+
```sh
|
|
47
|
+
m365 spo list contenttype add --webUrl https://contoso.sharepoint.com/sites/project-x --listUrl 'sites/project-x/Documents' --contentTypeId 0x0120
|
|
48
|
+
```
|
|
@@ -11,29 +11,38 @@ m365 spo list contenttype default set [options]
|
|
|
11
11
|
## Options
|
|
12
12
|
|
|
13
13
|
`-u, --webUrl <webUrl>`
|
|
14
|
-
: URL of the site where the list is located
|
|
14
|
+
: URL of the site where the list is located.
|
|
15
15
|
|
|
16
|
-
`-
|
|
17
|
-
: ID of the list
|
|
16
|
+
`-i, --listId [listId]`
|
|
17
|
+
: ID of the list. Specify either `listTitle`, `listId` or `listUrl`.
|
|
18
18
|
|
|
19
19
|
`-t, --listTitle [listTitle]`
|
|
20
|
-
: Title of the list
|
|
20
|
+
: Title of the list. Specify either `listTitle`, `listId` or `listUrl`.
|
|
21
|
+
|
|
22
|
+
`--listUrl [listUrl]`
|
|
23
|
+
: Server- or site-relative URL of the list. Specify either `listTitle`, `listId` or `listUrl`.
|
|
21
24
|
|
|
22
25
|
`-c, --contentTypeId <contentTypeId>`
|
|
23
|
-
: ID of the content type
|
|
26
|
+
: ID of the content type
|
|
24
27
|
|
|
25
28
|
--8<-- "docs/cmd/_global.md"
|
|
26
29
|
|
|
27
30
|
## Examples
|
|
28
31
|
|
|
29
|
-
Set content type with
|
|
32
|
+
Set a content type with a specific id as default a list retrieved by id located in a specific site.
|
|
30
33
|
|
|
31
34
|
```sh
|
|
32
35
|
m365 spo list contenttype default set --webUrl https://contoso.sharepoint.com/sites/project-x --listId 0cd891ef-afce-4e55-b836-fce03286cccf --contentTypeId 0x0120
|
|
33
36
|
```
|
|
34
37
|
|
|
35
|
-
Set content type with
|
|
38
|
+
Set a content type with a specific id as default a list retrieved by title located in a specific site.
|
|
36
39
|
|
|
37
40
|
```sh
|
|
38
41
|
m365 spo list contenttype default set --webUrl https://contoso.sharepoint.com/sites/project-x --listTitle Documents --contentTypeId 0x0120
|
|
39
42
|
```
|
|
43
|
+
|
|
44
|
+
Set a content type with a specific id as default a list retrieved by server relative URL located in a specific site.
|
|
45
|
+
|
|
46
|
+
```sh
|
|
47
|
+
m365 spo list contenttype default set --webUrl https://contoso.sharepoint.com/sites/project-x --listUrl 'sites/project-x/Documents' --contentTypeId 0x0120
|
|
48
|
+
```
|
|
@@ -11,26 +11,35 @@ m365 spo list contenttype list [options]
|
|
|
11
11
|
## Options
|
|
12
12
|
|
|
13
13
|
`-u, --webUrl <webUrl>`
|
|
14
|
-
: URL of the site where the list is located
|
|
14
|
+
: URL of the site where the list is located.
|
|
15
15
|
|
|
16
|
-
`-
|
|
17
|
-
: ID of the list
|
|
16
|
+
`-i, --listId [listId]`
|
|
17
|
+
: ID of the list. Specify either `listTitle`, `listId` or `listUrl`.
|
|
18
18
|
|
|
19
19
|
`-t, --listTitle [listTitle]`
|
|
20
|
-
: Title of the list
|
|
20
|
+
: Title of the list. Specify either `listTitle`, `listId` or `listUrl`.
|
|
21
|
+
|
|
22
|
+
`--listUrl [listUrl]`
|
|
23
|
+
: Server- or site-relative URL of the list. Specify either `listTitle`, `listId` or `listUrl`.
|
|
21
24
|
|
|
22
25
|
--8<-- "docs/cmd/_global.md"
|
|
23
26
|
|
|
24
27
|
## Examples
|
|
25
28
|
|
|
26
|
-
List all content types configured on
|
|
29
|
+
List all content types configured on a specific list retrieved by id in a specific site.
|
|
27
30
|
|
|
28
31
|
```sh
|
|
29
32
|
m365 spo list contenttype list --webUrl https://contoso.sharepoint.com/sites/project-x --listId 0cd891ef-afce-4e55-b836-fce03286cccf
|
|
30
33
|
```
|
|
31
34
|
|
|
32
|
-
List all content types configured on
|
|
35
|
+
List all content types configured on a specific list retrieved by title in a specific site.
|
|
33
36
|
|
|
34
37
|
```sh
|
|
35
38
|
m365 spo list contenttype list --webUrl https://contoso.sharepoint.com/sites/project-x --listTitle Documents
|
|
36
39
|
```
|
|
40
|
+
|
|
41
|
+
List all content types configured on a specific list retrieved by server relative URL in a specific site.
|
|
42
|
+
|
|
43
|
+
```sh
|
|
44
|
+
m365 spo list contenttype list --webUrl https://contoso.sharepoint.com/sites/project-x --listUrl 'sites/project-x/Documents'
|
|
45
|
+
```
|
|
@@ -11,32 +11,41 @@ m365 spo list contenttype remove [options]
|
|
|
11
11
|
## Options
|
|
12
12
|
|
|
13
13
|
`-u, --webUrl <webUrl>`
|
|
14
|
-
: URL of the site where the list is located
|
|
14
|
+
: URL of the site where the list is located.
|
|
15
15
|
|
|
16
|
-
`-
|
|
17
|
-
: ID of the list
|
|
16
|
+
`-i, --listId [listId]`
|
|
17
|
+
: ID of the list. Specify either `listTitle`, `listId` or `listUrl`.
|
|
18
18
|
|
|
19
19
|
`-t, --listTitle [listTitle]`
|
|
20
|
-
: Title of the list
|
|
20
|
+
: Title of the list. Specify either `listTitle`, `listId` or `listUrl`.
|
|
21
|
+
|
|
22
|
+
`--listUrl [listUrl]`
|
|
23
|
+
: Server- or site-relative URL of the list. Specify either `listTitle`, `listId` or `listUrl`.
|
|
21
24
|
|
|
22
25
|
`-c, --contentTypeId <contentTypeId>`
|
|
23
|
-
: ID of the content type
|
|
26
|
+
: ID of the content type
|
|
24
27
|
|
|
25
28
|
`--confirm`
|
|
26
|
-
: Don't prompt for
|
|
29
|
+
: Don't prompt for confirmation
|
|
27
30
|
|
|
28
31
|
--8<-- "docs/cmd/_global.md"
|
|
29
32
|
|
|
30
33
|
## Examples
|
|
31
34
|
|
|
32
|
-
Remove content type with
|
|
35
|
+
Remove content type with a specific id from the list retrieved by id in a specific site.
|
|
33
36
|
|
|
34
37
|
```sh
|
|
35
38
|
m365 spo list contenttype remove --webUrl https://contoso.sharepoint.com/sites/project-x --listId 0cd891ef-afce-4e55-b836-fce03286cccf --contentTypeId 0x010109010053EE7AEB1FC54A41B4D9F66ADBDC312A
|
|
36
39
|
```
|
|
37
40
|
|
|
38
|
-
Remove content type with
|
|
41
|
+
Remove content type with a specific id from the list retrieved by title in a specific site.
|
|
39
42
|
|
|
40
43
|
```sh
|
|
41
44
|
m365 spo list contenttype remove --webUrl https://contoso.sharepoint.com/sites/project-x --listTitle Documents --contentTypeId 0x010109010053EE7AEB1FC54A41B4D9F66ADBDC312A
|
|
42
45
|
```
|
|
46
|
+
|
|
47
|
+
Remove content type with a specific id from the list retrieved by server relative URL in a specific site. This will not prompt for confirmation.
|
|
48
|
+
|
|
49
|
+
```sh
|
|
50
|
+
m365 spo list contenttype remove --webUrl https://contoso.sharepoint.com/sites/project-x --listUrl 'sites/project-x/Documents' --contentTypeId 0x010109010053EE7AEB1FC54A41B4D9F66ADBDC312A --confirm
|
|
51
|
+
```
|