@pnp/cli-microsoft365 5.0.0-beta.a1bb50f → 5.0.0-beta.ae24497
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/Utils.js +4 -0
- package/dist/cli/Cli.js +7 -9
- package/dist/m365/aad/commands/user/user-hibp.js +67 -0
- package/dist/m365/aad/commands.js +1 -0
- package/dist/m365/cli/commands/config/config-set.js +4 -1
- package/dist/m365/planner/AppliedCategories.js +3 -0
- package/dist/m365/planner/commands/task/task-set.js +357 -0
- package/dist/m365/planner/commands.js +2 -1
- package/dist/m365/spo/commands/group/group-user-add.js +64 -13
- package/dist/m365/spo/commands/site/site-recyclebinitem-list.js +76 -0
- package/dist/m365/spo/commands.js +1 -0
- package/dist/m365/teams/commands/app/app-list.js +9 -6
- package/dist/m365/teams/commands/chat/chat-list.js +43 -0
- package/dist/m365/teams/commands/chat/chat-member-list.js +42 -0
- package/dist/m365/teams/commands/chat/chat-message-list.js +60 -0
- package/dist/m365/teams/commands/tab/tab-get.js +9 -6
- package/dist/m365/teams/commands.js +3 -0
- package/dist/settingsNames.js +6 -1
- package/docs/docs/cmd/aad/user/user-hibp.md +46 -0
- package/docs/docs/cmd/planner/task/task-set.md +99 -0
- package/docs/docs/cmd/spo/group/group-user-add.md +24 -6
- package/docs/docs/cmd/spo/site/site-recyclebinitem-list.md +40 -0
- package/docs/docs/cmd/teams/chat/chat-list.md +30 -0
- package/docs/docs/cmd/teams/chat/chat-member-list.md +24 -0
- package/docs/docs/cmd/teams/chat/chat-message-list.md +24 -0
- package/package.json +2 -1
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const request_1 = require("../../../../request");
|
|
4
|
+
const SpoCommand_1 = require("../../../base/SpoCommand");
|
|
5
|
+
const commands_1 = require("../../commands");
|
|
6
|
+
class SpoSiteRecycleBinItemListCommand extends SpoCommand_1.default {
|
|
7
|
+
get name() {
|
|
8
|
+
return commands_1.default.SITE_RECYCLEBINITEM_LIST;
|
|
9
|
+
}
|
|
10
|
+
get description() {
|
|
11
|
+
return 'Lists items from recycle bin';
|
|
12
|
+
}
|
|
13
|
+
defaultProperties() {
|
|
14
|
+
return ['Id', 'Title', 'DirName'];
|
|
15
|
+
}
|
|
16
|
+
commandAction(logger, args, cb) {
|
|
17
|
+
if (this.verbose) {
|
|
18
|
+
logger.logToStderr(`Retrieving all items from recycle bin at ${args.options.siteUrl}...`);
|
|
19
|
+
}
|
|
20
|
+
const state = args.options.secondary ? '2' : '1';
|
|
21
|
+
let requestUrl = `${args.options.siteUrl}/_api/site/RecycleBin?$filter=(ItemState eq ${state})`;
|
|
22
|
+
if (typeof args.options.type !== 'undefined') {
|
|
23
|
+
const type = SpoSiteRecycleBinItemListCommand.recycleBinItemType.find(item => item.value === args.options.type);
|
|
24
|
+
if (typeof type !== 'undefined') {
|
|
25
|
+
requestUrl += ` and (ItemType eq ${type.id})`;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
const requestOptions = {
|
|
29
|
+
url: requestUrl,
|
|
30
|
+
headers: {
|
|
31
|
+
'accept': 'application/json;odata=nometadata'
|
|
32
|
+
},
|
|
33
|
+
responseType: 'json'
|
|
34
|
+
};
|
|
35
|
+
request_1.default
|
|
36
|
+
.get(requestOptions)
|
|
37
|
+
.then((response) => {
|
|
38
|
+
logger.log(response.value);
|
|
39
|
+
cb();
|
|
40
|
+
}, (err) => this.handleRejectedODataJsonPromise(err, logger, cb));
|
|
41
|
+
}
|
|
42
|
+
options() {
|
|
43
|
+
const options = [
|
|
44
|
+
{
|
|
45
|
+
option: '-u, --siteUrl <siteUrl>'
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
option: '-t, --type [type]',
|
|
49
|
+
autocomplete: SpoSiteRecycleBinItemListCommand.recycleBinItemType.map(item => item.value)
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
option: '-s, --secondary'
|
|
53
|
+
}
|
|
54
|
+
];
|
|
55
|
+
const parentOptions = super.options();
|
|
56
|
+
return options.concat(parentOptions);
|
|
57
|
+
}
|
|
58
|
+
validate(args) {
|
|
59
|
+
const isValidSharePointUrl = SpoCommand_1.default.isValidSharePointUrl(args.options.siteUrl);
|
|
60
|
+
if (isValidSharePointUrl !== true) {
|
|
61
|
+
return isValidSharePointUrl;
|
|
62
|
+
}
|
|
63
|
+
if (typeof args.options.type !== 'undefined' &&
|
|
64
|
+
!SpoSiteRecycleBinItemListCommand.recycleBinItemType.some(item => item.value === args.options.type)) {
|
|
65
|
+
return `${args.options.type} is not a valid value. Allowed values are ${SpoSiteRecycleBinItemListCommand.recycleBinItemType.map(item => item.value).join(', ')}`;
|
|
66
|
+
}
|
|
67
|
+
return true;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
SpoSiteRecycleBinItemListCommand.recycleBinItemType = [
|
|
71
|
+
{ id: 1, value: 'files' },
|
|
72
|
+
{ id: 3, value: 'listItems' },
|
|
73
|
+
{ id: 5, value: 'folders' }
|
|
74
|
+
];
|
|
75
|
+
module.exports = new SpoSiteRecycleBinItemListCommand();
|
|
76
|
+
//# sourceMappingURL=site-recyclebinitem-list.js.map
|
|
@@ -183,6 +183,7 @@ exports.default = {
|
|
|
183
183
|
SITE_GROUPIFY: `${prefix} site groupify`,
|
|
184
184
|
SITE_LIST: `${prefix} site list`,
|
|
185
185
|
SITE_INPLACERECORDSMANAGEMENT_SET: `${prefix} site inplacerecordsmanagement set`,
|
|
186
|
+
SITE_RECYCLEBINITEM_LIST: `${prefix} site recyclebinitem list`,
|
|
186
187
|
SITE_REMOVE: `${prefix} site remove`,
|
|
187
188
|
SITE_RENAME: `${prefix} site rename`,
|
|
188
189
|
SITE_SET: `${prefix} site set`,
|
|
@@ -25,24 +25,27 @@ class TeamsAppListCommand extends GraphItemsListCommand_1.GraphItemsListCommand
|
|
|
25
25
|
if (args.options.teamId) {
|
|
26
26
|
return Promise.resolve(args.options.teamId);
|
|
27
27
|
}
|
|
28
|
-
const
|
|
29
|
-
url: `${this.resource}/v1.0/
|
|
28
|
+
const requestOptions = {
|
|
29
|
+
url: `${this.resource}/v1.0/groups?$filter=displayName eq '${encodeURIComponent(args.options.teamName)}'`,
|
|
30
30
|
headers: {
|
|
31
31
|
accept: 'application/json;odata.metadata=none'
|
|
32
32
|
},
|
|
33
33
|
responseType: 'json'
|
|
34
34
|
};
|
|
35
35
|
return request_1.default
|
|
36
|
-
.get(
|
|
36
|
+
.get(requestOptions)
|
|
37
37
|
.then(response => {
|
|
38
|
-
const
|
|
39
|
-
if (!
|
|
38
|
+
const groupItem = response.value[0];
|
|
39
|
+
if (!groupItem) {
|
|
40
|
+
return Promise.reject(`The specified team does not exist in the Microsoft Teams`);
|
|
41
|
+
}
|
|
42
|
+
if (groupItem.resourceProvisioningOptions.indexOf('Team') === -1) {
|
|
40
43
|
return Promise.reject(`The specified team does not exist in the Microsoft Teams`);
|
|
41
44
|
}
|
|
42
45
|
if (response.value.length > 1) {
|
|
43
46
|
return Promise.reject(`Multiple Microsoft Teams teams with name ${args.options.teamName} found: ${response.value.map(x => x.id)}`);
|
|
44
47
|
}
|
|
45
|
-
return Promise.resolve(
|
|
48
|
+
return Promise.resolve(groupItem.id);
|
|
46
49
|
});
|
|
47
50
|
}
|
|
48
51
|
getEndpointUrl(args) {
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const GraphItemsListCommand_1 = require("../../../base/GraphItemsListCommand");
|
|
4
|
+
const commands_1 = require("../../commands");
|
|
5
|
+
class TeamsChatListCommand extends GraphItemsListCommand_1.GraphItemsListCommand {
|
|
6
|
+
get name() {
|
|
7
|
+
return commands_1.default.CHAT_LIST;
|
|
8
|
+
}
|
|
9
|
+
get description() {
|
|
10
|
+
return 'Lists all chat conversations';
|
|
11
|
+
}
|
|
12
|
+
defaultProperties() {
|
|
13
|
+
return ['id', 'topic', 'chatType'];
|
|
14
|
+
}
|
|
15
|
+
commandAction(logger, args, cb) {
|
|
16
|
+
const filter = args.options.type !== undefined ? `?$filter=chatType eq '${args.options.type}'` : '';
|
|
17
|
+
const endpoint = `${this.resource}/v1.0/chats${filter}`;
|
|
18
|
+
this
|
|
19
|
+
.getAllItems(endpoint, logger, true)
|
|
20
|
+
.then(() => {
|
|
21
|
+
logger.log(this.items);
|
|
22
|
+
cb();
|
|
23
|
+
}, (err) => this.handleRejectedODataJsonPromise(err, logger, cb));
|
|
24
|
+
}
|
|
25
|
+
options() {
|
|
26
|
+
const options = [
|
|
27
|
+
{
|
|
28
|
+
option: '-t, --type [chatType]'
|
|
29
|
+
}
|
|
30
|
+
];
|
|
31
|
+
const parentOptions = super.options();
|
|
32
|
+
return options.concat(parentOptions);
|
|
33
|
+
}
|
|
34
|
+
validate(args) {
|
|
35
|
+
const supportedTypes = ['oneOnOne', 'group', 'meeting'];
|
|
36
|
+
if (args.options.type !== undefined && supportedTypes.indexOf(args.options.type) === -1) {
|
|
37
|
+
return `${args.options.type} is not a valid chatType. Accepted values are ${supportedTypes.join(', ')}`;
|
|
38
|
+
}
|
|
39
|
+
return true;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
module.exports = new TeamsChatListCommand();
|
|
43
|
+
//# sourceMappingURL=chat-list.js.map
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const Utils_1 = require("../../../../Utils");
|
|
4
|
+
const GraphItemsListCommand_1 = require("../../../base/GraphItemsListCommand");
|
|
5
|
+
const commands_1 = require("../../commands");
|
|
6
|
+
class TeamsChatMemberListCommand extends GraphItemsListCommand_1.GraphItemsListCommand {
|
|
7
|
+
get name() {
|
|
8
|
+
return commands_1.default.CHAT_MEMBER_LIST;
|
|
9
|
+
}
|
|
10
|
+
get description() {
|
|
11
|
+
return 'Lists all members from a chat';
|
|
12
|
+
}
|
|
13
|
+
defaultProperties() {
|
|
14
|
+
return ['userId', 'displayName', 'email'];
|
|
15
|
+
}
|
|
16
|
+
commandAction(logger, args, cb) {
|
|
17
|
+
const endpoint = `${this.resource}/v1.0/chats/${args.options.chatId}/members`;
|
|
18
|
+
this
|
|
19
|
+
.getAllItems(endpoint, logger, true)
|
|
20
|
+
.then(() => {
|
|
21
|
+
logger.log(this.items);
|
|
22
|
+
cb();
|
|
23
|
+
}, (err) => this.handleRejectedODataJsonPromise(err, logger, cb));
|
|
24
|
+
}
|
|
25
|
+
options() {
|
|
26
|
+
const options = [
|
|
27
|
+
{
|
|
28
|
+
option: '-i, --chatId <chatId>'
|
|
29
|
+
}
|
|
30
|
+
];
|
|
31
|
+
const parentOptions = super.options();
|
|
32
|
+
return options.concat(parentOptions);
|
|
33
|
+
}
|
|
34
|
+
validate(args) {
|
|
35
|
+
if (!Utils_1.default.isValidTeamsChatId(args.options.chatId)) {
|
|
36
|
+
return `${args.options.chatId} is not a valid Teams ChatId`;
|
|
37
|
+
}
|
|
38
|
+
return true;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
module.exports = new TeamsChatMemberListCommand();
|
|
42
|
+
//# sourceMappingURL=chat-member-list.js.map
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const Utils_1 = require("../../../../Utils");
|
|
4
|
+
const GraphItemsListCommand_1 = require("../../../base/GraphItemsListCommand");
|
|
5
|
+
const commands_1 = require("../../commands");
|
|
6
|
+
class TeamsChatMessageListCommand extends GraphItemsListCommand_1.GraphItemsListCommand {
|
|
7
|
+
get name() {
|
|
8
|
+
return commands_1.default.CHAT_MESSAGE_LIST;
|
|
9
|
+
}
|
|
10
|
+
get description() {
|
|
11
|
+
return 'Lists all messages from a chat';
|
|
12
|
+
}
|
|
13
|
+
defaultProperties() {
|
|
14
|
+
return ['id', 'shortBody'];
|
|
15
|
+
}
|
|
16
|
+
commandAction(logger, args, cb) {
|
|
17
|
+
const endpoint = `${this.resource}/v1.0/chats/${args.options.chatId}/messages`;
|
|
18
|
+
this
|
|
19
|
+
.getAllItems(endpoint, logger, true)
|
|
20
|
+
.then(() => {
|
|
21
|
+
if (args.options.output !== 'json') {
|
|
22
|
+
this.items.forEach(i => {
|
|
23
|
+
// hoist the content to body for readability
|
|
24
|
+
i.body = i.body.content;
|
|
25
|
+
let shortBody;
|
|
26
|
+
const bodyToProcess = i.body;
|
|
27
|
+
if (bodyToProcess) {
|
|
28
|
+
let maxLength = 50;
|
|
29
|
+
let addedDots = '...';
|
|
30
|
+
if (bodyToProcess.length < maxLength) {
|
|
31
|
+
maxLength = bodyToProcess.length;
|
|
32
|
+
addedDots = '';
|
|
33
|
+
}
|
|
34
|
+
shortBody = bodyToProcess.replace(/\n/g, ' ').substring(0, maxLength) + addedDots;
|
|
35
|
+
}
|
|
36
|
+
i.shortBody = shortBody;
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
logger.log(this.items);
|
|
40
|
+
cb();
|
|
41
|
+
}, (err) => this.handleRejectedODataJsonPromise(err, logger, cb));
|
|
42
|
+
}
|
|
43
|
+
options() {
|
|
44
|
+
const options = [
|
|
45
|
+
{
|
|
46
|
+
option: '-i, --chatId <chatId>'
|
|
47
|
+
}
|
|
48
|
+
];
|
|
49
|
+
const parentOptions = super.options();
|
|
50
|
+
return options.concat(parentOptions);
|
|
51
|
+
}
|
|
52
|
+
validate(args) {
|
|
53
|
+
if (!Utils_1.default.isValidTeamsChatId(args.options.chatId)) {
|
|
54
|
+
return `${args.options.chatId} is not a valid Teams chat ID`;
|
|
55
|
+
}
|
|
56
|
+
return true;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
module.exports = new TeamsChatMessageListCommand();
|
|
60
|
+
//# sourceMappingURL=chat-message-list.js.map
|
|
@@ -30,24 +30,27 @@ class TeamsTabGetCommand extends GraphCommand_1.default {
|
|
|
30
30
|
if (args.options.teamId) {
|
|
31
31
|
return Promise.resolve(args.options.teamId);
|
|
32
32
|
}
|
|
33
|
-
const
|
|
34
|
-
url: `${this.resource}/v1.0/
|
|
33
|
+
const requestOptions = {
|
|
34
|
+
url: `${this.resource}/v1.0/groups?$filter=displayName eq '${encodeURIComponent(args.options.teamName)}'`,
|
|
35
35
|
headers: {
|
|
36
36
|
accept: 'application/json;odata.metadata=none'
|
|
37
37
|
},
|
|
38
38
|
responseType: 'json'
|
|
39
39
|
};
|
|
40
40
|
return request_1.default
|
|
41
|
-
.get(
|
|
41
|
+
.get(requestOptions)
|
|
42
42
|
.then(response => {
|
|
43
|
-
const
|
|
44
|
-
if (!
|
|
43
|
+
const groupItem = response.value[0];
|
|
44
|
+
if (!groupItem) {
|
|
45
|
+
return Promise.reject(`The specified team does not exist in the Microsoft Teams`);
|
|
46
|
+
}
|
|
47
|
+
if (groupItem.resourceProvisioningOptions.indexOf('Team') === -1) {
|
|
45
48
|
return Promise.reject(`The specified team does not exist in the Microsoft Teams`);
|
|
46
49
|
}
|
|
47
50
|
if (response.value.length > 1) {
|
|
48
51
|
return Promise.reject(`Multiple Microsoft Teams teams with name ${args.options.teamName} found: ${response.value.map(x => x.id)}`);
|
|
49
52
|
}
|
|
50
|
-
return Promise.resolve(
|
|
53
|
+
return Promise.resolve(groupItem.id);
|
|
51
54
|
});
|
|
52
55
|
}
|
|
53
56
|
getChannelId(args) {
|
|
@@ -13,6 +13,9 @@ exports.default = {
|
|
|
13
13
|
CHANNEL_LIST: `${prefix} channel list`,
|
|
14
14
|
CHANNEL_REMOVE: `${prefix} channel remove`,
|
|
15
15
|
CHANNEL_SET: `${prefix} channel set`,
|
|
16
|
+
CHAT_LIST: `${prefix} chat list`,
|
|
17
|
+
CHAT_MEMBER_LIST: `${prefix} chat member list`,
|
|
18
|
+
CHAT_MESSAGE_LIST: `${prefix} chat message list`,
|
|
16
19
|
CONVERSATIONMEMBER_ADD: `${prefix} conversationmember add`,
|
|
17
20
|
CONVERSATIONMEMBER_LIST: `${prefix} conversationmember list`,
|
|
18
21
|
FUNSETTINGS_LIST: `${prefix} funsettings list`,
|
package/dist/settingsNames.js
CHANGED
|
@@ -5,7 +5,12 @@ const settingsNames = {
|
|
|
5
5
|
errorOutput: 'errorOutput',
|
|
6
6
|
output: 'output',
|
|
7
7
|
printErrorsAsPlainText: 'printErrorsAsPlainText',
|
|
8
|
-
showHelpOnFailure: 'showHelpOnFailure'
|
|
8
|
+
showHelpOnFailure: 'showHelpOnFailure',
|
|
9
|
+
csvHeader: 'csvHeader',
|
|
10
|
+
csvEscape: 'csvEscape',
|
|
11
|
+
csvQuote: 'csvQuote',
|
|
12
|
+
csvQuoted: 'csvQuoted',
|
|
13
|
+
csvQuotedEmpty: 'csvQuotedEmpty'
|
|
9
14
|
};
|
|
10
15
|
exports.settingsNames = settingsNames;
|
|
11
16
|
//# sourceMappingURL=settingsNames.js.map
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# aad user hibp
|
|
2
|
+
|
|
3
|
+
Allows you to retrieve all accounts that have been pwned with the specified username
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
```sh
|
|
8
|
+
m365 aad user hibp [options]
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Options
|
|
12
|
+
|
|
13
|
+
`-n, --userName <userName>`
|
|
14
|
+
: The name of the user to retrieve information for.
|
|
15
|
+
|
|
16
|
+
`--apiKey, <apiKey>`
|
|
17
|
+
: Have I been pwned `API Key`. You can buy it from [https://haveibeenpwned.com/API/Key](https://haveibeenpwned.com/API/Key)
|
|
18
|
+
|
|
19
|
+
`--domain, [domain]`
|
|
20
|
+
: Limit the returned breaches only contain results with the domain specified.
|
|
21
|
+
|
|
22
|
+
--8<-- "docs/cmd/_global.md"
|
|
23
|
+
|
|
24
|
+
## Remarks
|
|
25
|
+
|
|
26
|
+
If the user with the specified user name doesn't involved in any breach, you will get a `No pwnage found` message when running in debug or verbose mode.
|
|
27
|
+
|
|
28
|
+
If `API Key` is invalid, you will get a `Required option apiKey not specified` error.
|
|
29
|
+
|
|
30
|
+
## Examples
|
|
31
|
+
|
|
32
|
+
Check if user with user name _account-exists@hibp-integration-tests.com_ is in a data breach
|
|
33
|
+
|
|
34
|
+
```sh
|
|
35
|
+
m365 aad user hibp --userName account-exists@hibp-integration-tests.com --apiKey _YOUR-API-KEY_
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
Check if user with user name _account-exists@hibp-integration-tests.com_ is in a data breach against the domain specified
|
|
39
|
+
|
|
40
|
+
```sh
|
|
41
|
+
m365 aad user hibp --userName account-exists@hibp-integration-tests.com --apiKey _YOUR-API-KEY_ --domain adobe.com
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## More information
|
|
45
|
+
|
|
46
|
+
- Have I been pwned API documentation: [https://haveibeenpwned.com/API/v3](https://haveibeenpwned.com/API/v3)
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
# planner task set
|
|
2
|
+
|
|
3
|
+
Updates a Microsoft Planner task
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
```sh
|
|
8
|
+
m365 planner task set [options]
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Options
|
|
12
|
+
|
|
13
|
+
`-i, --id <id>`
|
|
14
|
+
: ID of the task.
|
|
15
|
+
|
|
16
|
+
`-t, --title [title]`
|
|
17
|
+
: New title of the task.
|
|
18
|
+
|
|
19
|
+
`--bucketId [bucketId]`
|
|
20
|
+
: ID of the bucket to move the task to. Specify either `bucketId` or `bucketName` but not both.
|
|
21
|
+
|
|
22
|
+
`--bucketName [bucketName]`
|
|
23
|
+
: Name of the bucket to move the task to. The bucket needs to exist in the selected plan. Specify either `bucketId` or `bucketName` but not both.
|
|
24
|
+
|
|
25
|
+
`--planId [planId]`
|
|
26
|
+
: ID of the plan to move the task to. Specify either `planId` or `planName` but not both.
|
|
27
|
+
|
|
28
|
+
`--planName [planName]`
|
|
29
|
+
: Name of the plan to move the task to. Specify either `planId` or `planName` but not both.
|
|
30
|
+
|
|
31
|
+
`--ownerGroupId [ownerGroupId]`
|
|
32
|
+
: ID of the group to which the plan belongs. Specify `ownerGroupId` or `ownerGroupName` when using `planName`.
|
|
33
|
+
|
|
34
|
+
`--ownerGroupName [ownerGroupName]`
|
|
35
|
+
: Name of the group to which the plan belongs. Specify `ownerGroupId` or `ownerGroupName` when using `planName`.
|
|
36
|
+
|
|
37
|
+
`--startDateTime [startDateTime]`
|
|
38
|
+
: The date and time when the task started. This should be defined as a valid ISO 8601 string. `2021-12-16T18:28:48.6964197Z`
|
|
39
|
+
|
|
40
|
+
`--dueDateTime [dueDateTime]`
|
|
41
|
+
: The date and time when the task is due. This should be defined as a valid ISO 8601 string. `2021-12-16T18:28:48.6964197Z`
|
|
42
|
+
|
|
43
|
+
`--percentComplete [percentComplete]`
|
|
44
|
+
: Percentage of task completion. Number between 0 and 100.
|
|
45
|
+
|
|
46
|
+
`--assignedToUserIds [assignedToUserIds]`
|
|
47
|
+
: Comma-separated IDs of the assignees that should be added to the task assignment. Specify either `assignedToUserIds` or `assignedToUserNames` but not both.
|
|
48
|
+
|
|
49
|
+
`--assignedToUserNames [assignedToUserNames]`
|
|
50
|
+
: Comma-separated UPNs of the assignees that should be added to the task assignment. Specify either `assignedToUserIds` or `assignedToUserNames` but not both.
|
|
51
|
+
|
|
52
|
+
`--description [description]`
|
|
53
|
+
: Description of the task
|
|
54
|
+
|
|
55
|
+
`--orderHint [orderHint]`
|
|
56
|
+
: Hint used to order items of this type in a list view
|
|
57
|
+
|
|
58
|
+
`--assigneePriority [assigneePriority]`
|
|
59
|
+
: Hint used to order items of this type in a list view
|
|
60
|
+
|
|
61
|
+
`--appliedCategories [appliedCategories]`
|
|
62
|
+
: Comma-separated categories that should be added to the task
|
|
63
|
+
|
|
64
|
+
--8<-- "docs/cmd/_global.md"
|
|
65
|
+
|
|
66
|
+
## Remarks
|
|
67
|
+
|
|
68
|
+
When you specify the value for `percentageComplete`, consider the following:
|
|
69
|
+
|
|
70
|
+
- when set to 0, the task is considered _Not started_
|
|
71
|
+
- when set between 1 and 99, the task is considered _In progress_
|
|
72
|
+
- when set to 100, the task is considered _Completed_
|
|
73
|
+
|
|
74
|
+
You can add up to 6 categories to the task. An example to add _category1_ and _category3_ would be `category1,category3`.
|
|
75
|
+
|
|
76
|
+
## Examples
|
|
77
|
+
|
|
78
|
+
Updates a Microsoft Planner task name to _My Planner Task_ for the task with the ID _Z-RLQGfppU6H3663DBzfs5gAMD3o_
|
|
79
|
+
|
|
80
|
+
```sh
|
|
81
|
+
m365 planner task set --id "Z-RLQGfppU6H3663DBzfs5gAMD3o" --title "My Planner Task"
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
Moves a Microsoft Planner task with the ID _Z-RLQGfppU6H3663DBzfs5gAMD3o_ to the bucket named _My Planner Bucket_. Based on the plan with the name _My Planner Plan_ owned by the group _My Planner Group_
|
|
85
|
+
|
|
86
|
+
```sh
|
|
87
|
+
m365 planner task set --id "2Vf8JHgsBUiIf-nuvBtv-ZgAAYw2" --bucketName "My Planner Bucket" --planName "My Planner Plan" --ownerGroupName "My Planner Group"
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
Marks a Microsoft Planner task with the ID _Z-RLQGfppU6H3663DBzfs5gAMD3o_ as 50% complete and assigned to categories 1 and 3.
|
|
91
|
+
|
|
92
|
+
```sh
|
|
93
|
+
m365 planner task set --id "2Vf8JHgsBUiIf-nuvBtv-ZgAAYw2" --percentComplete 50 --appliedCategories "category1,category3"
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
## Additional information
|
|
97
|
+
|
|
98
|
+
- Using order hints in Planner: [https://docs.microsoft.com/graph/api/resources/planner-order-hint-format?view=graph-rest-1.0](https://docs.microsoft.com/graph/api/resources/planner-order-hint-format?view=graph-rest-1.0)
|
|
99
|
+
- Applied categories in Planner: [https://docs.microsoft.com/graph/api/resources/plannerappliedcategories?view=graph-rest-1.0](https://docs.microsoft.com/en-us/graph/api/resources/plannerappliedcategories?view=graph-rest-1.0)
|
|
@@ -13,24 +13,42 @@ m365 spo group user add [options]
|
|
|
13
13
|
`-u, --webUrl <webUrl>`
|
|
14
14
|
: URL of the site where the SharePoint group is available
|
|
15
15
|
|
|
16
|
-
`--groupId
|
|
17
|
-
: Id of the SharePoint Group to which user needs to be added
|
|
16
|
+
`--groupId [groupId]`
|
|
17
|
+
: Id of the SharePoint Group to which user needs to be added, specify either `groupId` or `groupName`
|
|
18
18
|
|
|
19
|
-
`--
|
|
20
|
-
:
|
|
19
|
+
`--groupName [groupName]`
|
|
20
|
+
: Name of the SharePoint Group to which user needs to be added, specify either `groupId` or `groupName`
|
|
21
|
+
|
|
22
|
+
`--userName [userName]`
|
|
23
|
+
: User's UPN (user principal name, eg. megan.bowen@contoso.com). If multiple users needs to be added, they have to be comma separated (ex. megan.bowen@contoso.com,alex.wilber@contoso.com), specify either `userName` or `email`
|
|
24
|
+
|
|
25
|
+
`--email [email]`
|
|
26
|
+
: User's email (eg. megan.bowen@contoso.com). If multiple users needs to be added, they have to be comma separated (ex. megan.bowen@contoso.com,alex.wilber@contoso.com), specify either `userName` or `email`
|
|
21
27
|
|
|
22
28
|
--8<-- "docs/cmd/_global.md"
|
|
23
29
|
|
|
24
30
|
## Examples
|
|
25
31
|
|
|
26
|
-
Add a user to the SharePoint group with id _5_ available on the web _https://contoso.sharepoint.com/sites/SiteA_
|
|
32
|
+
Add a user with name _Alex.Wilber@contoso.com_ to the SharePoint group with id _5_ available on the web _https://contoso.sharepoint.com/sites/SiteA_
|
|
27
33
|
|
|
28
34
|
```sh
|
|
29
35
|
m365 spo group user add --webUrl https://contoso.sharepoint.com/sites/SiteA --groupId 5 --userName "Alex.Wilber@contoso.com"
|
|
30
36
|
```
|
|
31
37
|
|
|
32
|
-
Add multiple users to the SharePoint group with id _5_ available on the web _https://contoso.sharepoint.com/sites/SiteA_
|
|
38
|
+
Add multiple users by name to the SharePoint group with id _5_ available on the web _https://contoso.sharepoint.com/sites/SiteA_
|
|
33
39
|
|
|
34
40
|
```sh
|
|
35
41
|
m365 spo group user add --webUrl https://contoso.sharepoint.com/sites/SiteA --groupId 5 --userName "Alex.Wilber@contoso.com, Adele.Vance@contoso.com"
|
|
36
42
|
```
|
|
43
|
+
|
|
44
|
+
Add a user with email _Alex.Wilber@contoso.com_ to the SharePoint group with name _Contoso Site Owners_ available on the web _https://contoso.sharepoint.com/sites/SiteA_
|
|
45
|
+
|
|
46
|
+
```sh
|
|
47
|
+
m365 spo group user add --webUrl https://contoso.sharepoint.com/sites/SiteA --groupName "Contoso Site Owners" --email "Alex.Wilber@contoso.com"
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
Add multiple users by email to the SharePoint group with name _Contoso Site Owners_ available on the web _https://contoso.sharepoint.com/sites/SiteA_
|
|
51
|
+
|
|
52
|
+
```sh
|
|
53
|
+
m365 spo group user add --webUrl https://contoso.sharepoint.com/sites/SiteA --groupName "Contoso Site Owners" --email "Alex.Wilber@contoso.com, Adele.Vance@contoso.com"
|
|
54
|
+
```
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# spo site recyclebinitem list
|
|
2
|
+
|
|
3
|
+
Lists items from recycle bin
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
```sh
|
|
8
|
+
m365 spo site recyclebinitem list [options]
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Options
|
|
12
|
+
|
|
13
|
+
`-u, --siteUrl <siteUrl>`
|
|
14
|
+
: URL of the site for which to retrieve the recycle bin items
|
|
15
|
+
|
|
16
|
+
`--type [type]`
|
|
17
|
+
: Type of items which should be retrieved (listItems, folders, files)
|
|
18
|
+
|
|
19
|
+
`--secondary`
|
|
20
|
+
: Use this switch to retrieve items from secondary recycle bin
|
|
21
|
+
|
|
22
|
+
--8<-- "docs/cmd/_global.md"
|
|
23
|
+
|
|
24
|
+
## Remarks
|
|
25
|
+
|
|
26
|
+
When type is not specified then the command will return all items in the recycle bin
|
|
27
|
+
|
|
28
|
+
## Examples
|
|
29
|
+
|
|
30
|
+
Lists all files, items and folders from recycle bin for site _https://contoso.sharepoint.com/site_
|
|
31
|
+
|
|
32
|
+
```sh
|
|
33
|
+
m365 spo site recyclebinitem list --siteUrl https://contoso.sharepoint.com/site
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
Lists only files from recycle bin for site _https://contoso.sharepoint.com/site_
|
|
37
|
+
|
|
38
|
+
```sh
|
|
39
|
+
m365 spo site recyclebinitem list --siteUrl https://contoso.sharepoint.com/site --type files
|
|
40
|
+
```
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# teams chat list
|
|
2
|
+
|
|
3
|
+
Lists all Microsoft Teams chat conversations for the current user.
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
```sh
|
|
8
|
+
m365 teams chat list [options]
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Options
|
|
12
|
+
|
|
13
|
+
`-t, --type [chatType]`
|
|
14
|
+
: The chat type to optionally filter chat conversations by type. The value can be `oneOnOne`, `group` or `meeting`.
|
|
15
|
+
|
|
16
|
+
--8<-- "docs/cmd/_global.md"
|
|
17
|
+
|
|
18
|
+
## Examples
|
|
19
|
+
|
|
20
|
+
List all the Microsoft Teams chat conversations of the current user.
|
|
21
|
+
|
|
22
|
+
```sh
|
|
23
|
+
m365 teams chat list
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
List only the one on one Microsoft Teams chat conversations.
|
|
27
|
+
|
|
28
|
+
```sh
|
|
29
|
+
m365 teams chat list --type oneOnOne
|
|
30
|
+
```
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# teams chat member list
|
|
2
|
+
|
|
3
|
+
Lists all members from a Microsoft Teams chat conversation.
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
```sh
|
|
8
|
+
m365 teams chat member list [options]
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Options
|
|
12
|
+
|
|
13
|
+
`-i, --chatId <chatId>`
|
|
14
|
+
: The ID of the chat conversation
|
|
15
|
+
|
|
16
|
+
--8<-- "docs/cmd/_global.md"
|
|
17
|
+
|
|
18
|
+
## Examples
|
|
19
|
+
|
|
20
|
+
List the members from a Microsoft Teams chat conversation
|
|
21
|
+
|
|
22
|
+
```sh
|
|
23
|
+
m365 teams chat member list --chatId 19:8b081ef6-4792-4def-b2c9-c363a1bf41d5_5031bb31-22c0-4f6f-9f73-91d34ab2b32d@unq.gbl.spaces
|
|
24
|
+
```
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# teams chat message list
|
|
2
|
+
|
|
3
|
+
Lists all messages from a Microsoft Teams chat conversation.
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
```sh
|
|
8
|
+
m365 teams chat message list [options]
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Options
|
|
12
|
+
|
|
13
|
+
`-i, --chatId <chatId>`
|
|
14
|
+
: The ID of the chat conversation
|
|
15
|
+
|
|
16
|
+
--8<-- "docs/cmd/_global.md"
|
|
17
|
+
|
|
18
|
+
## Examples
|
|
19
|
+
|
|
20
|
+
List the messages from a Microsoft Teams chat conversation
|
|
21
|
+
|
|
22
|
+
```sh
|
|
23
|
+
m365 teams chat message list --chatId 19:2da4c29f6d7041eca70b638b43d45437@thread.v2
|
|
24
|
+
```
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pnp/cli-microsoft365",
|
|
3
|
-
"version": "5.0.0-beta.
|
|
3
|
+
"version": "5.0.0-beta.ae24497",
|
|
4
4
|
"description": "Manage Microsoft 365 and SharePoint Framework projects on any platform",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -122,6 +122,7 @@
|
|
|
122
122
|
"Laskewitz, Daniel <daniel@laskewitz.nl>",
|
|
123
123
|
"Lengelle, Veronique <25181757+veronicageek@users.noreply.github.com>",
|
|
124
124
|
"Levert, Sebastien <slevert@outlook.com>",
|
|
125
|
+
"Lingstuyl, Martin <martin@i4-you.com>",
|
|
125
126
|
"Maillot, Michaël <battosaimykle@gmail.com>",
|
|
126
127
|
"Mastykarz, Waldek <waldek@mastykarz.nl>",
|
|
127
128
|
"McDonnell, Kevin <kevin@mcd79.com>",
|