@pnp/cli-microsoft365 6.10.0-beta.f43fa4d → 6.11.0-beta.69fd6f4
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/planner/commands/roster/roster-member-add.js +3 -14
- package/dist/m365/teams/commands/meeting/meeting-get.js +16 -24
- package/dist/m365/teams/commands/meeting/meeting-list.js +2 -15
- package/docs/docs/cmd/aad/user/user-set.mdx +1 -1
- package/docs/docs/cmd/flow/flow-enable.mdx +2 -2
- package/docs/docs/cmd/pp/dataverse/dataverse-table-get.mdx +2 -2
- package/docs/docs/cmd/pp/dataverse/dataverse-table-list.mdx +2 -2
- package/docs/docs/cmd/pp/dataverse/dataverse-table-remove.mdx +3 -3
- package/docs/docs/cmd/spo/file/file-retentionlabel-ensure.mdx +1 -1
- package/docs/docs/cmd/spo/listitem/listitem-attachment-list.mdx +1 -1
- package/docs/docs/cmd/spo/tenant/tenant-applicationcustomizer-add.mdx +1 -1
- package/docs/docs/cmd/spo/tenant/tenant-applicationcustomizer-list.mdx +1 -1
- package/docs/docs/cmd/spo/tenant/tenant-applicationcustomizer-remove.mdx +1 -1
- package/docs/docs/cmd/spo/tenant/tenant-commandset-add.mdx +1 -1
- package/docs/docs/cmd/spo/tenant/tenant-commandset-remove.mdx +1 -1
- package/docs/docs/cmd/spo/tenant/tenant-commandset-set.mdx +1 -1
- package/docs/docs/cmd/yammer/network/network-list.mdx +1 -1
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
|
@@ -19,8 +19,7 @@ const request_1 = require("../../../../request");
|
|
|
19
19
|
const validation_1 = require("../../../../utils/validation");
|
|
20
20
|
const GraphCommand_1 = require("../../../base/GraphCommand");
|
|
21
21
|
const commands_1 = require("../../commands");
|
|
22
|
-
const
|
|
23
|
-
const Cli_1 = require("../../../../cli/Cli");
|
|
22
|
+
const aadUser_1 = require("../../../../utils/aadUser");
|
|
24
23
|
class PlannerRosterMemberAddCommand extends GraphCommand_1.default {
|
|
25
24
|
get name() {
|
|
26
25
|
return commands_1.default.ROSTER_MEMBER_ADD;
|
|
@@ -69,18 +68,8 @@ class PlannerRosterMemberAddCommand extends GraphCommand_1.default {
|
|
|
69
68
|
if (args.options.userId) {
|
|
70
69
|
return args.options.userId;
|
|
71
70
|
}
|
|
72
|
-
const
|
|
73
|
-
|
|
74
|
-
output: 'json',
|
|
75
|
-
debug: args.options.debug,
|
|
76
|
-
verbose: args.options.verbose
|
|
77
|
-
};
|
|
78
|
-
const aadUserGetOutput = yield Cli_1.Cli.executeCommandWithOutput(AadUserGetCommand, { options: Object.assign(Object.assign({}, aadUserGetCommandoptions), { _: [] }) });
|
|
79
|
-
if (this.verbose) {
|
|
80
|
-
logger.logToStderr(aadUserGetOutput.stderr);
|
|
81
|
-
}
|
|
82
|
-
const aadUserGetJsonOutput = JSON.parse(aadUserGetOutput.stdout);
|
|
83
|
-
return aadUserGetJsonOutput.id;
|
|
71
|
+
const userId = yield aadUser_1.aadUser.getUserIdByUpn(args.options.userName);
|
|
72
|
+
return userId;
|
|
84
73
|
});
|
|
85
74
|
}
|
|
86
75
|
}
|
|
@@ -16,13 +16,13 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
16
16
|
var _TeamsMeetingGetCommand_instances, _TeamsMeetingGetCommand_initTelemetry, _TeamsMeetingGetCommand_initOptions, _TeamsMeetingGetCommand_initValidators;
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
18
|
const Auth_1 = require("../../../../Auth");
|
|
19
|
-
const Cli_1 = require("../../../../cli/Cli");
|
|
20
19
|
const request_1 = require("../../../../request");
|
|
21
20
|
const GraphCommand_1 = require("../../../base/GraphCommand");
|
|
22
21
|
const commands_1 = require("../../commands");
|
|
23
22
|
const validation_1 = require("../../../../utils/validation");
|
|
24
23
|
const accessToken_1 = require("../../../../utils/accessToken");
|
|
25
|
-
const
|
|
24
|
+
const aadUser_1 = require("../../../../utils/aadUser");
|
|
25
|
+
const formatting_1 = require("../../../../utils/formatting");
|
|
26
26
|
class TeamsMeetingGetCommand extends GraphCommand_1.default {
|
|
27
27
|
get name() {
|
|
28
28
|
return commands_1.default.MEETING_GET;
|
|
@@ -37,20 +37,6 @@ class TeamsMeetingGetCommand extends GraphCommand_1.default {
|
|
|
37
37
|
__classPrivateFieldGet(this, _TeamsMeetingGetCommand_instances, "m", _TeamsMeetingGetCommand_initOptions).call(this);
|
|
38
38
|
__classPrivateFieldGet(this, _TeamsMeetingGetCommand_instances, "m", _TeamsMeetingGetCommand_initValidators).call(this);
|
|
39
39
|
}
|
|
40
|
-
getUserId(options) {
|
|
41
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
42
|
-
const commandOptions = {
|
|
43
|
-
email: options.email,
|
|
44
|
-
userName: options.userName,
|
|
45
|
-
output: 'json',
|
|
46
|
-
debug: this.debug,
|
|
47
|
-
verbose: this.verbose
|
|
48
|
-
};
|
|
49
|
-
const output = yield Cli_1.Cli.executeCommandWithOutput(AadUserGetCommand, { options: Object.assign(Object.assign({}, commandOptions), { _: [] }) });
|
|
50
|
-
const getUserOutput = JSON.parse(output.stdout);
|
|
51
|
-
return getUserOutput.id;
|
|
52
|
-
});
|
|
53
|
-
}
|
|
54
40
|
commandAction(logger, args) {
|
|
55
41
|
return __awaiter(this, void 0, void 0, function* () {
|
|
56
42
|
const isAppOnlyAccessToken = accessToken_1.accessToken.isAppOnlyAccessToken(Auth_1.default.service.accessTokens[this.resource].accessToken);
|
|
@@ -71,18 +57,13 @@ class TeamsMeetingGetCommand extends GraphCommand_1.default {
|
|
|
71
57
|
let requestUrl = `${this.resource}/v1.0/`;
|
|
72
58
|
if (isAppOnlyAccessToken) {
|
|
73
59
|
requestUrl += 'users/';
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
}
|
|
77
|
-
else {
|
|
78
|
-
const userId = yield this.getUserId(args.options);
|
|
79
|
-
requestUrl += userId;
|
|
80
|
-
}
|
|
60
|
+
const userId = yield this.getUserId(args.options);
|
|
61
|
+
requestUrl += userId;
|
|
81
62
|
}
|
|
82
63
|
else {
|
|
83
64
|
requestUrl += `me`;
|
|
84
65
|
}
|
|
85
|
-
requestUrl += `/onlineMeetings?$filter=JoinWebUrl eq '${
|
|
66
|
+
requestUrl += `/onlineMeetings?$filter=JoinWebUrl eq '${formatting_1.formatting.encodeQueryParameter(args.options.joinUrl)}'`;
|
|
86
67
|
const requestOptions = {
|
|
87
68
|
url: requestUrl,
|
|
88
69
|
headers: {
|
|
@@ -103,6 +84,17 @@ class TeamsMeetingGetCommand extends GraphCommand_1.default {
|
|
|
103
84
|
}
|
|
104
85
|
});
|
|
105
86
|
}
|
|
87
|
+
getUserId(options) {
|
|
88
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
89
|
+
if (options.userId) {
|
|
90
|
+
return options.userId;
|
|
91
|
+
}
|
|
92
|
+
if (options.userName) {
|
|
93
|
+
return aadUser_1.aadUser.getUserIdByUpn(options.userName);
|
|
94
|
+
}
|
|
95
|
+
return aadUser_1.aadUser.getUserIdByEmail(options.email);
|
|
96
|
+
});
|
|
97
|
+
}
|
|
106
98
|
}
|
|
107
99
|
_TeamsMeetingGetCommand_instances = new WeakSet(), _TeamsMeetingGetCommand_initTelemetry = function _TeamsMeetingGetCommand_initTelemetry() {
|
|
108
100
|
this.telemetry.push((args) => {
|
|
@@ -21,8 +21,8 @@ const GraphCommand_1 = require("../../../base/GraphCommand");
|
|
|
21
21
|
const commands_1 = require("../../commands");
|
|
22
22
|
const odata_1 = require("../../../../utils/odata");
|
|
23
23
|
const validation_1 = require("../../../../utils/validation");
|
|
24
|
-
const AadUserGetCommand = require("../../../aad/commands/user/user-get");
|
|
25
24
|
const accessToken_1 = require("../../../../utils/accessToken");
|
|
25
|
+
const aadUser_1 = require("../../../../utils/aadUser");
|
|
26
26
|
class TeamsMeetingListCommand extends GraphCommand_1.default {
|
|
27
27
|
get name() {
|
|
28
28
|
return commands_1.default.MEETING_LIST;
|
|
@@ -60,7 +60,7 @@ class TeamsMeetingListCommand extends GraphCommand_1.default {
|
|
|
60
60
|
requestUrl += args.options.userName;
|
|
61
61
|
}
|
|
62
62
|
else if (args.options.email) {
|
|
63
|
-
const userId = yield
|
|
63
|
+
const userId = yield aadUser_1.aadUser.getUserIdByEmail(args.options.email);
|
|
64
64
|
requestUrl += userId;
|
|
65
65
|
}
|
|
66
66
|
}
|
|
@@ -98,19 +98,6 @@ class TeamsMeetingListCommand extends GraphCommand_1.default {
|
|
|
98
98
|
}
|
|
99
99
|
});
|
|
100
100
|
}
|
|
101
|
-
getUserId(email) {
|
|
102
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
103
|
-
const options = {
|
|
104
|
-
email: email,
|
|
105
|
-
output: 'json',
|
|
106
|
-
debug: this.debug,
|
|
107
|
-
verbose: this.verbose
|
|
108
|
-
};
|
|
109
|
-
const output = yield Cli_1.Cli.executeCommandWithOutput(AadUserGetCommand, { options: Object.assign(Object.assign({}, options), { _: [] }) });
|
|
110
|
-
const getUserOutput = JSON.parse(output.stdout);
|
|
111
|
-
return getUserOutput.id;
|
|
112
|
-
});
|
|
113
|
-
}
|
|
114
101
|
}
|
|
115
102
|
_TeamsMeetingListCommand_instances = new WeakSet(), _TeamsMeetingListCommand_initTelemetry = function _TeamsMeetingListCommand_initTelemetry() {
|
|
116
103
|
this.telemetry.push((args) => {
|
|
@@ -87,7 +87,7 @@ If the user with the specified ID or username doesn't exist, or if the specified
|
|
|
87
87
|
Update specific property _department_ of user with id _1caf7dcd-7e83-4c3a-94f7-932a1299c844_
|
|
88
88
|
|
|
89
89
|
```sh
|
|
90
|
-
m365 aad user set --objectId 1caf7dcd-7e83-4c3a-94f7-932a1299c844 --
|
|
90
|
+
m365 aad user set --objectId 1caf7dcd-7e83-4c3a-94f7-932a1299c844 --department IT
|
|
91
91
|
```
|
|
92
92
|
|
|
93
93
|
Update multiple properties of user by name
|
|
@@ -44,13 +44,13 @@ If the Power Automate flow with the name you specified doesn't exist, you will g
|
|
|
44
44
|
Enables Power Automate flow owned by the currently signed-in user
|
|
45
45
|
|
|
46
46
|
```sh
|
|
47
|
-
m365 flow enable --
|
|
47
|
+
m365 flow enable --environmentName Default-d87a7535-dd31-4437-bfe1-95340acd55c5 --name 3989cb59-ce1a-4a5c-bb78-257c5c39381d
|
|
48
48
|
```
|
|
49
49
|
|
|
50
50
|
Enables Power Automate flow owned by another user
|
|
51
51
|
|
|
52
52
|
```sh
|
|
53
|
-
m365 flow enable --
|
|
53
|
+
m365 flow enable --environmentName Default-d87a7535-dd31-4437-bfe1-95340acd55c5 --name 3989cb59-ce1a-4a5c-bb78-257c5c39381d --asAdmin
|
|
54
54
|
```
|
|
55
55
|
|
|
56
56
|
## Response
|
|
@@ -32,13 +32,13 @@ m365 pp dataverse table get [options]
|
|
|
32
32
|
List a table for the given environment
|
|
33
33
|
|
|
34
34
|
```sh
|
|
35
|
-
m365 pp dataverse table get
|
|
35
|
+
m365 pp dataverse table get --environment "Default-2ca3eaa5-140f-4175-8261-3272edf9f339" --name "aaduser"
|
|
36
36
|
```
|
|
37
37
|
|
|
38
38
|
List a table for the given environment as Admin
|
|
39
39
|
|
|
40
40
|
```sh
|
|
41
|
-
m365 pp dataverse table get
|
|
41
|
+
m365 pp dataverse table get --environment "Default-2ca3eaa5-140f-4175-8261-3272edf9f339" --name "aaduser" --asAdmin
|
|
42
42
|
```
|
|
43
43
|
|
|
44
44
|
## Response
|
|
@@ -29,13 +29,13 @@ m365 pp dataverse table list [options]
|
|
|
29
29
|
List all tables for the given environment
|
|
30
30
|
|
|
31
31
|
```sh
|
|
32
|
-
m365 pp dataverse table list
|
|
32
|
+
m365 pp dataverse table list --environment "Default-2ca3eaa5-140f-4175-8261-3272edf9f339"
|
|
33
33
|
```
|
|
34
34
|
|
|
35
35
|
List all tables for the given environment as Admin
|
|
36
36
|
|
|
37
37
|
```sh
|
|
38
|
-
m365 pp dataverse table list
|
|
38
|
+
m365 pp dataverse table list --environment "Default-2ca3eaa5-140f-4175-8261-3272edf9f339" --asAdmin
|
|
39
39
|
```
|
|
40
40
|
|
|
41
41
|
## Response
|
|
@@ -33,19 +33,19 @@ m365 pp dataverse table remove [options]
|
|
|
33
33
|
Removes a dataverse table in a given environment
|
|
34
34
|
|
|
35
35
|
```sh
|
|
36
|
-
m365 pp dataverse table remove
|
|
36
|
+
m365 pp dataverse table remove --environment "Default-2ca3eaa5-140f-4175-8261-3272edf9f339" --name "aaduser"
|
|
37
37
|
```
|
|
38
38
|
|
|
39
39
|
Removes a dataverse table in a given environment as Admin
|
|
40
40
|
|
|
41
41
|
```sh
|
|
42
|
-
m365 pp dataverse table remove
|
|
42
|
+
m365 pp dataverse table remove --environment "Default-2ca3eaa5-140f-4175-8261-3272edf9f339" --name "aaduser" --asAdmin
|
|
43
43
|
```
|
|
44
44
|
|
|
45
45
|
Removes a dataverse table in a given environment without prompting for confirmation
|
|
46
46
|
|
|
47
47
|
```sh
|
|
48
|
-
m365 pp dataverse table remove
|
|
48
|
+
m365 pp dataverse table remove --environment "Default-2ca3eaa5-140f-4175-8261-3272edf9f339" --name "aaduser" --confirm
|
|
49
49
|
```
|
|
50
50
|
|
|
51
51
|
## Response
|
|
@@ -19,7 +19,7 @@ m365 spo file retentionlabel ensure [options]
|
|
|
19
19
|
`--fileUrl [fileUrl]`
|
|
20
20
|
: The site- or server-relative URL of the file that should be labelled. Specify either `fileUrl` or `fileId` but not both.
|
|
21
21
|
|
|
22
|
-
|
|
22
|
+
`-i, --fileId [fileId]`
|
|
23
23
|
: The UniqueId (GUID) of the file that should be labelled. Specify either `fileUrl` or `fileId` but not both.
|
|
24
24
|
|
|
25
25
|
`--name <name>`
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pnp/cli-microsoft365",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.11.0",
|
|
4
4
|
"lockfileVersion": 2,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "@pnp/cli-microsoft365",
|
|
9
|
-
"version": "6.
|
|
9
|
+
"version": "6.11.0",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@azure/msal-node": "^1.17.3",
|
package/package.json
CHANGED