@pnp/cli-microsoft365 4.0.0-beta.fa432b6 → 4.1.0-beta.22e5a2d
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/README.md +6 -5
- package/dist/Utils.js +6 -0
- package/dist/cli/Cli.js +1 -1
- package/dist/m365/aad/commands/o365group/o365group-get.js +0 -4
- package/dist/m365/aad/commands/o365group/{o365group-restore.js → o365group-recyclebinitem-restore.js} +10 -10
- package/dist/m365/aad/commands/o365group/o365group-teamify.js +48 -12
- package/dist/m365/aad/commands/serviceprincipal/serviceprincipal-get.js +116 -0
- package/dist/m365/aad/commands/siteclassification/siteclassification-disable.js +2 -2
- package/dist/m365/aad/commands/siteclassification/siteclassification-enable.js +2 -2
- package/dist/m365/aad/commands/siteclassification/siteclassification-get.js +1 -1
- package/dist/m365/aad/commands/siteclassification/siteclassification-set.js +2 -2
- package/dist/m365/aad/commands/user/user-set.js +90 -0
- package/dist/m365/aad/commands.js +4 -1
- package/dist/m365/base/SpoCommand.js +13 -0
- package/dist/m365/pa/commands/connector/connector-export.js +2 -2
- package/dist/m365/spfx/commands/project/project-upgrade/Utils.js +1 -1
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN002017_DEVDEP_microsoft_rush_stack_compiler_3_7.js +2 -2
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN002018_DEVDEP_microsoft_rush_stack_compiler_3_9.js +17 -0
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN015007_FILE_config_copy_assets_json.js +17 -0
- package/dist/m365/spfx/commands/project/project-upgrade/{upgrade-1.13.0-beta.20.js → upgrade-1.13.0-rc.1.js} +43 -25
- package/dist/m365/spfx/commands/project/project-upgrade.js +1 -1
- package/dist/m365/spo/commands/contenttype/contenttype-add.js +21 -1
- package/dist/m365/spo/commands/file/file-list.js +2 -1
- package/dist/m365/teams/commands/channel/channel-list.js +5 -4
- package/dist/m365/teams/commands/conversationmember/conversationmember-add.js +9 -8
- package/dist/m365/teams/commands/conversationmember/conversationmember-list.js +20 -22
- package/dist/m365/teams/commands/team/team-get.js +91 -0
- package/dist/m365/teams/commands/user/user-app-list.js +8 -6
- package/docs/docs/cmd/aad/o365group/{o365group-restore.md → o365group-recyclebinitem-restore.md} +7 -1
- package/docs/docs/cmd/aad/o365group/o365group-teamify.md +12 -3
- package/docs/docs/cmd/aad/serviceprincipal/serviceprincipal-get.md +42 -0
- package/docs/docs/cmd/aad/siteclassification/siteclassification-disable.md +0 -5
- package/docs/docs/cmd/aad/siteclassification/siteclassification-enable.md +0 -5
- package/docs/docs/cmd/aad/siteclassification/siteclassification-get.md +0 -5
- package/docs/docs/cmd/aad/siteclassification/siteclassification-set.md +0 -4
- package/docs/docs/cmd/aad/user/user-set.md +60 -0
- package/docs/docs/cmd/spfx/project/project-upgrade.md +1 -1
- package/docs/docs/cmd/teams/team/team-get.md +33 -0
- package/npm-shrinkwrap.json +485 -481
- package/package.json +20 -20
- package/dist/m365/teams/UserTeamsApp.js +0 -3
|
@@ -4,11 +4,14 @@ const FN001001_DEP_microsoft_sp_core_library_1 = require("./rules/FN001001_DEP_m
|
|
|
4
4
|
const FN001002_DEP_microsoft_sp_lodash_subset_1 = require("./rules/FN001002_DEP_microsoft_sp_lodash_subset");
|
|
5
5
|
const FN001003_DEP_microsoft_sp_office_ui_fabric_core_1 = require("./rules/FN001003_DEP_microsoft_sp_office_ui_fabric_core");
|
|
6
6
|
const FN001004_DEP_microsoft_sp_webpart_base_1 = require("./rules/FN001004_DEP_microsoft_sp_webpart_base");
|
|
7
|
+
const FN001008_DEP_react_1 = require("./rules/FN001008_DEP_react");
|
|
8
|
+
const FN001009_DEP_react_dom_1 = require("./rules/FN001009_DEP_react_dom");
|
|
7
9
|
const FN001011_DEP_microsoft_sp_dialog_1 = require("./rules/FN001011_DEP_microsoft_sp_dialog");
|
|
8
10
|
const FN001012_DEP_microsoft_sp_application_base_1 = require("./rules/FN001012_DEP_microsoft_sp_application_base");
|
|
9
11
|
const FN001013_DEP_microsoft_decorators_1 = require("./rules/FN001013_DEP_microsoft_decorators");
|
|
10
12
|
const FN001014_DEP_microsoft_sp_listview_extensibility_1 = require("./rules/FN001014_DEP_microsoft_sp_listview_extensibility");
|
|
11
13
|
const FN001021_DEP_microsoft_sp_property_pane_1 = require("./rules/FN001021_DEP_microsoft_sp_property_pane");
|
|
14
|
+
const FN001022_DEP_office_ui_fabric_react_1 = require("./rules/FN001022_DEP_office_ui_fabric_react");
|
|
12
15
|
const FN001023_DEP_microsoft_sp_component_base_1 = require("./rules/FN001023_DEP_microsoft_sp_component_base");
|
|
13
16
|
const FN001024_DEP_microsoft_sp_diagnostics_1 = require("./rules/FN001024_DEP_microsoft_sp_diagnostics");
|
|
14
17
|
const FN001025_DEP_microsoft_sp_dynamic_data_1 = require("./rules/FN001025_DEP_microsoft_sp_dynamic_data");
|
|
@@ -23,41 +26,56 @@ const FN002001_DEVDEP_microsoft_sp_build_web_1 = require("./rules/FN002001_DEVDE
|
|
|
23
26
|
const FN002002_DEVDEP_microsoft_sp_module_interfaces_1 = require("./rules/FN002002_DEVDEP_microsoft_sp_module_interfaces");
|
|
24
27
|
const FN002003_DEVDEP_microsoft_sp_webpart_workbench_1 = require("./rules/FN002003_DEVDEP_microsoft_sp_webpart_workbench");
|
|
25
28
|
const FN002009_DEVDEP_microsoft_sp_tslint_rules_1 = require("./rules/FN002009_DEVDEP_microsoft_sp_tslint_rules");
|
|
29
|
+
const FN002015_DEVDEP_types_react_1 = require("./rules/FN002015_DEVDEP_types_react");
|
|
30
|
+
const FN002017_DEVDEP_microsoft_rush_stack_compiler_3_7_1 = require("./rules/FN002017_DEVDEP_microsoft_rush_stack_compiler_3_7");
|
|
31
|
+
const FN002018_DEVDEP_microsoft_rush_stack_compiler_3_9_1 = require("./rules/FN002018_DEVDEP_microsoft_rush_stack_compiler_3_9");
|
|
26
32
|
const FN006004_CFG_PS_developer_1 = require("./rules/FN006004_CFG_PS_developer");
|
|
27
33
|
const FN007002_CFG_S_initialPage_1 = require("./rules/FN007002_CFG_S_initialPage");
|
|
28
34
|
const FN007003_CFG_S_api_1 = require("./rules/FN007003_CFG_S_api");
|
|
35
|
+
const FN008002_CFG_TSL_removeRule_1 = require("./rules/FN008002_CFG_TSL_removeRule");
|
|
29
36
|
const FN010001_YORC_version_1 = require("./rules/FN010001_YORC_version");
|
|
37
|
+
const FN012017_TSC_extends_1 = require("./rules/FN012017_TSC_extends");
|
|
30
38
|
const FN014007_CODE_launch_localWorkbench_1 = require("./rules/FN014007_CODE_launch_localWorkbench");
|
|
39
|
+
const FN015007_FILE_config_copy_assets_json_1 = require("./rules/FN015007_FILE_config_copy_assets_json");
|
|
31
40
|
const FN024001_NPMIGNORE_file_1 = require("./rules/FN024001_NPMIGNORE_file");
|
|
32
41
|
module.exports = [
|
|
33
|
-
new FN001001_DEP_microsoft_sp_core_library_1.FN001001_DEP_microsoft_sp_core_library('1.13.0-
|
|
34
|
-
new FN001002_DEP_microsoft_sp_lodash_subset_1.FN001002_DEP_microsoft_sp_lodash_subset('1.13.0-
|
|
35
|
-
new FN001003_DEP_microsoft_sp_office_ui_fabric_core_1.FN001003_DEP_microsoft_sp_office_ui_fabric_core('1.13.0-
|
|
36
|
-
new FN001004_DEP_microsoft_sp_webpart_base_1.FN001004_DEP_microsoft_sp_webpart_base('1.13.0-
|
|
37
|
-
new
|
|
38
|
-
new
|
|
39
|
-
new
|
|
40
|
-
new
|
|
41
|
-
new
|
|
42
|
-
new
|
|
43
|
-
new
|
|
44
|
-
new
|
|
45
|
-
new
|
|
46
|
-
new
|
|
47
|
-
new
|
|
48
|
-
new
|
|
49
|
-
new
|
|
50
|
-
new
|
|
51
|
-
new
|
|
52
|
-
new
|
|
53
|
-
new
|
|
42
|
+
new FN001001_DEP_microsoft_sp_core_library_1.FN001001_DEP_microsoft_sp_core_library('1.13.0-rc.1'),
|
|
43
|
+
new FN001002_DEP_microsoft_sp_lodash_subset_1.FN001002_DEP_microsoft_sp_lodash_subset('1.13.0-rc.1'),
|
|
44
|
+
new FN001003_DEP_microsoft_sp_office_ui_fabric_core_1.FN001003_DEP_microsoft_sp_office_ui_fabric_core('1.13.0-rc.1'),
|
|
45
|
+
new FN001004_DEP_microsoft_sp_webpart_base_1.FN001004_DEP_microsoft_sp_webpart_base('1.13.0-rc.1'),
|
|
46
|
+
new FN001008_DEP_react_1.FN001008_DEP_react('16.13.1'),
|
|
47
|
+
new FN001009_DEP_react_dom_1.FN001009_DEP_react_dom('16.13.1'),
|
|
48
|
+
new FN001011_DEP_microsoft_sp_dialog_1.FN001011_DEP_microsoft_sp_dialog('1.13.0-rc.1'),
|
|
49
|
+
new FN001012_DEP_microsoft_sp_application_base_1.FN001012_DEP_microsoft_sp_application_base('1.13.0-rc.1'),
|
|
50
|
+
new FN001013_DEP_microsoft_decorators_1.FN001013_DEP_microsoft_decorators('1.13.0-rc.1'),
|
|
51
|
+
new FN001014_DEP_microsoft_sp_listview_extensibility_1.FN001014_DEP_microsoft_sp_listview_extensibility('1.13.0-rc.1'),
|
|
52
|
+
new FN001021_DEP_microsoft_sp_property_pane_1.FN001021_DEP_microsoft_sp_property_pane('1.13.0-rc.1'),
|
|
53
|
+
new FN001022_DEP_office_ui_fabric_react_1.FN001022_DEP_office_ui_fabric_react('7.174.1'),
|
|
54
|
+
new FN001023_DEP_microsoft_sp_component_base_1.FN001023_DEP_microsoft_sp_component_base('1.13.0-rc.1'),
|
|
55
|
+
new FN001024_DEP_microsoft_sp_diagnostics_1.FN001024_DEP_microsoft_sp_diagnostics('1.13.0-rc.1'),
|
|
56
|
+
new FN001025_DEP_microsoft_sp_dynamic_data_1.FN001025_DEP_microsoft_sp_dynamic_data('1.13.0-rc.1'),
|
|
57
|
+
new FN001026_DEP_microsoft_sp_extension_base_1.FN001026_DEP_microsoft_sp_extension_base('1.13.0-rc.1'),
|
|
58
|
+
new FN001027_DEP_microsoft_sp_http_1.FN001027_DEP_microsoft_sp_http('1.13.0-rc.1'),
|
|
59
|
+
new FN001028_DEP_microsoft_sp_list_subscription_1.FN001028_DEP_microsoft_sp_list_subscription('1.13.0-rc.1'),
|
|
60
|
+
new FN001029_DEP_microsoft_sp_loader_1.FN001029_DEP_microsoft_sp_loader('1.13.0-rc.1'),
|
|
61
|
+
new FN001030_DEP_microsoft_sp_module_interfaces_1.FN001030_DEP_microsoft_sp_module_interfaces('1.13.0-rc.1'),
|
|
62
|
+
new FN001031_DEP_microsoft_sp_odata_types_1.FN001031_DEP_microsoft_sp_odata_types('1.13.0-rc.1'),
|
|
63
|
+
new FN001032_DEP_microsoft_sp_page_context_1.FN001032_DEP_microsoft_sp_page_context('1.13.0-rc.1'),
|
|
64
|
+
new FN002001_DEVDEP_microsoft_sp_build_web_1.FN002001_DEVDEP_microsoft_sp_build_web('1.13.0-rc.1'),
|
|
65
|
+
new FN002002_DEVDEP_microsoft_sp_module_interfaces_1.FN002002_DEVDEP_microsoft_sp_module_interfaces('1.13.0-rc.1'),
|
|
54
66
|
new FN002003_DEVDEP_microsoft_sp_webpart_workbench_1.FN002003_DEVDEP_microsoft_sp_webpart_workbench('', false),
|
|
55
|
-
new FN002009_DEVDEP_microsoft_sp_tslint_rules_1.FN002009_DEVDEP_microsoft_sp_tslint_rules('1.13.0-
|
|
56
|
-
new
|
|
67
|
+
new FN002009_DEVDEP_microsoft_sp_tslint_rules_1.FN002009_DEVDEP_microsoft_sp_tslint_rules('1.13.0-rc.1'),
|
|
68
|
+
new FN002015_DEVDEP_types_react_1.FN002015_DEVDEP_types_react('16.9.51'),
|
|
69
|
+
new FN002017_DEVDEP_microsoft_rush_stack_compiler_3_7_1.FN002017_DEVDEP_microsoft_rush_stack_compiler_3_7('', false),
|
|
70
|
+
new FN002018_DEVDEP_microsoft_rush_stack_compiler_3_9_1.FN002018_DEVDEP_microsoft_rush_stack_compiler_3_9('0.4.47'),
|
|
71
|
+
new FN006004_CFG_PS_developer_1.FN006004_CFG_PS_developer('1.13.0-rc.1'),
|
|
57
72
|
new FN007002_CFG_S_initialPage_1.FN007002_CFG_S_initialPage('https://enter-your-SharePoint-site/_layouts/workbench.aspx'),
|
|
58
73
|
new FN007003_CFG_S_api_1.FN007003_CFG_S_api(),
|
|
59
|
-
new
|
|
74
|
+
new FN008002_CFG_TSL_removeRule_1.FN008002_CFG_TSL_removeRule('no-use-before-declare'),
|
|
75
|
+
new FN010001_YORC_version_1.FN010001_YORC_version('1.13.0-rc.1'),
|
|
76
|
+
new FN012017_TSC_extends_1.FN012017_TSC_extends('./node_modules/@microsoft/rush-stack-compiler-3.9/includes/tsconfig-web.json'),
|
|
60
77
|
new FN014007_CODE_launch_localWorkbench_1.FN014007_CODE_launch_localWorkbench(),
|
|
78
|
+
new FN015007_FILE_config_copy_assets_json_1.FN015007_FILE_config_copy_assets_json(false),
|
|
61
79
|
new FN024001_NPMIGNORE_file_1.FN024001_NPMIGNORE_file()
|
|
62
80
|
];
|
|
63
|
-
//# sourceMappingURL=upgrade-1.13.0-
|
|
81
|
+
//# sourceMappingURL=upgrade-1.13.0-rc.1.js.map
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const cli_1 = require("../../../../cli");
|
|
3
4
|
const Command_1 = require("../../../../Command");
|
|
4
5
|
const config_1 = require("../../../../config");
|
|
5
6
|
const request_1 = require("../../../../request");
|
|
6
7
|
const Utils_1 = require("../../../../Utils");
|
|
7
8
|
const SpoCommand_1 = require("../../../base/SpoCommand");
|
|
8
9
|
const commands_1 = require("../../commands");
|
|
10
|
+
const SpoContentTypeGetCommand = require("./contenttype-get");
|
|
9
11
|
class SpoContentTypeAddCommand extends SpoCommand_1.default {
|
|
10
12
|
get name() {
|
|
11
13
|
return commands_1.default.CONTENTTYPE_ADD;
|
|
@@ -52,7 +54,25 @@ class SpoContentTypeAddCommand extends SpoCommand_1.default {
|
|
|
52
54
|
cb(new Command_1.CommandError(response.ErrorInfo.ErrorMessage));
|
|
53
55
|
return;
|
|
54
56
|
}
|
|
55
|
-
|
|
57
|
+
const options = {
|
|
58
|
+
webUrl: args.options.webUrl,
|
|
59
|
+
listTitle: args.options.listTitle,
|
|
60
|
+
id: args.options.id,
|
|
61
|
+
output: 'json',
|
|
62
|
+
debug: this.debug,
|
|
63
|
+
verbose: this.verbose
|
|
64
|
+
};
|
|
65
|
+
cli_1.Cli.executeCommandWithOutput(SpoContentTypeGetCommand, { options: Object.assign(Object.assign({}, options), { _: [] }) })
|
|
66
|
+
.then((res) => {
|
|
67
|
+
if (this.debug) {
|
|
68
|
+
logger.logToStderr(res.stderr);
|
|
69
|
+
}
|
|
70
|
+
logger.log(JSON.parse(res.stdout));
|
|
71
|
+
cb();
|
|
72
|
+
}, (err) => {
|
|
73
|
+
cb(err.error);
|
|
74
|
+
});
|
|
75
|
+
return;
|
|
56
76
|
}, (err) => this.handleRejectedPromise(err, logger, cb));
|
|
57
77
|
}
|
|
58
78
|
getParentInfo(listTitle, webUrl, logger) {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const request_1 = require("../../../../request");
|
|
4
|
+
const Utils_1 = require("../../../../Utils");
|
|
4
5
|
const SpoCommand_1 = require("../../../base/SpoCommand");
|
|
5
6
|
const commands_1 = require("../../commands");
|
|
6
7
|
class SpoFileListCommand extends SpoCommand_1.default {
|
|
@@ -23,7 +24,7 @@ class SpoFileListCommand extends SpoCommand_1.default {
|
|
|
23
24
|
getFiles(folderUrl, args, files = { value: [] }) {
|
|
24
25
|
// If --recursive option is specified, retrieve both Files and Folder details, otherwise only Files.
|
|
25
26
|
const expandParameters = args.options.recursive ? 'Files,Folders' : 'Files';
|
|
26
|
-
let requestUrl = `${args.options.webUrl}/_api/web/GetFolderByServerRelativeUrl('${
|
|
27
|
+
let requestUrl = `${args.options.webUrl}/_api/web/GetFolderByServerRelativeUrl('${Utils_1.default.encodeQueryParameter(folderUrl)}')?$expand=${expandParameters}`;
|
|
27
28
|
if (args.options.output !== 'json') {
|
|
28
29
|
requestUrl += '&$select=Files/UniqueId,Files/Name,Files/ServerRelativeUrl';
|
|
29
30
|
}
|
|
@@ -25,7 +25,7 @@ class TeamsChannelListCommand extends GraphItemsListCommand_1.GraphItemsListComm
|
|
|
25
25
|
return Promise.resolve(args.options.teamId);
|
|
26
26
|
}
|
|
27
27
|
const requestOptions = {
|
|
28
|
-
url: `${this.resource}/
|
|
28
|
+
url: `${this.resource}/v1.0/groups?$filter=displayName eq '${encodeURIComponent(args.options.teamName)}'`,
|
|
29
29
|
headers: {
|
|
30
30
|
accept: 'application/json;odata.metadata=none'
|
|
31
31
|
},
|
|
@@ -34,12 +34,13 @@ class TeamsChannelListCommand extends GraphItemsListCommand_1.GraphItemsListComm
|
|
|
34
34
|
return request_1.default
|
|
35
35
|
.get(requestOptions)
|
|
36
36
|
.then(response => {
|
|
37
|
-
const
|
|
37
|
+
const filteredResponseByTeam = response.value.filter(t => t.resourceProvisioningOptions.includes('Team'));
|
|
38
|
+
const groupItem = filteredResponseByTeam[0];
|
|
38
39
|
if (!groupItem) {
|
|
39
40
|
return Promise.reject(`The specified team does not exist in the Microsoft Teams`);
|
|
40
41
|
}
|
|
41
|
-
if (
|
|
42
|
-
return Promise.reject(`Multiple Microsoft Teams teams with name ${args.options.teamName} found: ${
|
|
42
|
+
if (filteredResponseByTeam.length > 1) {
|
|
43
|
+
return Promise.reject(`Multiple Microsoft Teams teams with name ${args.options.teamName} found: ${filteredResponseByTeam.map(x => x.id)}`);
|
|
43
44
|
}
|
|
44
45
|
return Promise.resolve(groupItem.id);
|
|
45
46
|
});
|
|
@@ -121,25 +121,26 @@ class TeamsConversationMemberAddCommand extends GraphCommand_1.default {
|
|
|
121
121
|
if (args.options.teamId) {
|
|
122
122
|
return Promise.resolve(args.options.teamId);
|
|
123
123
|
}
|
|
124
|
-
const
|
|
125
|
-
url: `${this.resource}/
|
|
124
|
+
const requestOptions = {
|
|
125
|
+
url: `${this.resource}/v1.0/groups?$filter=displayName eq '${encodeURIComponent(args.options.teamName)}'`,
|
|
126
126
|
headers: {
|
|
127
127
|
accept: 'application/json;odata.metadata=none'
|
|
128
128
|
},
|
|
129
129
|
responseType: 'json'
|
|
130
130
|
};
|
|
131
131
|
return request_1.default
|
|
132
|
-
.get(
|
|
132
|
+
.get(requestOptions)
|
|
133
133
|
.then(response => {
|
|
134
|
-
const
|
|
135
|
-
|
|
134
|
+
const filteredResponseByTeam = response.value.filter(t => t.resourceProvisioningOptions.includes('Team'));
|
|
135
|
+
const groupItem = filteredResponseByTeam[0];
|
|
136
|
+
if (!groupItem) {
|
|
136
137
|
return Promise.reject(`The specified team '${args.options.teamName}' does not exist in Microsoft Teams`);
|
|
137
138
|
}
|
|
138
|
-
if (
|
|
139
|
+
if (filteredResponseByTeam.length > 1) {
|
|
139
140
|
return Promise.reject(`Multiple Microsoft Teams with name '${args.options.teamName}' found. Please disambiguate:${os.EOL}${response.value.map(x => `- ${x.id}`).join(os.EOL)}`);
|
|
140
141
|
}
|
|
141
|
-
return Promise.resolve(
|
|
142
|
-
}
|
|
142
|
+
return Promise.resolve(groupItem.id);
|
|
143
|
+
});
|
|
143
144
|
}
|
|
144
145
|
getChannelId(teamId, args) {
|
|
145
146
|
if (args.options.channelId) {
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const request_1 = require("../../../../request");
|
|
4
|
+
const Utils_1 = require("../../../../Utils");
|
|
4
5
|
const GraphItemsListCommand_1 = require("../../../base/GraphItemsListCommand");
|
|
5
6
|
const commands_1 = require("../../commands");
|
|
6
|
-
const Utils_1 = require("../../../../Utils");
|
|
7
|
-
const os = require("os");
|
|
8
7
|
class TeamsConversationMemberListCommand extends GraphItemsListCommand_1.GraphItemsListCommand {
|
|
9
8
|
constructor() {
|
|
10
9
|
super(...arguments);
|
|
@@ -93,26 +92,25 @@ class TeamsConversationMemberListCommand extends GraphItemsListCommand_1.GraphIt
|
|
|
93
92
|
if (args.options.teamId) {
|
|
94
93
|
return Promise.resolve(args.options.teamId);
|
|
95
94
|
}
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
}, err => { reject(err); });
|
|
95
|
+
const requestOptions = {
|
|
96
|
+
url: `${this.resource}/v1.0/groups?$filter=displayName eq '${encodeURIComponent(args.options.teamName)}'`,
|
|
97
|
+
headers: {
|
|
98
|
+
accept: 'application/json;odata.metadata=none'
|
|
99
|
+
},
|
|
100
|
+
responseType: 'json'
|
|
101
|
+
};
|
|
102
|
+
return request_1.default
|
|
103
|
+
.get(requestOptions)
|
|
104
|
+
.then(response => {
|
|
105
|
+
const filteredResponseByTeam = response.value.filter(t => t.resourceProvisioningOptions.includes('Team'));
|
|
106
|
+
const groupItem = filteredResponseByTeam[0];
|
|
107
|
+
if (!groupItem) {
|
|
108
|
+
return Promise.reject(`The specified team '${args.options.teamName}' does not exist in the Microsoft Teams`);
|
|
109
|
+
}
|
|
110
|
+
if (filteredResponseByTeam.length > 1) {
|
|
111
|
+
return Promise.reject(`Multiple Microsoft Teams teams with name '${args.options.teamName}' found: ${filteredResponseByTeam.map(x => x.id)}`);
|
|
112
|
+
}
|
|
113
|
+
return Promise.resolve(groupItem.id);
|
|
116
114
|
});
|
|
117
115
|
}
|
|
118
116
|
getChannelId(teamId, args) {
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const request_1 = require("../../../../request");
|
|
4
|
+
const Utils_1 = require("../../../../Utils");
|
|
5
|
+
const GraphCommand_1 = require("../../../base/GraphCommand");
|
|
6
|
+
const commands_1 = require("../../commands");
|
|
7
|
+
class TeamsTeamGetCommand extends GraphCommand_1.default {
|
|
8
|
+
get name() {
|
|
9
|
+
return commands_1.default.TEAM_GET;
|
|
10
|
+
}
|
|
11
|
+
get description() {
|
|
12
|
+
return 'Retrieve information about the specified Microsoft Team';
|
|
13
|
+
}
|
|
14
|
+
getTelemetryProperties(args) {
|
|
15
|
+
const telemetryProps = super.getTelemetryProperties(args);
|
|
16
|
+
telemetryProps.id = typeof args.options.id !== 'undefined';
|
|
17
|
+
telemetryProps.name = typeof args.options.name !== 'undefined';
|
|
18
|
+
return telemetryProps;
|
|
19
|
+
}
|
|
20
|
+
getTeamId(args) {
|
|
21
|
+
if (args.options.id) {
|
|
22
|
+
return Promise.resolve(args.options.id);
|
|
23
|
+
}
|
|
24
|
+
const requestOptions = {
|
|
25
|
+
url: `${this.resource}/v1.0/groups?$filter=displayName eq '${encodeURIComponent(args.options.name)}'&$select=id,resourceProvisioningOptions`,
|
|
26
|
+
headers: {
|
|
27
|
+
accept: 'application/json;odata.metadata=none'
|
|
28
|
+
},
|
|
29
|
+
responseType: 'json'
|
|
30
|
+
};
|
|
31
|
+
return request_1.default
|
|
32
|
+
.get(requestOptions)
|
|
33
|
+
.then(response => {
|
|
34
|
+
const groupItem = response.value[0];
|
|
35
|
+
if (!groupItem) {
|
|
36
|
+
return Promise.reject(`The specified team does not exist in the Microsoft Teams`);
|
|
37
|
+
}
|
|
38
|
+
if (groupItem.resourceProvisioningOptions.indexOf('Team') === -1) {
|
|
39
|
+
return Promise.reject(`The specified team does not exist in the Microsoft Teams`);
|
|
40
|
+
}
|
|
41
|
+
if (response.value.length >= 2) {
|
|
42
|
+
return Promise.reject(`Multiple Microsoft Teams teams with name ${args.options.name} found: ${response.value.map(x => x.id)}`);
|
|
43
|
+
}
|
|
44
|
+
return Promise.resolve(groupItem.id);
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
commandAction(logger, args, cb) {
|
|
48
|
+
this
|
|
49
|
+
.getTeamId(args)
|
|
50
|
+
.then((teamId) => {
|
|
51
|
+
const requestOptions = {
|
|
52
|
+
url: `${this.resource}/v1.0/teams/${encodeURIComponent(teamId)}`,
|
|
53
|
+
headers: {
|
|
54
|
+
accept: 'application/json;odata.metadata=none'
|
|
55
|
+
},
|
|
56
|
+
responseType: 'json'
|
|
57
|
+
};
|
|
58
|
+
return request_1.default.get(requestOptions);
|
|
59
|
+
})
|
|
60
|
+
.then((res) => {
|
|
61
|
+
logger.log(res);
|
|
62
|
+
cb();
|
|
63
|
+
}, (err) => this.handleRejectedODataJsonPromise(err, logger, cb));
|
|
64
|
+
}
|
|
65
|
+
options() {
|
|
66
|
+
const options = [
|
|
67
|
+
{
|
|
68
|
+
option: '-i, --id [id]'
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
option: '-n, --name [name]'
|
|
72
|
+
}
|
|
73
|
+
];
|
|
74
|
+
const parentOptions = super.options();
|
|
75
|
+
return options.concat(parentOptions);
|
|
76
|
+
}
|
|
77
|
+
validate(args) {
|
|
78
|
+
if (args.options.id && args.options.name) {
|
|
79
|
+
return 'Specify either teamId or teamName, but not both.';
|
|
80
|
+
}
|
|
81
|
+
if (!args.options.id && !args.options.name) {
|
|
82
|
+
return 'Specify teamId or teamName, one is required';
|
|
83
|
+
}
|
|
84
|
+
if (args.options.id && !Utils_1.default.isValidGuid(args.options.id)) {
|
|
85
|
+
return `${args.options.id} is not a valid GUID`;
|
|
86
|
+
}
|
|
87
|
+
return true;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
module.exports = new TeamsTeamGetCommand();
|
|
91
|
+
//# sourceMappingURL=team-get.js.map
|
|
@@ -23,7 +23,7 @@ class TeamsUserAppListCommand extends GraphItemsListCommand_1.GraphItemsListComm
|
|
|
23
23
|
.getUserId(args)
|
|
24
24
|
.then((_userId) => {
|
|
25
25
|
userId = _userId.value;
|
|
26
|
-
const endpoint = `${this.resource}/v1.0/users/${encodeURIComponent(userId)}/teamwork/installedApps`;
|
|
26
|
+
const endpoint = `${this.resource}/v1.0/users/${encodeURIComponent(userId)}/teamwork/installedApps?$expand=teamsAppDefinition`;
|
|
27
27
|
return this.getAllItems(endpoint, logger, true);
|
|
28
28
|
})
|
|
29
29
|
.then(() => {
|
|
@@ -39,7 +39,9 @@ class TeamsUserAppListCommand extends GraphItemsListCommand_1.GraphItemsListComm
|
|
|
39
39
|
logger.log(this.items.map(i => {
|
|
40
40
|
return {
|
|
41
41
|
id: i.id,
|
|
42
|
-
appId: i.appId
|
|
42
|
+
appId: i.appId,
|
|
43
|
+
displayName: i.teamsAppDefinition.displayName,
|
|
44
|
+
version: i.teamsAppDefinition.version
|
|
43
45
|
};
|
|
44
46
|
}));
|
|
45
47
|
}
|
|
@@ -62,10 +64,10 @@ class TeamsUserAppListCommand extends GraphItemsListCommand_1.GraphItemsListComm
|
|
|
62
64
|
options() {
|
|
63
65
|
const options = [
|
|
64
66
|
{
|
|
65
|
-
option: '--userId'
|
|
67
|
+
option: '--userId [userId]'
|
|
66
68
|
},
|
|
67
69
|
{
|
|
68
|
-
option: '--userName'
|
|
70
|
+
option: '--userName [userName]'
|
|
69
71
|
}
|
|
70
72
|
];
|
|
71
73
|
const parentOptions = super.options();
|
|
@@ -73,10 +75,10 @@ class TeamsUserAppListCommand extends GraphItemsListCommand_1.GraphItemsListComm
|
|
|
73
75
|
}
|
|
74
76
|
validate(args) {
|
|
75
77
|
if (!args.options.userId && !args.options.userName) {
|
|
76
|
-
return
|
|
78
|
+
return `userId or userName need to be provided`;
|
|
77
79
|
}
|
|
78
80
|
if (args.options.userId && args.options.userName) {
|
|
79
|
-
return `Please specify either
|
|
81
|
+
return `Please specify either userId or userName, not both`;
|
|
80
82
|
}
|
|
81
83
|
if (args.options.userId && !Utils_1.default.isValidGuid(args.options.userId)) {
|
|
82
84
|
return `${args.options.userId} is not a valid GUID`;
|
package/docs/docs/cmd/aad/o365group/{o365group-restore.md → o365group-recyclebinitem-restore.md}
RENAMED
|
@@ -4,6 +4,12 @@ Restores a deleted Microsoft 365 Group
|
|
|
4
4
|
|
|
5
5
|
## Usage
|
|
6
6
|
|
|
7
|
+
```sh
|
|
8
|
+
m365 aad o365group recyclebinitem restore [options]
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Alias
|
|
12
|
+
|
|
7
13
|
```sh
|
|
8
14
|
m365 aad o365group restore [options]
|
|
9
15
|
```
|
|
@@ -20,5 +26,5 @@ m365 aad o365group restore [options]
|
|
|
20
26
|
Restores the Microsoft 365 Group with id _28beab62-7540-4db1-a23f-29a6018a3848_
|
|
21
27
|
|
|
22
28
|
```sh
|
|
23
|
-
m365 aad o365group restore --id 28beab62-7540-4db1-a23f-29a6018a3848
|
|
29
|
+
m365 aad o365group recyclebinitem restore --id 28beab62-7540-4db1-a23f-29a6018a3848
|
|
24
30
|
```
|
|
@@ -10,15 +10,24 @@ m365 aad o365group teamify [options]
|
|
|
10
10
|
|
|
11
11
|
## Options
|
|
12
12
|
|
|
13
|
-
`-i, --groupId
|
|
14
|
-
: The ID of the Microsoft 365 Group to connect to Microsoft Teams
|
|
13
|
+
`-i, --groupId [groupId]`
|
|
14
|
+
: The ID of the Microsoft 365 Group to connect to Microsoft Teams. Specify either groupId or mailNickname but not both
|
|
15
|
+
|
|
16
|
+
`--mailNickname [mailNickname]`
|
|
17
|
+
: The mail alias of the Microsoft 365 Group to connect to Microsoft Teams. Specify either groupId or mailNickname but not both
|
|
15
18
|
|
|
16
19
|
--8<-- "docs/cmd/_global.md"
|
|
17
20
|
|
|
18
21
|
## Examples
|
|
19
22
|
|
|
20
|
-
Creates a new Microsoft Teams team under existing Microsoft 365 group
|
|
23
|
+
Creates a new Microsoft Teams team under existing Microsoft 365 group with id _e3f60f99-0bad-481f-9e9f-ff0f572fbd03_
|
|
21
24
|
|
|
22
25
|
```sh
|
|
23
26
|
m365 aad o365group teamify --groupId e3f60f99-0bad-481f-9e9f-ff0f572fbd03
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
Creates a new Microsoft Teams team under existing Microsoft 365 group with mailNickname _GroupName_
|
|
30
|
+
|
|
31
|
+
```sh
|
|
32
|
+
m365 aad o365group teamify --mailNickname GroupName
|
|
24
33
|
```
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# aad serviceprincipal get
|
|
2
|
+
|
|
3
|
+
Retrieves a service principal from Azure AD directory
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
```sh
|
|
8
|
+
m365 aad serviceprincipal get
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Options
|
|
12
|
+
|
|
13
|
+
`-i, --id [id]`
|
|
14
|
+
: The ID of the service principal to retrieve information for. Specify either `id`, `appId` or `name`
|
|
15
|
+
|
|
16
|
+
`-n, --name [name]`
|
|
17
|
+
: The display name of the service principal to retrieve information for. Specify either `id`, `appId` or `name`
|
|
18
|
+
|
|
19
|
+
`--appId [appId]`
|
|
20
|
+
: The appId of the service principal to retrieve information for. Specify either `id` or `appId` or `name`
|
|
21
|
+
|
|
22
|
+
--8<-- "docs/cmd/_global.md"
|
|
23
|
+
|
|
24
|
+
## Examples
|
|
25
|
+
|
|
26
|
+
Get information about the service principal with id _1caf7dcd-7e83-4c3a-94f7-932a1299c843_
|
|
27
|
+
|
|
28
|
+
```sh
|
|
29
|
+
m365 aad serviceprincipal get --id 1caf7dcd-7e83-4c3a-94f7-932a1299c843
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
Get information about service principal with name _ServicePrincipal App_
|
|
33
|
+
|
|
34
|
+
```sh
|
|
35
|
+
m365 aad serviceprincipal get --name "ServicePrincipal App"
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
Get information about service principal with appId _8a2a376d-5f57-4c14-9639-692f841c00bc_
|
|
39
|
+
|
|
40
|
+
```sh
|
|
41
|
+
m365 aad serviceprincipal get --appId "8a2a376d-5f57-4c14-9639-692f841c00bc"
|
|
42
|
+
```
|
|
@@ -15,11 +15,6 @@ m365 aad siteclassification disable [options]
|
|
|
15
15
|
|
|
16
16
|
--8<-- "docs/cmd/_global.md"
|
|
17
17
|
|
|
18
|
-
## Remarks
|
|
19
|
-
|
|
20
|
-
!!! attention
|
|
21
|
-
This command is based on an API that is currently in preview and is subject to change once the API reached general availability.
|
|
22
|
-
|
|
23
18
|
## Examples
|
|
24
19
|
|
|
25
20
|
Disable site classification
|
|
@@ -24,11 +24,6 @@ m365 aad siteclassification enable [options]
|
|
|
24
24
|
|
|
25
25
|
--8<-- "docs/cmd/_global.md"
|
|
26
26
|
|
|
27
|
-
## Remarks
|
|
28
|
-
|
|
29
|
-
!!! attention
|
|
30
|
-
This command is based on an API that is currently in preview and is subject to change once the API reached general availability.
|
|
31
|
-
|
|
32
27
|
## Examples
|
|
33
28
|
|
|
34
29
|
Enable site classification
|
|
@@ -12,11 +12,6 @@ m365 aad siteclassification get [options]
|
|
|
12
12
|
|
|
13
13
|
--8<-- "docs/cmd/_global.md"
|
|
14
14
|
|
|
15
|
-
## Remarks
|
|
16
|
-
|
|
17
|
-
!!! attention
|
|
18
|
-
This command is based on an API that is currently in preview and is subject to change once the API reached general availability.
|
|
19
|
-
|
|
20
15
|
## Examples
|
|
21
16
|
|
|
22
17
|
Get information about the Microsoft 365 Tenant site classification
|
|
@@ -24,10 +24,6 @@ m365 aad siteclassification set [options]
|
|
|
24
24
|
|
|
25
25
|
--8<-- "docs/cmd/_global.md"
|
|
26
26
|
|
|
27
|
-
## Remarks
|
|
28
|
-
|
|
29
|
-
!!! attention
|
|
30
|
-
This command is based on an API that is currently in preview and is subject to change once the API reached general availability.
|
|
31
27
|
|
|
32
28
|
## Examples
|
|
33
29
|
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# aad user set
|
|
2
|
+
|
|
3
|
+
Updates information of the specified user
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
```sh
|
|
8
|
+
m365 aad user set [options]
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Options
|
|
12
|
+
|
|
13
|
+
`-i, --objectId [objectId]`
|
|
14
|
+
: The object ID of the user to update. Specify `objectId` or `userPrincipalName` but not both
|
|
15
|
+
|
|
16
|
+
`-n, --userPrincipalName [userPrincipalName]`
|
|
17
|
+
: User principal name of the user to update. Specify `objectId` or `userPrincipalName` but not both
|
|
18
|
+
|
|
19
|
+
`--accountEnabled [accountEnabled]`
|
|
20
|
+
: Boolean value specifying whether the account is enabled. Valid values are `true,false`
|
|
21
|
+
|
|
22
|
+
--8<-- "docs/cmd/_global.md"
|
|
23
|
+
|
|
24
|
+
## Remarks
|
|
25
|
+
|
|
26
|
+
You can update information of a user, either by specifying that user's id (`objectId`) or user name (`userPrincipalName`), but not both.
|
|
27
|
+
|
|
28
|
+
If the user with the specified id or user name doesn't exist, you will get a `Resource 'xyz' does not exist or one of its queried reference-property objects are not present.` error.
|
|
29
|
+
|
|
30
|
+
## Examples
|
|
31
|
+
|
|
32
|
+
Update specific property _department_ of user with id _1caf7dcd-7e83-4c3a-94f7-932a1299c844_
|
|
33
|
+
|
|
34
|
+
```sh
|
|
35
|
+
m365 aad user set --objectId 1caf7dcd-7e83-4c3a-94f7-932a1299c844 --Department IT
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
Update multiple properties of user with name _steve@contoso.onmicrosoft.com_
|
|
39
|
+
|
|
40
|
+
```sh
|
|
41
|
+
m365 aad user set --userPrincipalName steve@contoso.onmicrosoft.com --Department "Sales & Marketing" --CompanyName Contoso
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
Enable user with id _1caf7dcd-7e83-4c3a-94f7-932a1299c844_
|
|
45
|
+
|
|
46
|
+
```sh
|
|
47
|
+
m365 aad user set --objectId 1caf7dcd-7e83-4c3a-94f7-932a1299c844 --accountEnabled true
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
Disable user with id _1caf7dcd-7e83-4c3a-94f7-932a1299c844_
|
|
51
|
+
|
|
52
|
+
```sh
|
|
53
|
+
m365 aad user set --objectId 1caf7dcd-7e83-4c3a-94f7-932a1299c844 --accountEnabled false
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
Enable user with id _1caf7dcd-7e83-4c3a-94f7-932a1299c844_
|
|
57
|
+
|
|
58
|
+
```sh
|
|
59
|
+
m365 aad user set --objectId 1caf7dcd-7e83-4c3a-94f7-932a1299c844 --accountEnabled true
|
|
60
|
+
```
|
|
@@ -32,7 +32,7 @@ m365 spfx project upgrade [options]
|
|
|
32
32
|
|
|
33
33
|
## Remarks
|
|
34
34
|
|
|
35
|
-
The `spfx project upgrade` command helps you upgrade your SharePoint Framework project to the specified version. If no version is specified, the command will upgrade to the latest version of the SharePoint Framework it supports (v1.12.1). If you specify the `preview` option without a specific version, the command will upgrade your project to the latest preview version v1.13.0-
|
|
35
|
+
The `spfx project upgrade` command helps you upgrade your SharePoint Framework project to the specified version. If no version is specified, the command will upgrade to the latest version of the SharePoint Framework it supports (v1.12.1). If you specify the `preview` option without a specific version, the command will upgrade your project to the latest preview version v1.13.0-rc.1.
|
|
36
36
|
|
|
37
37
|
This command doesn't change your project files. Instead, it gives you a report with all steps necessary to upgrade your project to the specified version of the SharePoint Framework. Changing project files is error-prone, especially when it comes to updating your solution's code. This is why at this moment, this command produces a report that you can use yourself to perform the necessary updates and verify that everything is working as expected.
|
|
38
38
|
|