@pnp/cli-microsoft365 6.0.0-beta.27b9708 → 6.0.0-beta.2979870
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/m365/aad/commands/app/app-add.js +4 -4
- package/dist/m365/aad/commands/o365group/o365group-recyclebinitem-restore.js +0 -3
- package/dist/m365/aad/commands.js +0 -1
- package/dist/m365/graph/Changelog.js +3 -0
- package/dist/m365/graph/commands/changelog/changelog-list.js +160 -0
- package/dist/m365/graph/commands.js +1 -0
- package/dist/m365/outlook/commands/mail/mail-send.js +22 -6
- package/dist/m365/outlook/commands.js +1 -2
- package/dist/m365/pp/commands/environment/environment-list.js +1 -1
- package/dist/m365/spo/commands/field/field-set.js +2 -9
- package/dist/m365/spo/commands/list/list-roleinheritance-break.js +46 -21
- package/dist/m365/spo/commands/list/list-roleinheritance-reset.js +42 -17
- package/dist/m365/spo/commands/listitem/listitem-roleinheritance-break.js +46 -21
- package/dist/m365/spo/commands/listitem/listitem-roleinheritance-reset.js +45 -17
- package/dist/m365/spo/commands/web/web-roleinheritance-reset.js +43 -13
- package/dist/m365/teams/commands/channel/channel-member-add.js +0 -4
- package/dist/m365/teams/commands/channel/channel-member-list.js +0 -4
- package/dist/m365/teams/commands/channel/channel-member-remove.js +0 -4
- package/dist/m365/teams/commands.js +0 -3
- package/dist/utils/fsUtil.js +2 -4
- package/dist/utils/md.js +1 -1
- package/docs/docs/cmd/aad/o365group/o365group-recyclebinitem-restore.md +1 -7
- package/docs/docs/cmd/graph/changelog/changelog-list.md +53 -0
- package/docs/docs/cmd/outlook/mail/mail-send.md +45 -8
- package/docs/docs/cmd/pp/environment/environment-list.md +1 -1
- package/docs/docs/cmd/spo/field/field-set.md +0 -3
- package/docs/docs/cmd/spo/list/list-roleassignment-add.md +2 -2
- package/docs/docs/cmd/spo/list/list-roleassignment-remove.md +2 -2
- package/docs/docs/cmd/spo/list/list-roleinheritance-break.md +9 -0
- package/docs/docs/cmd/spo/list/list-roleinheritance-reset.md +9 -0
- package/docs/docs/cmd/spo/listitem/listitem-roleassignment-remove.md +2 -2
- package/docs/docs/cmd/spo/listitem/listitem-roleinheritance-break.md +9 -0
- package/docs/docs/cmd/spo/listitem/listitem-roleinheritance-reset.md +9 -0
- package/docs/docs/cmd/spo/site/site-add.md +2 -2
- package/docs/docs/cmd/spo/site/site-groupify.md +0 -6
- package/docs/docs/cmd/spo/web/web-roleassignment-add.md +2 -2
- package/docs/docs/cmd/spo/web/web-roleinheritance-reset.md +9 -0
- package/docs/docs/cmd/teams/channel/channel-member-add.md +0 -6
- package/docs/docs/cmd/teams/channel/channel-member-list.md +0 -6
- package/docs/docs/cmd/teams/channel/channel-member-remove.md +0 -6
- package/package.json +1 -1
|
@@ -15,6 +15,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
15
15
|
};
|
|
16
16
|
var _SpoListItemRoleInheritanceResetCommand_instances, _SpoListItemRoleInheritanceResetCommand_initTelemetry, _SpoListItemRoleInheritanceResetCommand_initOptions, _SpoListItemRoleInheritanceResetCommand_initValidators, _SpoListItemRoleInheritanceResetCommand_initOptionSets;
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
const cli_1 = require("../../../../cli");
|
|
18
19
|
const request_1 = require("../../../../request");
|
|
19
20
|
const utils_1 = require("../../../../utils");
|
|
20
21
|
const SpoCommand_1 = require("../../../base/SpoCommand");
|
|
@@ -35,32 +36,57 @@ class SpoListItemRoleInheritanceResetCommand extends SpoCommand_1.default {
|
|
|
35
36
|
return 'Restores the role inheritance of list item, file, or folder';
|
|
36
37
|
}
|
|
37
38
|
commandAction(logger, args, cb) {
|
|
38
|
-
|
|
39
|
-
if (
|
|
40
|
-
|
|
39
|
+
var _a;
|
|
40
|
+
if (this.verbose) {
|
|
41
|
+
logger.logToStderr(`Restore role inheritance of list item in site at ${args.options.webUrl}...`);
|
|
42
|
+
}
|
|
43
|
+
const resetListItemRoleInheritance = () => {
|
|
44
|
+
let requestUrl = `${args.options.webUrl}/_api/web/lists`;
|
|
45
|
+
if (args.options.listId) {
|
|
46
|
+
requestUrl += `(guid'${utils_1.formatting.encodeQueryParameter(args.options.listId)}')`;
|
|
47
|
+
}
|
|
48
|
+
else {
|
|
49
|
+
requestUrl += `/getbytitle('${utils_1.formatting.encodeQueryParameter(args.options.listTitle)}')`;
|
|
50
|
+
}
|
|
51
|
+
const requestOptions = {
|
|
52
|
+
url: `${requestUrl}/items(${args.options.listItemId})/resetroleinheritance`,
|
|
53
|
+
method: 'POST',
|
|
54
|
+
headers: {
|
|
55
|
+
'accept': 'application/json;odata=nometadata',
|
|
56
|
+
'content-type': 'application/json'
|
|
57
|
+
},
|
|
58
|
+
responseType: 'json'
|
|
59
|
+
};
|
|
60
|
+
request_1.default
|
|
61
|
+
.post(requestOptions)
|
|
62
|
+
.then(_ => cb(), (err) => this.handleRejectedODataJsonPromise(err, logger, cb));
|
|
63
|
+
};
|
|
64
|
+
if (args.options.confirm) {
|
|
65
|
+
resetListItemRoleInheritance();
|
|
41
66
|
}
|
|
42
67
|
else {
|
|
43
|
-
|
|
68
|
+
cli_1.Cli.prompt({
|
|
69
|
+
type: 'confirm',
|
|
70
|
+
name: 'continue',
|
|
71
|
+
default: false,
|
|
72
|
+
message: `Are you sure you want to reset the role inheritance of ${args.options.listItemId} in list ${(_a = args.options.listId) !== null && _a !== void 0 ? _a : args.options.listTitle}?`
|
|
73
|
+
}, (result) => {
|
|
74
|
+
if (!result.continue) {
|
|
75
|
+
cb();
|
|
76
|
+
}
|
|
77
|
+
else {
|
|
78
|
+
resetListItemRoleInheritance();
|
|
79
|
+
}
|
|
80
|
+
});
|
|
44
81
|
}
|
|
45
|
-
const requestOptions = {
|
|
46
|
-
url: `${requestUrl}/items(${args.options.listItemId})/resetroleinheritance`,
|
|
47
|
-
method: 'POST',
|
|
48
|
-
headers: {
|
|
49
|
-
'accept': 'application/json;odata=nometadata',
|
|
50
|
-
'content-type': 'application/json'
|
|
51
|
-
},
|
|
52
|
-
responseType: 'json'
|
|
53
|
-
};
|
|
54
|
-
request_1.default
|
|
55
|
-
.post(requestOptions)
|
|
56
|
-
.then(_ => cb(), (err) => this.handleRejectedODataJsonPromise(err, logger, cb));
|
|
57
82
|
}
|
|
58
83
|
}
|
|
59
84
|
_SpoListItemRoleInheritanceResetCommand_instances = new WeakSet(), _SpoListItemRoleInheritanceResetCommand_initTelemetry = function _SpoListItemRoleInheritanceResetCommand_initTelemetry() {
|
|
60
85
|
this.telemetry.push((args) => {
|
|
61
86
|
Object.assign(this.telemetryProperties, {
|
|
62
87
|
listId: typeof args.options.listId !== 'undefined',
|
|
63
|
-
listTitle: typeof args.options.listTitle !== 'undefined'
|
|
88
|
+
listTitle: typeof args.options.listTitle !== 'undefined',
|
|
89
|
+
confirm: (!(!args.options.confirm)).toString()
|
|
64
90
|
});
|
|
65
91
|
});
|
|
66
92
|
}, _SpoListItemRoleInheritanceResetCommand_initOptions = function _SpoListItemRoleInheritanceResetCommand_initOptions() {
|
|
@@ -72,6 +98,8 @@ _SpoListItemRoleInheritanceResetCommand_instances = new WeakSet(), _SpoListItemR
|
|
|
72
98
|
option: '--listId [listId]'
|
|
73
99
|
}, {
|
|
74
100
|
option: '--listTitle [listTitle]'
|
|
101
|
+
}, {
|
|
102
|
+
option: '--confirm'
|
|
75
103
|
});
|
|
76
104
|
}, _SpoListItemRoleInheritanceResetCommand_initValidators = function _SpoListItemRoleInheritanceResetCommand_initValidators() {
|
|
77
105
|
this.validators.push((args) => __awaiter(this, void 0, void 0, function* () {
|
|
@@ -13,8 +13,9 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
13
13
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
14
14
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
15
15
|
};
|
|
16
|
-
var _SpoWebRoleInheritanceResetCommand_instances, _SpoWebRoleInheritanceResetCommand_initOptions, _SpoWebRoleInheritanceResetCommand_initValidators;
|
|
16
|
+
var _SpoWebRoleInheritanceResetCommand_instances, _SpoWebRoleInheritanceResetCommand_initTelemetry, _SpoWebRoleInheritanceResetCommand_initOptions, _SpoWebRoleInheritanceResetCommand_initValidators;
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
const cli_1 = require("../../../../cli");
|
|
18
19
|
const request_1 = require("../../../../request");
|
|
19
20
|
const utils_1 = require("../../../../utils");
|
|
20
21
|
const SpoCommand_1 = require("../../../base/SpoCommand");
|
|
@@ -23,6 +24,7 @@ class SpoWebRoleInheritanceResetCommand extends SpoCommand_1.default {
|
|
|
23
24
|
constructor() {
|
|
24
25
|
super();
|
|
25
26
|
_SpoWebRoleInheritanceResetCommand_instances.add(this);
|
|
27
|
+
__classPrivateFieldGet(this, _SpoWebRoleInheritanceResetCommand_instances, "m", _SpoWebRoleInheritanceResetCommand_initTelemetry).call(this);
|
|
26
28
|
__classPrivateFieldGet(this, _SpoWebRoleInheritanceResetCommand_instances, "m", _SpoWebRoleInheritanceResetCommand_initOptions).call(this);
|
|
27
29
|
__classPrivateFieldGet(this, _SpoWebRoleInheritanceResetCommand_instances, "m", _SpoWebRoleInheritanceResetCommand_initValidators).call(this);
|
|
28
30
|
}
|
|
@@ -36,23 +38,51 @@ class SpoWebRoleInheritanceResetCommand extends SpoCommand_1.default {
|
|
|
36
38
|
if (this.verbose) {
|
|
37
39
|
logger.logToStderr(`Restore role inheritance of subsite at ${args.options.webUrl}...`);
|
|
38
40
|
}
|
|
39
|
-
const
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
41
|
+
const resetWebRoleInheritance = () => {
|
|
42
|
+
const requestOptions = {
|
|
43
|
+
url: `${args.options.webUrl}/_api/web/resetroleinheritance`,
|
|
44
|
+
method: 'POST',
|
|
45
|
+
headers: {
|
|
46
|
+
'accept': 'application/json;odata=nometadata',
|
|
47
|
+
'content-type': 'application/json'
|
|
48
|
+
},
|
|
49
|
+
responseType: 'json'
|
|
50
|
+
};
|
|
51
|
+
request_1.default
|
|
52
|
+
.post(requestOptions)
|
|
53
|
+
.then(_ => cb(), (err) => this.handleRejectedODataJsonPromise(err, logger, cb));
|
|
47
54
|
};
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
55
|
+
if (args.options.confirm) {
|
|
56
|
+
resetWebRoleInheritance();
|
|
57
|
+
}
|
|
58
|
+
else {
|
|
59
|
+
cli_1.Cli.prompt({
|
|
60
|
+
type: 'confirm',
|
|
61
|
+
name: 'continue',
|
|
62
|
+
default: false,
|
|
63
|
+
message: `Are you sure you want to reset the role inheritance of ${args.options.webUrl}`
|
|
64
|
+
}, (result) => {
|
|
65
|
+
if (!result.continue) {
|
|
66
|
+
cb();
|
|
67
|
+
}
|
|
68
|
+
else {
|
|
69
|
+
resetWebRoleInheritance();
|
|
70
|
+
}
|
|
71
|
+
});
|
|
72
|
+
}
|
|
51
73
|
}
|
|
52
74
|
}
|
|
53
|
-
_SpoWebRoleInheritanceResetCommand_instances = new WeakSet(),
|
|
75
|
+
_SpoWebRoleInheritanceResetCommand_instances = new WeakSet(), _SpoWebRoleInheritanceResetCommand_initTelemetry = function _SpoWebRoleInheritanceResetCommand_initTelemetry() {
|
|
76
|
+
this.telemetry.push((args) => {
|
|
77
|
+
Object.assign(this.telemetryProperties, {
|
|
78
|
+
confirm: (!(!args.options.confirm)).toString()
|
|
79
|
+
});
|
|
80
|
+
});
|
|
81
|
+
}, _SpoWebRoleInheritanceResetCommand_initOptions = function _SpoWebRoleInheritanceResetCommand_initOptions() {
|
|
54
82
|
this.options.unshift({
|
|
55
83
|
option: '-u, --webUrl <webUrl>'
|
|
84
|
+
}, {
|
|
85
|
+
option: '--confirm'
|
|
56
86
|
});
|
|
57
87
|
}, _SpoWebRoleInheritanceResetCommand_initValidators = function _SpoWebRoleInheritanceResetCommand_initValidators() {
|
|
58
88
|
this.validators.push((args) => __awaiter(this, void 0, void 0, function* () {
|
|
@@ -36,11 +36,7 @@ class TeamsChannelMemberAddCommand extends GraphCommand_1.default {
|
|
|
36
36
|
get description() {
|
|
37
37
|
return 'Adds a conversation member in a private channel.';
|
|
38
38
|
}
|
|
39
|
-
alias() {
|
|
40
|
-
return [commands_1.default.CONVERSATIONMEMBER_ADD];
|
|
41
|
-
}
|
|
42
39
|
commandAction(logger, args, cb) {
|
|
43
|
-
this.showDeprecationWarning(logger, commands_1.default.CONVERSATIONMEMBER_ADD, commands_1.default.CHANNEL_MEMBER_ADD);
|
|
44
40
|
let teamId = '';
|
|
45
41
|
let channelId = '';
|
|
46
42
|
this
|
|
@@ -36,14 +36,10 @@ class TeamsChannelMemberListCommand extends GraphCommand_1.default {
|
|
|
36
36
|
get description() {
|
|
37
37
|
return 'Lists members of the specified Microsoft Teams team channel';
|
|
38
38
|
}
|
|
39
|
-
alias() {
|
|
40
|
-
return [commands_1.default.CONVERSATIONMEMBER_LIST];
|
|
41
|
-
}
|
|
42
39
|
defaultProperties() {
|
|
43
40
|
return ['id', 'roles', 'displayName', 'userId', 'email'];
|
|
44
41
|
}
|
|
45
42
|
commandAction(logger, args, cb) {
|
|
46
|
-
this.showDeprecationWarning(logger, commands_1.default.CONVERSATIONMEMBER_LIST, commands_1.default.CHANNEL_MEMBER_LIST);
|
|
47
43
|
this
|
|
48
44
|
.getTeamId(args)
|
|
49
45
|
.then((teamId) => {
|
|
@@ -38,11 +38,7 @@ class TeamsChannelMemberRemoveCommand extends GraphCommand_1.default {
|
|
|
38
38
|
get description() {
|
|
39
39
|
return 'Updates the role of the specified member in the specified Microsoft Teams private team channel';
|
|
40
40
|
}
|
|
41
|
-
alias() {
|
|
42
|
-
return [commands_1.default.CONVERSATIONMEMBER_REMOVE];
|
|
43
|
-
}
|
|
44
41
|
commandAction(logger, args, cb) {
|
|
45
|
-
this.showDeprecationWarning(logger, commands_1.default.CONVERSATIONMEMBER_REMOVE, commands_1.default.CHANNEL_MEMBER_REMOVE);
|
|
46
42
|
const removeMember = () => {
|
|
47
43
|
this
|
|
48
44
|
.removeMemberFromChannel(args)
|
|
@@ -23,9 +23,6 @@ exports.default = {
|
|
|
23
23
|
CHAT_MEMBER_LIST: `${prefix} chat member list`,
|
|
24
24
|
CHAT_MESSAGE_LIST: `${prefix} chat message list`,
|
|
25
25
|
CHAT_MESSAGE_SEND: `${prefix} chat message send`,
|
|
26
|
-
CONVERSATIONMEMBER_ADD: `${prefix} conversationmember add`,
|
|
27
|
-
CONVERSATIONMEMBER_LIST: `${prefix} conversationmember list`,
|
|
28
|
-
CONVERSATIONMEMBER_REMOVE: `${prefix} conversationmember remove`,
|
|
29
26
|
FUNSETTINGS_LIST: `${prefix} funsettings list`,
|
|
30
27
|
FUNSETTINGS_SET: `${prefix} funsettings set`,
|
|
31
28
|
GUESTSETTINGS_LIST: `${prefix} guestsettings list`,
|
package/dist/utils/fsUtil.js
CHANGED
|
@@ -42,12 +42,10 @@ const addFileCommands = {
|
|
|
42
42
|
addFileCommand: 'cat > [FILEPATH] << EOF [FILECONTENT]EOF'
|
|
43
43
|
},
|
|
44
44
|
powershell: {
|
|
45
|
-
addFileCommand: `@"[FILECONTENT]"@ | Out-File -FilePath
|
|
46
|
-
`
|
|
45
|
+
addFileCommand: `@"[FILECONTENT]"@ | Out-File -FilePath [FILEPATH]`
|
|
47
46
|
},
|
|
48
47
|
cmd: {
|
|
49
|
-
addFileCommand: `echo [FILECONTENT] >
|
|
50
|
-
`
|
|
48
|
+
addFileCommand: `echo [FILECONTENT] > [FILEPATH]`
|
|
51
49
|
}
|
|
52
50
|
};
|
|
53
51
|
const removeFileCommands = {
|
package/dist/utils/md.js
CHANGED
|
@@ -46,7 +46,7 @@ function convertHyperlinks(md) {
|
|
|
46
46
|
});
|
|
47
47
|
}
|
|
48
48
|
function convertCodeFences(md) {
|
|
49
|
-
const regex = new RegExp('^```.*?
|
|
49
|
+
const regex = new RegExp('^```.*?(?:\r\n|\n)(.*?)```(?:\r\n|\n)', 'gms');
|
|
50
50
|
return md.replace(regex, (match, code) => {
|
|
51
51
|
return ` ${code}${os_1.EOL}`;
|
|
52
52
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# aad o365group restore
|
|
1
|
+
# aad o365group recyclebinitem restore
|
|
2
2
|
|
|
3
3
|
Restores a deleted Microsoft 365 Group
|
|
4
4
|
|
|
@@ -8,12 +8,6 @@ Restores a deleted Microsoft 365 Group
|
|
|
8
8
|
m365 aad o365group recyclebinitem restore [options]
|
|
9
9
|
```
|
|
10
10
|
|
|
11
|
-
## Alias
|
|
12
|
-
|
|
13
|
-
```sh
|
|
14
|
-
m365 aad o365group restore [options]
|
|
15
|
-
```
|
|
16
|
-
|
|
17
11
|
## Options
|
|
18
12
|
|
|
19
13
|
`-i, --id [id]`
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# graph changelog list
|
|
2
|
+
|
|
3
|
+
Gets an overview of specific API-level changes in Microsoft Graph v1.0 and beta
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
```sh
|
|
8
|
+
m365 graph changelog list [options]
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Options
|
|
12
|
+
|
|
13
|
+
`-v, --versions [versions]`
|
|
14
|
+
: Comma-separated list of versions to show changes for. `Beta, v1.0`. When no version is selected all versions are returned.
|
|
15
|
+
|
|
16
|
+
`-c, --changeType [changeType]`
|
|
17
|
+
: Change type to show changes for. `Addition, Change, Deletion`. When no changeType is selected all change types are returned.
|
|
18
|
+
|
|
19
|
+
`-s, --services [services]`
|
|
20
|
+
: Comma-separated list of services to show changes for. `Applications, Calendar, Change notifications, Cloud communications, Compliance, Cross-device experiences, Customer booking, Device and app management, Education, Files, Financials, Groups, Identity and access, Mail, Notes, Notifications, People and workplace intelligence, Personal contacts, Reports, Search, Security, Sites and lists, Tasks and plans, Teamwork, To-do tasks, Users, Workbooks and charts`. When no service is selected all services are returned.
|
|
21
|
+
|
|
22
|
+
`--startDate [startDate]`
|
|
23
|
+
: The startdate used to query for changes. Supported date format is `YYYY-MM-DD`. When no date is specified all changes are returned.
|
|
24
|
+
|
|
25
|
+
`--endDate [endDate]`
|
|
26
|
+
: The enddate used to query for changes. Supported date format is `YYYY-MM-DD`. When no date is specified all changes are returned.
|
|
27
|
+
|
|
28
|
+
--8<-- "docs/cmd/_global.md"
|
|
29
|
+
|
|
30
|
+
## Remarks
|
|
31
|
+
|
|
32
|
+
!!! attention
|
|
33
|
+
This command is based on an API that is currently in preview and is subject to change once the API reached general availability.
|
|
34
|
+
|
|
35
|
+
## Examples
|
|
36
|
+
|
|
37
|
+
Get all changes within Microsoft Graph.
|
|
38
|
+
|
|
39
|
+
```sh
|
|
40
|
+
m365 graph changelog list
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
Get all changes within Microsoft Graph for the services _Groups_ and _Users_.
|
|
44
|
+
|
|
45
|
+
```sh
|
|
46
|
+
m365 graph changelog list --services 'Groups,Users'
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
Get all changes within Microsoft Graph that happend between _2021-01-01_ and _2021-05-01_.
|
|
50
|
+
|
|
51
|
+
```sh
|
|
52
|
+
m365 graph changelog list --startDate '2021-01-01' --endDate '2021-05-01'
|
|
53
|
+
```
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
# outlook
|
|
1
|
+
# outlook mail send
|
|
2
2
|
|
|
3
|
-
Sends e-mail
|
|
3
|
+
Sends an e-mail
|
|
4
4
|
|
|
5
5
|
## Usage
|
|
6
6
|
|
|
@@ -8,12 +8,6 @@ Sends e-mail on behalf of the current user
|
|
|
8
8
|
m365 outlook mail send [options]
|
|
9
9
|
```
|
|
10
10
|
|
|
11
|
-
## Alias
|
|
12
|
-
|
|
13
|
-
```sh
|
|
14
|
-
m365 outlook sendmail [options]
|
|
15
|
-
```
|
|
16
|
-
|
|
17
11
|
## Options
|
|
18
12
|
|
|
19
13
|
`-s, --subject <subject>`
|
|
@@ -22,6 +16,12 @@ m365 outlook sendmail [options]
|
|
|
22
16
|
`-t, --to <to>`
|
|
23
17
|
: Comma-separated list of e-mails to send the message to
|
|
24
18
|
|
|
19
|
+
`--sender [sender]`
|
|
20
|
+
: Optional upn or user id to specify what account to send the message from. Also see the remarks section.
|
|
21
|
+
|
|
22
|
+
`-m, --mailbox [mailbox]`
|
|
23
|
+
: Specify this option to send the email on behalf of another mailbox, for example a shared mailbox, group or distribution list. The sender needs to be a delegate on the specified mailbox. Also see the remarks section.
|
|
24
|
+
|
|
25
25
|
`--bodyContents <bodyContents>`
|
|
26
26
|
: String containing the body of the e-mail to send
|
|
27
27
|
|
|
@@ -33,6 +33,25 @@ m365 outlook sendmail [options]
|
|
|
33
33
|
|
|
34
34
|
--8<-- "docs/cmd/_global.md"
|
|
35
35
|
|
|
36
|
+
## Remarks
|
|
37
|
+
|
|
38
|
+
### If you are connected using app only authentication
|
|
39
|
+
|
|
40
|
+
- Always specify a user id or upn in the `--sender` option. The email will be sent as if it came from the specified user, and can optionally be saved in the sent folder of that user account.
|
|
41
|
+
- You can optionally also specify the `--mailbox` option to send mail on behalf of a shared mailbox, group or distribution list. The account used in the `--sender` option, needs to have 'Send on behalf of' permissions on the mailbox in question.
|
|
42
|
+
|
|
43
|
+
!!! important
|
|
44
|
+
You need `Mail.Send` application permissions on the Microsoft Graph to be able to send mails using an application identity.
|
|
45
|
+
|
|
46
|
+
### If you are connected with a regular user account
|
|
47
|
+
|
|
48
|
+
- Specify the `--mailbox` option if you want to send an email on behalf of another mailbox. This can be a shared mailbox, group or distribution list. It will be visible in the email that the email was sent by you. You need to be assigned `Send on behalf of` permissions on the mailbox in question.
|
|
49
|
+
- You can specify the `--sender` option if you want to send an email as if you were the other user.
|
|
50
|
+
The sent email can optionally be saved in the sent folder of that user account. You'll need `Read and manage (Full Access)` permissions on the mailbox of the other user. You can combine the `--sender` and `--mailbox` options to let the other user send a mail on behalf of the specified mailbox.
|
|
51
|
+
|
|
52
|
+
!!! important
|
|
53
|
+
You need at least `Mail.Send` delegated permissions on the Microsoft Graph to be able to send emails. When specifying another user as sender, you'll need `Mail.Send.Shared` permissions.
|
|
54
|
+
|
|
36
55
|
## Examples
|
|
37
56
|
|
|
38
57
|
Send a text e-mail to the specified e-mail address
|
|
@@ -58,3 +77,21 @@ Send a text e-mail to the specified e-mail address. Don't store the e-mail in se
|
|
|
58
77
|
```sh
|
|
59
78
|
m365 outlook mail send --to chris@contoso.com --subject "DG2000 Data Sheets" --bodyContents "The latest data sheets are in the team site" --saveToSentItems false
|
|
60
79
|
```
|
|
80
|
+
|
|
81
|
+
Send an email on behalf of a shared mailbox using the signed in user
|
|
82
|
+
|
|
83
|
+
```sh
|
|
84
|
+
m365 outlook mail send --to chris@contoso.com --subject "DG2000 Data Sheets" --bodyContents "The latest data sheets are in the team site" --mailbox sales@contoso.com
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
Send an email as another user
|
|
88
|
+
|
|
89
|
+
```sh
|
|
90
|
+
m365 outlook mail send --to chris@contoso.com --subject "DG2000 Data Sheets" --bodyContents "The latest data sheets are in the team site" --sender svc_project@contoso.com
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
Send an email as another user, on behalf of a shared mailbox
|
|
94
|
+
|
|
95
|
+
```sh
|
|
96
|
+
m365 outlook mail send --to chris@contoso.com --subject "DG2000 Data Sheets" --bodyContents "The latest data sheets are in the team site" --sender svc_project@contoso.com --mailbox sales@contoso.com
|
|
97
|
+
```
|
|
@@ -10,7 +10,7 @@ m365 pp environment list [options]
|
|
|
10
10
|
|
|
11
11
|
## Options
|
|
12
12
|
|
|
13
|
-
`-a, --asAdmin
|
|
13
|
+
`-a, --asAdmin`
|
|
14
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"
|
|
@@ -25,9 +25,6 @@ m365 spo field set [options]
|
|
|
25
25
|
`-t, --title [title]`
|
|
26
26
|
: Title or internal name of the field to update. Specify `id` or `title` but not both
|
|
27
27
|
|
|
28
|
-
`-n, --name [name]`
|
|
29
|
-
: (deprecated. Use `title` instead) Title or internal name of the field to update. Specify `id` or `name` but not both
|
|
30
|
-
|
|
31
28
|
`--updateExistingLists`
|
|
32
29
|
: Set, to push the update to existing lists. Otherwise, the changes will apply to new lists only
|
|
33
30
|
|
|
@@ -26,10 +26,10 @@ m365 spo list roleassignment add [options]
|
|
|
26
26
|
: SharePoint ID of principal it may be either user id or group id we want to add permissions to. Specify principalId only when upn or groupName are not used.
|
|
27
27
|
|
|
28
28
|
`--upn [upn]`
|
|
29
|
-
: Upn/email of user to assign role to. Specify either upn or
|
|
29
|
+
: Upn/email of user to assign role to. Specify either upn or principalId
|
|
30
30
|
|
|
31
31
|
`--groupName [groupName]`
|
|
32
|
-
: Enter group name of Azure AD or SharePoint group.. Specify either groupName or
|
|
32
|
+
: Enter group name of Azure AD or SharePoint group.. Specify either groupName or principalId
|
|
33
33
|
|
|
34
34
|
`--roleDefinitionId [roleDefinitionId]`
|
|
35
35
|
: ID of role definition. Specify either roleDefinitionId or roleDefinitionName but not both
|
|
@@ -26,10 +26,10 @@ m365 spo list roleassignment remove [options]
|
|
|
26
26
|
: SharePoint ID of principal it may be either user id or group id we want to remove permissions Specify principalId only when upn or groupName are not used.
|
|
27
27
|
|
|
28
28
|
`--upn [upn]`
|
|
29
|
-
: upn/email of user. Specify either upn or
|
|
29
|
+
: upn/email of user. Specify either upn or principalId.
|
|
30
30
|
|
|
31
31
|
`--groupName [groupName]`
|
|
32
|
-
: enter group name of Azure AD or SharePoint group. Specify either groupName or
|
|
32
|
+
: enter group name of Azure AD or SharePoint group. Specify either groupName or principalId.
|
|
33
33
|
|
|
34
34
|
`--confirm`
|
|
35
35
|
: Don't prompt for confirming removing the role assignment
|
|
@@ -22,6 +22,9 @@ m365 spo list roleinheritance break [options]
|
|
|
22
22
|
`-c, --clearExistingPermissions`
|
|
23
23
|
: Flag if used clears all roles from the list
|
|
24
24
|
|
|
25
|
+
`--confirm`
|
|
26
|
+
: Do not prompt for confirmation before breaking role inheritance.
|
|
27
|
+
|
|
25
28
|
--8<-- "docs/cmd/_global.md"
|
|
26
29
|
|
|
27
30
|
## Remarks
|
|
@@ -53,3 +56,9 @@ Break inheritance of list with ID _202b8199-b9de-43fd-9737-7f213f51c991_ located
|
|
|
53
56
|
```sh
|
|
54
57
|
m365 spo list roleinheritance break --webUrl "https://contoso.sharepoint.com/sites/project-x" --listId "202b8199-b9de-43fd-9737-7f213f51c991" --clearExistingPermissions
|
|
55
58
|
```
|
|
59
|
+
|
|
60
|
+
Break inheritance of list with ID _202b8199-b9de-43fd-9737-7f213f51c991_ located in site _https://contoso.sharepoint.com/sites/project-x_ with clearing permissions without prompting for confirmation
|
|
61
|
+
|
|
62
|
+
```sh
|
|
63
|
+
m365 spo list roleinheritance break --webUrl "https://contoso.sharepoint.com/sites/project-x" --listId "202b8199-b9de-43fd-9737-7f213f51c991" --clearExistingPermissions --confirm
|
|
64
|
+
```
|
|
@@ -19,6 +19,9 @@ m365 spo list roleinheritance reset [options]
|
|
|
19
19
|
`-t, --listTitle [listTitle]`
|
|
20
20
|
: Title of the list. Specify either id or title but not both
|
|
21
21
|
|
|
22
|
+
`--confirm`
|
|
23
|
+
: Do not prompt for confirmation before resetting role inheritance.
|
|
24
|
+
|
|
22
25
|
--8<-- "docs/cmd/_global.md"
|
|
23
26
|
|
|
24
27
|
## Examples
|
|
@@ -34,3 +37,9 @@ Restore role inheritance of list with title _test_ located in site _https://cont
|
|
|
34
37
|
```sh
|
|
35
38
|
m365 spo list roleinheritance reset --webUrl https://contoso.sharepoint.com/sites/project-x --listTitle test
|
|
36
39
|
```
|
|
40
|
+
|
|
41
|
+
Restore role inheritance of list with title _test_ located in site _https://contoso.sharepoint.com/sites/project-x_ without prompting for confirmation
|
|
42
|
+
|
|
43
|
+
```sh
|
|
44
|
+
m365 spo list roleinheritance reset --webUrl https://contoso.sharepoint.com/sites/project-x --listTitle test --confirm
|
|
45
|
+
```
|
|
@@ -29,10 +29,10 @@ m365 spo listitem roleassignment remove [options]
|
|
|
29
29
|
: SharePoint ID of principal it may be either user id or group id we want to remove permissions Specify principalId only when upn or groupName are not used.
|
|
30
30
|
|
|
31
31
|
`--upn [upn]`
|
|
32
|
-
: upn/email of user. Specify either upn or
|
|
32
|
+
: upn/email of user. Specify either upn or principalId.
|
|
33
33
|
|
|
34
34
|
`--groupName [groupName]`
|
|
35
|
-
: enter group name of Azure AD or SharePoint group. Specify either groupName or
|
|
35
|
+
: enter group name of Azure AD or SharePoint group. Specify either groupName or principalId.
|
|
36
36
|
|
|
37
37
|
`--confirm`
|
|
38
38
|
: Don't prompt for confirming removing the role assignment
|
|
@@ -25,6 +25,9 @@ m365 spo listitem roleinheritance break [options]
|
|
|
25
25
|
`-c, --clearExistingPermissions`
|
|
26
26
|
: Set to clear existing roles from the list item
|
|
27
27
|
|
|
28
|
+
`--confirm`
|
|
29
|
+
: Do not prompt for confirmation before breaking role inheritance.
|
|
30
|
+
|
|
28
31
|
--8<-- "docs/cmd/_global.md"
|
|
29
32
|
|
|
30
33
|
## Remarks
|
|
@@ -56,3 +59,9 @@ Break inheritance of list item _1_ in list with ID _202b8199-b9de-43fd-9737-7f21
|
|
|
56
59
|
```sh
|
|
57
60
|
m365 spo listitem roleinheritance break --webUrl https://contoso.sharepoint.com/sites/project-x --listId 202b8199-b9de-43fd-9737-7f213f51c991 --listItemId 1 --clearExistingPermissions
|
|
58
61
|
```
|
|
62
|
+
|
|
63
|
+
Break inheritance of list item _1_ in list with ID _202b8199-b9de-43fd-9737-7f213f51c991_ located in site _https://contoso.sharepoint.com/sites/project-x_ with clearing permissions without prompting for confirmation
|
|
64
|
+
|
|
65
|
+
```sh
|
|
66
|
+
m365 spo listitem roleinheritance break --webUrl https://contoso.sharepoint.com/sites/project-x --listId 202b8199-b9de-43fd-9737-7f213f51c991 --listItemId 1 --clearExistingPermissions --confirm
|
|
67
|
+
```
|
|
@@ -22,6 +22,9 @@ m365 spo listitem roleinheritance reset [options]
|
|
|
22
22
|
`--listTitle [listTitle]`
|
|
23
23
|
: Title of the list. Specify listId or listTitle but not both
|
|
24
24
|
|
|
25
|
+
`--confirm`
|
|
26
|
+
: Do not prompt for confirmation before resetting role inheritance.
|
|
27
|
+
|
|
25
28
|
--8<-- "docs/cmd/_global.md"
|
|
26
29
|
|
|
27
30
|
## Examples
|
|
@@ -37,3 +40,9 @@ Restore role inheritance of list item with id 8 from list with title _test_ loca
|
|
|
37
40
|
```sh
|
|
38
41
|
m365 spo listitem roleinheritance reset --webUrl https://contoso.sharepoint.com/sites/project-x --listItemId 8 --listTitle test
|
|
39
42
|
```
|
|
43
|
+
|
|
44
|
+
Restore role inheritance of list item with id 8 from list with title _test_ located in site _https://contoso.sharepoint.com/sites/project-x_ without prompting for confirmation
|
|
45
|
+
|
|
46
|
+
```sh
|
|
47
|
+
m365 spo listitem roleinheritance reset --webUrl https://contoso.sharepoint.com/sites/project-x --listItemId 8 --listTitle test --confirm
|
|
48
|
+
```
|
|
@@ -87,9 +87,9 @@ The value of the `--storageQuota` option must not exceed the company's available
|
|
|
87
87
|
|
|
88
88
|
The value of the `--storageQuotaWarningLevel` option must not exceed the the value of the `--storageQuota` option.
|
|
89
89
|
|
|
90
|
-
If you try to create a site with the same URL as a site that has been previously moved to the recycle bin, you will get an error. To avoid this error, you can use the `--removeDeletedSite` option. Prior to creating the site, the spo site
|
|
90
|
+
If you try to create a site with the same URL as a site that has been previously moved to the recycle bin, you will get an error. To avoid this error, you can use the `--removeDeletedSite` option. Prior to creating the site, the spo site add command will check if the site with the specified URL has been previously moved to the recycle bin and if so, will remove it. Because removing sites from the recycle bin might take a moment, it should be used in conjunction with the `--wait` option so that the new site is not created before the old site is fully removed.
|
|
91
91
|
|
|
92
|
-
Deleting and creating classic site collections is by default asynchronous and depending on the current state of Office 365, might take up to few minutes. If you're building a script with steps that require the site to be fully provisioned, you should use the `--wait` flag. When using this flag, the spo site
|
|
92
|
+
Deleting and creating classic site collections is by default asynchronous and depending on the current state of Office 365, might take up to few minutes. If you're building a script with steps that require the site to be fully provisioned, you should use the `--wait` flag. When using this flag, the spo site add command will keep running until it received confirmation from Office 365 that the site has been fully provisioned.
|
|
93
93
|
|
|
94
94
|
## Remarks for modern sites
|
|
95
95
|
|
|
@@ -17,10 +17,10 @@ m365 spo web roleassignment add [options]
|
|
|
17
17
|
: SharePoint ID of principal it may be either user id or group id we want to add permissions to. Specify principalId only when upn or groupName are not used.
|
|
18
18
|
|
|
19
19
|
`--upn [upn]`
|
|
20
|
-
: upn/email of user to assign role to. Specify either upn or
|
|
20
|
+
: upn/email of user to assign role to. Specify either upn or principalId
|
|
21
21
|
|
|
22
22
|
`--groupName [groupName]`
|
|
23
|
-
: enter group name of Azure AD or SharePoint group.. Specify either groupName or
|
|
23
|
+
: enter group name of Azure AD or SharePoint group.. Specify either groupName or principalId
|
|
24
24
|
|
|
25
25
|
`--roleDefinitionId [roleDefinitionId]`
|
|
26
26
|
: ID of role definition. Specify either roleDefinitionId or roleDefinitionName but not both
|
|
@@ -13,6 +13,9 @@ m365 spo web roleinheritance reset [options]
|
|
|
13
13
|
`-u, --webUrl <webUrl>`
|
|
14
14
|
: URL of the site
|
|
15
15
|
|
|
16
|
+
`--confirm`
|
|
17
|
+
: Do not prompt for confirmation before resetting role inheritance.
|
|
18
|
+
|
|
16
19
|
--8<-- "docs/cmd/_global.md"
|
|
17
20
|
|
|
18
21
|
## Examples
|
|
@@ -21,4 +24,10 @@ Restore role inheritance of subsite _https://contoso.sharepoint.com/sites/projec
|
|
|
21
24
|
|
|
22
25
|
```sh
|
|
23
26
|
m365 spo web roleinheritance reset --webUrl https://contoso.sharepoint.com/sites/project-x
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
Restore role inheritance of subsite _https://contoso.sharepoint.com/sites/project-x_ without prompting for confirmation
|
|
30
|
+
|
|
31
|
+
```sh
|
|
32
|
+
m365 spo web roleinheritance reset --webUrl https://contoso.sharepoint.com/sites/project-x --confirm
|
|
24
33
|
```
|