@pnp/cli-microsoft365 6.9.0-beta.1cd2525 → 6.9.0-beta.3158148
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/.devcontainer/Dockerfile +12 -19
- package/.devcontainer/devcontainer.json +24 -17
- package/Dockerfile +3 -1
- package/dist/Auth.js +2 -8
- package/dist/AuthServer.js +2 -4
- package/dist/cli/Cli.js +2 -2
- package/dist/m365/aad/commands/app/app-add.js +258 -249
- package/dist/m365/aad/commands/app/app-get.js +65 -62
- package/dist/m365/aad/commands/app/app-remove.js +22 -23
- package/dist/m365/aad/commands/app/app-role-add.js +35 -34
- package/dist/m365/aad/commands/app/app-role-list.js +22 -23
- package/dist/m365/aad/commands/app/app-role-remove.js +76 -73
- package/dist/m365/aad/commands/app/app-set.js +103 -103
- package/dist/m365/aad/commands/approleassignment/approleassignment-add.js +16 -14
- package/dist/m365/aad/commands/approleassignment/approleassignment-list.js +43 -52
- package/dist/m365/aad/commands/approleassignment/approleassignment-remove.js +20 -16
- package/dist/m365/aad/commands/o365group/o365group-add.js +40 -37
- package/dist/m365/aad/commands/o365group/o365group-conversation-post-list.js +7 -6
- package/dist/m365/aad/commands/o365group/o365group-list.js +6 -11
- package/dist/m365/aad/commands/o365group/o365group-recyclebinitem-clear.js +7 -8
- package/dist/m365/aad/commands/o365group/o365group-recyclebinitem-restore.js +23 -24
- package/dist/m365/aad/commands/o365group/o365group-set.js +15 -20
- package/dist/m365/aad/commands/o365group/o365group-teamify.js +15 -16
- package/dist/m365/aad/commands/o365group/o365group-user-list.js +17 -10
- package/dist/m365/aad/commands/o365group/o365group-user-set.js +17 -10
- package/dist/m365/aad/commands/policy/policy-list.js +12 -13
- package/dist/m365/aad/commands/siteclassification/siteclassification-enable.js +1 -3
- package/dist/m365/aad/commands/siteclassification/siteclassification-set.js +19 -20
- package/dist/m365/aad/commands/sp/sp-add.js +22 -23
- package/dist/m365/aad/commands/sp/sp-get.js +22 -23
- package/dist/m365/aad/commands/sp/sp-list.js +78 -0
- package/dist/m365/aad/commands.js +1 -0
- package/dist/m365/app/commands/app-open.js +4 -14
- package/dist/m365/base/AzmgmtItemsListCommand.js +31 -33
- package/dist/m365/cli/commands/cli-issue.js +4 -10
- package/dist/m365/cli/commands/cli-reconsent.js +2 -8
- package/dist/m365/cli/commands/config/config-set.js +0 -1
- package/dist/m365/commands/docs.js +2 -8
- package/dist/m365/commands/login.js +20 -0
- package/dist/m365/flow/commands/flow-list.js +30 -12
- package/dist/m365/flow/commands/flow-remove.js +2 -3
- package/dist/m365/flow/commands/run/run-resubmit.js +11 -10
- package/dist/m365/onedrive/commands/onedrive-list.js +21 -32
- package/dist/m365/outlook/commands/message/message-list.js +18 -23
- package/dist/m365/outlook/commands/message/message-move.js +15 -20
- package/dist/m365/pa/commands/app/app-export.js +3 -4
- package/dist/m365/pa/commands/app/app-get.js +11 -9
- package/dist/m365/pa/commands/app/app-remove.js +1 -1
- package/dist/m365/pa/commands/pcf/pcf-init.js +1 -2
- package/dist/m365/pa/commands/solution/solution-init.js +1 -2
- package/dist/m365/pa/commands/solution/solution-reference-add.js +1 -2
- package/dist/m365/pp/commands/managementapp/managementapp-add.js +19 -20
- package/dist/m365/purview/commands/retentionevent/retentionevent-add.js +3 -3
- package/dist/m365/purview/commands/retentionevent/retentionevent-get.js +1 -1
- package/dist/m365/purview/commands/retentionevent/retentionevent-list.js +1 -1
- package/dist/m365/purview/commands/retentionevent/retentionevent-remove.js +1 -1
- package/dist/m365/purview/commands/retentioneventtype/retentioneventtype-add.js +1 -1
- package/dist/m365/purview/commands/retentioneventtype/retentioneventtype-get.js +1 -1
- package/dist/m365/purview/commands/retentioneventtype/retentioneventtype-list.js +1 -1
- package/dist/m365/purview/commands/retentioneventtype/retentioneventtype-remove.js +1 -1
- package/dist/m365/purview/commands/retentioneventtype/retentioneventtype-set.js +1 -1
- package/dist/m365/spfx/commands/project/project-doctor/doctor-1.17.3.js +25 -0
- package/dist/m365/spfx/commands/project/project-doctor.js +2 -1
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN002027_DEVDEP_fluentui_react.js +14 -0
- package/dist/m365/spfx/commands/project/project-upgrade/upgrade-1.17.3.js +59 -0
- package/dist/m365/spfx/commands/project/project-upgrade.js +2 -1
- package/dist/m365/spfx/commands/spfx-doctor.js +15 -0
- package/dist/m365/spo/commands/app/app-teamspackage-download.js +17 -24
- package/dist/m365/spo/commands/apppage/apppage-set.js +1 -1
- package/dist/m365/spo/commands/contenttype/contenttype-field-set.js +65 -94
- package/dist/m365/spo/commands/customaction/customaction-clear.js +4 -12
- package/dist/m365/spo/commands/customaction/customaction-remove.js +12 -23
- package/dist/m365/spo/commands/customaction/customaction-set.js +21 -29
- package/dist/m365/spo/commands/file/file-add.js +133 -133
- package/dist/m365/spo/commands/file/file-checkout-undo.js +119 -0
- package/dist/m365/spo/commands/file/file-rename.js +11 -9
- package/dist/m365/spo/commands/file/file-retentionlabel-ensure.js +2 -2
- package/dist/m365/spo/commands/file/file-roleassignment-add.js +41 -61
- package/dist/m365/spo/commands/file/file-roleassignment-remove.js +3 -0
- package/dist/m365/spo/commands/file/file-roleinheritance-break.js +3 -0
- package/dist/m365/spo/commands/file/file-roleinheritance-reset.js +3 -0
- package/dist/m365/spo/commands/file/file-sharinginfo-get.js +23 -21
- package/dist/m365/spo/commands/file/file-version-clear.js +1 -1
- package/dist/m365/spo/commands/file/file-version-remove.js +1 -1
- package/dist/m365/spo/commands/file/file-version-restore.js +1 -1
- package/dist/m365/spo/commands/folder/folder-roleassignment-add.js +3 -3
- package/dist/m365/spo/commands/folder/folder-roleassignment-remove.js +1 -1
- package/dist/m365/spo/commands/group/group-member-add.js +17 -16
- package/dist/m365/spo/commands/group/group-set.js +20 -20
- package/dist/m365/spo/commands/homesite/homesite-remove.js +1 -1
- package/dist/m365/spo/commands/hubsite/hubsite-get.js +33 -31
- package/dist/m365/spo/commands/hubsite/hubsite-list.js +18 -29
- package/dist/m365/spo/commands/hubsite/hubsite-unregister.js +3 -0
- package/dist/m365/spo/commands/list/list-add.js +1 -1
- package/dist/m365/spo/commands/list/list-contenttype-default-set.js +1 -1
- package/dist/m365/spo/commands/list/list-roleassignment-add.js +45 -52
- package/dist/m365/spo/commands/list/list-roleassignment-remove.js +33 -38
- package/dist/m365/spo/commands/list/list-sensitivitylabel-ensure.js +13 -3
- package/dist/m365/spo/commands/list/list-view-field-add.js +12 -10
- package/dist/m365/spo/commands/list/list-view-field-remove.js +12 -10
- package/dist/m365/spo/commands/list/list-view-field-set.js +12 -10
- package/dist/m365/spo/commands/list/list-view-remove.js +3 -0
- package/dist/m365/spo/commands/listitem/listitem-roleassignment-add.js +41 -61
- package/dist/m365/spo/commands/listitem/listitem-roleassignment-remove.js +71 -74
- package/dist/m365/spo/commands/listitem/listitem-roleinheritance-break.js +36 -34
- package/dist/m365/spo/commands/listitem/listitem-roleinheritance-reset.js +32 -30
- package/dist/m365/spo/commands/navigation/navigation-node-remove.js +24 -22
- package/dist/m365/spo/commands/orgassetslibrary/orgassetslibrary-remove.js +29 -27
- package/dist/m365/spo/commands/orgnewssite/orgnewssite-remove.js +26 -24
- package/dist/m365/spo/commands/page/page-clientsidewebpart-add.js +34 -40
- package/dist/m365/spo/commands/sitedesign/sitedesign-task-remove.js +23 -21
- package/dist/m365/spo/commands/sitescript/sitescript-remove.js +24 -22
- package/dist/m365/spo/commands/spo-search.js +7 -15
- package/dist/m365/spo/commands/storageentity/storageentity-remove.js +29 -27
- package/dist/m365/spo/commands/tenant/tenant-applicationcustomizer-set.js +156 -0
- package/dist/m365/spo/commands.js +2 -0
- package/dist/m365/teams/commands/app/app-install.js +23 -21
- package/dist/m365/teams/commands/app/app-remove.js +3 -0
- package/dist/m365/teams/commands/app/app-uninstall.js +3 -0
- package/dist/m365/teams/commands/app/app-update.js +15 -16
- package/dist/m365/teams/commands/channel/channel-add.js +40 -39
- package/dist/m365/teams/commands/channel/channel-get.js +23 -25
- package/dist/m365/teams/commands/channel/channel-list.js +6 -7
- package/dist/m365/teams/commands/channel/channel-member-add.js +61 -60
- package/dist/m365/teams/commands/channel/channel-member-list.js +20 -22
- package/dist/m365/teams/commands/channel/channel-member-remove.js +43 -48
- package/dist/m365/teams/commands/channel/channel-member-set.js +36 -39
- package/dist/m365/teams/commands/channel/channel-remove.js +4 -1
- package/dist/m365/teams/commands/funsettings/funsettings-list.js +3 -0
- package/dist/m365/teams/commands/funsettings/funsettings-set.js +3 -0
- package/dist/m365/teams/commands/tab/tab-get.js +34 -37
- package/dist/m365/teams/commands/team/team-archive.js +6 -7
- package/dist/m365/teams/commands/team/team-get.js +6 -7
- package/dist/m365/teams/commands/team/team-list.js +9 -11
- package/dist/m365/teams/commands/team/team-remove.js +6 -7
- package/dist/m365/teams/commands/team/team-unarchive.js +6 -7
- package/dist/m365/teams/commands/user/user-app-list.js +13 -11
- package/dist/m365/teams/commands/user/user-list.js +7 -4
- package/dist/m365/tenant/commands/security/security-alerts-list.js +25 -26
- package/dist/m365/tenant/commands/serviceannouncement/serviceannouncement-health-list.js +13 -14
- package/dist/m365/todo/commands/list/list-remove.js +39 -36
- package/dist/m365/todo/commands/list/list-set.js +16 -14
- package/dist/m365/todo/commands/task/task-add.js +14 -14
- package/dist/m365/util/commands/accesstoken/accesstoken-get.js +10 -7
- package/dist/settingsNames.js +0 -1
- package/dist/utils/browserUtil.js +23 -0
- package/docs/docs/cmd/aad/sp/sp-list.mdx +162 -0
- package/docs/docs/cmd/flow/flow-list.mdx +15 -0
- package/docs/docs/cmd/login.mdx +39 -0
- package/docs/docs/cmd/setup.mdx +2 -0
- package/docs/docs/cmd/spfx/project/project-upgrade.mdx +1 -1
- package/docs/docs/cmd/spo/file/file-checkout-undo.mdx +55 -0
- package/docs/docs/cmd/spo/file/file-retentionlabel-ensure.mdx +1 -1
- package/docs/docs/cmd/spo/folder/folder-retentionlabel-ensure.mdx +1 -1
- package/docs/docs/cmd/spo/list/list-sensitivitylabel-ensure.mdx +14 -5
- package/docs/docs/cmd/spo/tenant/tenant-applicationcustomizer-set.mdx +81 -0
- package/docs/docs/cmd/spo/tenant/tenant-settings-set.mdx +6 -0
- package/docs/docs/cmd/status.mdx +6 -3
- package/docs/docs/cmd/util/accesstoken/accesstoken-get.mdx +12 -2
- package/npm-shrinkwrap.json +299 -272
- package/package.json +17 -17
- package/dist/m365/aad/commands/approleassignment/AppRoleAssignment.js +0 -3
- package/dist/m365/aad/commands/approleassignment/ServicePrincipal.js +0 -3
- package/dist/m365/aad/commands/groupsetting/GroupSetting.js +0 -3
- package/dist/m365/aad/commands/groupsettingtemplate/GroupSettingTemplate.js +0 -3
- package/dist/m365/aad/commands/siteclassification/DirectorySetting.js +0 -10
- package/dist/m365/aad/commands/siteclassification/DirectorySettingTemplatesRsp.js +0 -3
- package/dist/m365/aad/commands/siteclassification/DirectorySettingValue.js +0 -3
- package/dist/m365/outlook/Message.js +0 -3
- package/dist/m365/spo/commands/site/SitePermission.js +0 -3
- package/dist/m365/teams/Channel.js +0 -3
- package/dist/m365/teams/ConversationMember.js +0 -3
- package/dist/m365/teams/Message.js +0 -3
- package/dist/m365/teams/Reply.js +0 -3
- package/dist/m365/teams/Tab.js +0 -3
- package/dist/m365/teams/Team.js +0 -3
- package/dist/m365/teams/TeamsApp.js +0 -3
- package/dist/m365/teams/TeamsAppInstallation.js +0 -3
- package/dist/m365/teams/TeamsTabConfiguration.js +0 -3
- package/dist/m365/teams/commands/Meeting.js +0 -3
|
@@ -47,36 +47,35 @@ class TenantSecurityAlertsListCommand extends GraphCommand_1.default {
|
|
|
47
47
|
});
|
|
48
48
|
}
|
|
49
49
|
listAlert(options) {
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
50
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
51
|
+
let queryFilter = '';
|
|
52
|
+
if (options.vendor) {
|
|
53
|
+
let vendorName = options.vendor;
|
|
54
|
+
switch (options.vendor.toLowerCase()) {
|
|
55
|
+
case 'azure security center':
|
|
56
|
+
vendorName = 'ASC';
|
|
57
|
+
break;
|
|
58
|
+
case 'microsoft cloud app security':
|
|
59
|
+
vendorName = 'MCAS';
|
|
60
|
+
break;
|
|
61
|
+
case 'azure active directory identity protection':
|
|
62
|
+
vendorName = 'IPC';
|
|
63
|
+
}
|
|
64
|
+
queryFilter = `?$filter=vendorInformation/provider eq '${formatting_1.formatting.encodeQueryParameter(vendorName)}'`;
|
|
62
65
|
}
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
};
|
|
72
|
-
return request_1.default
|
|
73
|
-
.get(requestOptions)
|
|
74
|
-
.then(response => {
|
|
66
|
+
const requestOptions = {
|
|
67
|
+
url: `${this.resource}/v1.0/security/alerts${queryFilter}`,
|
|
68
|
+
headers: {
|
|
69
|
+
accept: 'application/json;odata.metadata=none'
|
|
70
|
+
},
|
|
71
|
+
responseType: 'json'
|
|
72
|
+
};
|
|
73
|
+
const response = yield request_1.default.get(requestOptions);
|
|
75
74
|
const alertList = response.value;
|
|
76
75
|
if (!alertList) {
|
|
77
|
-
|
|
76
|
+
throw `Error fetching security alerts`;
|
|
78
77
|
}
|
|
79
|
-
return
|
|
78
|
+
return alertList;
|
|
80
79
|
});
|
|
81
80
|
}
|
|
82
81
|
}
|
|
@@ -37,8 +37,8 @@ class TenantServiceAnnouncementHealthListCommand extends GraphCommand_1.default
|
|
|
37
37
|
commandAction(logger, args) {
|
|
38
38
|
return __awaiter(this, void 0, void 0, function* () {
|
|
39
39
|
try {
|
|
40
|
-
const
|
|
41
|
-
logger.log(
|
|
40
|
+
const response = yield this.listServiceHealth(args.options);
|
|
41
|
+
logger.log(response);
|
|
42
42
|
}
|
|
43
43
|
catch (err) {
|
|
44
44
|
this.handleRejectedODataJsonPromise(err);
|
|
@@ -46,21 +46,20 @@ class TenantServiceAnnouncementHealthListCommand extends GraphCommand_1.default
|
|
|
46
46
|
});
|
|
47
47
|
}
|
|
48
48
|
listServiceHealth(options) {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
.get(requestOptions)
|
|
58
|
-
.then(response => {
|
|
49
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
50
|
+
const requestOptions = {
|
|
51
|
+
url: `${this.resource}/v1.0/admin/serviceAnnouncement/healthOverviews${options.issues && (!options.output || options.output.toLocaleLowerCase() === 'json') ? '?$expand=issues' : ''}`,
|
|
52
|
+
headers: {
|
|
53
|
+
accept: 'application/json;odata.metadata=none'
|
|
54
|
+
},
|
|
55
|
+
responseType: 'json'
|
|
56
|
+
};
|
|
57
|
+
const response = yield request_1.default.get(requestOptions);
|
|
59
58
|
const serviceHealthList = response.value;
|
|
60
59
|
if (!serviceHealthList) {
|
|
61
|
-
|
|
60
|
+
throw `Error fetching service health`;
|
|
62
61
|
}
|
|
63
|
-
return
|
|
62
|
+
return serviceHealthList;
|
|
64
63
|
});
|
|
65
64
|
}
|
|
66
65
|
}
|
|
@@ -35,42 +35,8 @@ class TodoListRemoveCommand extends GraphCommand_1.default {
|
|
|
35
35
|
}
|
|
36
36
|
commandAction(logger, args) {
|
|
37
37
|
return __awaiter(this, void 0, void 0, function* () {
|
|
38
|
-
const getListId = () => __awaiter(this, void 0, void 0, function* () {
|
|
39
|
-
if (args.options.name) {
|
|
40
|
-
// Search list by its name
|
|
41
|
-
const requestOptions = {
|
|
42
|
-
url: `${this.resource}/v1.0/me/todo/lists?$filter=displayName eq '${escape(args.options.name)}'`,
|
|
43
|
-
headers: {
|
|
44
|
-
accept: "application/json;odata.metadata=none"
|
|
45
|
-
},
|
|
46
|
-
responseType: 'json'
|
|
47
|
-
};
|
|
48
|
-
const response = yield request_1.default.get(requestOptions);
|
|
49
|
-
return response.value && response.value.length === 1 ? response.value[0].id : null;
|
|
50
|
-
}
|
|
51
|
-
return args.options.id;
|
|
52
|
-
});
|
|
53
|
-
const removeList = () => __awaiter(this, void 0, void 0, function* () {
|
|
54
|
-
try {
|
|
55
|
-
const listId = yield getListId();
|
|
56
|
-
if (!listId) {
|
|
57
|
-
return Promise.reject(`The list ${args.options.name} cannot be found`);
|
|
58
|
-
}
|
|
59
|
-
const requestOptions = {
|
|
60
|
-
url: `${this.resource}/v1.0/me/todo/lists/${listId}`,
|
|
61
|
-
headers: {
|
|
62
|
-
accept: "application/json;odata.metadata=none"
|
|
63
|
-
},
|
|
64
|
-
responseType: 'json'
|
|
65
|
-
};
|
|
66
|
-
yield request_1.default.delete(requestOptions);
|
|
67
|
-
}
|
|
68
|
-
catch (err) {
|
|
69
|
-
this.handleRejectedODataJsonPromise(err);
|
|
70
|
-
}
|
|
71
|
-
});
|
|
72
38
|
if (args.options.confirm) {
|
|
73
|
-
yield removeList();
|
|
39
|
+
yield this.removeList(args);
|
|
74
40
|
}
|
|
75
41
|
else {
|
|
76
42
|
const result = yield Cli_1.Cli.prompt({
|
|
@@ -80,11 +46,48 @@ class TodoListRemoveCommand extends GraphCommand_1.default {
|
|
|
80
46
|
message: `Are you sure you want to remove the task list ${args.options.id || args.options.name}?`
|
|
81
47
|
});
|
|
82
48
|
if (result.continue) {
|
|
83
|
-
yield removeList();
|
|
49
|
+
yield this.removeList(args);
|
|
84
50
|
}
|
|
85
51
|
}
|
|
86
52
|
});
|
|
87
53
|
}
|
|
54
|
+
getListId(args) {
|
|
55
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
56
|
+
if (args.options.id) {
|
|
57
|
+
return args.options.id;
|
|
58
|
+
}
|
|
59
|
+
const requestOptions = {
|
|
60
|
+
url: `${this.resource}/v1.0/me/todo/lists?$filter=displayName eq '${escape(args.options.name)}'`,
|
|
61
|
+
headers: {
|
|
62
|
+
accept: "application/json;odata.metadata=none"
|
|
63
|
+
},
|
|
64
|
+
responseType: 'json'
|
|
65
|
+
};
|
|
66
|
+
const response = yield request_1.default.get(requestOptions);
|
|
67
|
+
return response.value && response.value.length === 1 ? response.value[0].id : null;
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
removeList(args) {
|
|
71
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
72
|
+
try {
|
|
73
|
+
const listId = yield this.getListId(args);
|
|
74
|
+
if (!listId) {
|
|
75
|
+
throw `The list ${args.options.name} cannot be found`;
|
|
76
|
+
}
|
|
77
|
+
const requestOptions = {
|
|
78
|
+
url: `${this.resource}/v1.0/me/todo/lists/${listId}`,
|
|
79
|
+
headers: {
|
|
80
|
+
accept: "application/json;odata.metadata=none"
|
|
81
|
+
},
|
|
82
|
+
responseType: 'json'
|
|
83
|
+
};
|
|
84
|
+
yield request_1.default.delete(requestOptions);
|
|
85
|
+
}
|
|
86
|
+
catch (err) {
|
|
87
|
+
this.handleRejectedODataJsonPromise(err);
|
|
88
|
+
}
|
|
89
|
+
});
|
|
90
|
+
}
|
|
88
91
|
}
|
|
89
92
|
_TodoListRemoveCommand_instances = new WeakSet(), _TodoListRemoveCommand_initTelemetry = function _TodoListRemoveCommand_initTelemetry() {
|
|
90
93
|
this.telemetry.push((args) => {
|
|
@@ -60,20 +60,22 @@ class TodoListSetCommand extends GraphCommand_1.default {
|
|
|
60
60
|
});
|
|
61
61
|
}
|
|
62
62
|
getListId(args) {
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
.
|
|
76
|
-
|
|
63
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
64
|
+
const endpoint = `${this.resource}/v1.0`;
|
|
65
|
+
if (args.options.id) {
|
|
66
|
+
return args.options.id;
|
|
67
|
+
}
|
|
68
|
+
const requestOptions = {
|
|
69
|
+
url: `${endpoint}/me/todo/lists?$filter=displayName eq '${escape(args.options.name)}'`,
|
|
70
|
+
headers: {
|
|
71
|
+
accept: "application/json;odata.metadata=none"
|
|
72
|
+
},
|
|
73
|
+
responseType: 'json'
|
|
74
|
+
};
|
|
75
|
+
return request_1.default
|
|
76
|
+
.get(requestOptions)
|
|
77
|
+
.then((response) => response.value && response.value.length === 1 ? response.value[0].id : null);
|
|
78
|
+
});
|
|
77
79
|
}
|
|
78
80
|
}
|
|
79
81
|
_TodoListSetCommand_instances = new WeakSet(), _TodoListSetCommand_initTelemetry = function _TodoListSetCommand_initTelemetry() {
|
|
@@ -81,23 +81,23 @@ class TodoTaskAddCommand extends GraphCommand_1.default {
|
|
|
81
81
|
};
|
|
82
82
|
}
|
|
83
83
|
getTodoListId(args) {
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
84
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
85
|
+
if (args.options.listId) {
|
|
86
|
+
return args.options.listId;
|
|
87
|
+
}
|
|
88
|
+
const requestOptions = {
|
|
89
|
+
url: `${this.resource}/v1.0/me/todo/lists?$filter=displayName eq '${escape(args.options.listName)}'`,
|
|
90
|
+
headers: {
|
|
91
|
+
accept: 'application/json;odata.metadata=none'
|
|
92
|
+
},
|
|
93
|
+
responseType: 'json'
|
|
94
|
+
};
|
|
95
|
+
const response = yield request_1.default.get(requestOptions);
|
|
96
96
|
const taskList = response.value[0];
|
|
97
97
|
if (!taskList) {
|
|
98
|
-
|
|
98
|
+
throw `The specified task list does not exist`;
|
|
99
99
|
}
|
|
100
|
-
return
|
|
100
|
+
return taskList.id;
|
|
101
101
|
});
|
|
102
102
|
}
|
|
103
103
|
}
|
|
@@ -34,15 +34,18 @@ class UtilAccessTokenGetCommand extends Command_1.default {
|
|
|
34
34
|
commandAction(logger, args) {
|
|
35
35
|
return __awaiter(this, void 0, void 0, function* () {
|
|
36
36
|
let resource = args.options.resource;
|
|
37
|
-
|
|
38
|
-
if (
|
|
39
|
-
|
|
37
|
+
try {
|
|
38
|
+
if (resource.toLowerCase() === 'sharepoint') {
|
|
39
|
+
if (Auth_1.default.service.spoUrl) {
|
|
40
|
+
resource = Auth_1.default.service.spoUrl;
|
|
41
|
+
}
|
|
42
|
+
else {
|
|
43
|
+
throw `SharePoint URL undefined. Use the 'm365 spo set --url https://contoso.sharepoint.com' command to set the URL`;
|
|
44
|
+
}
|
|
40
45
|
}
|
|
41
|
-
else {
|
|
42
|
-
|
|
46
|
+
else if (resource.toLowerCase() === 'graph') {
|
|
47
|
+
resource = Auth_1.Auth.getEndpointForResource('https://graph.microsoft.com', Auth_1.default.service.cloudType);
|
|
43
48
|
}
|
|
44
|
-
}
|
|
45
|
-
try {
|
|
46
49
|
const accessToken = yield Auth_1.default.ensureAccessToken(resource, logger, this.debug, args.options.new);
|
|
47
50
|
logger.log(accessToken);
|
|
48
51
|
}
|
package/dist/settingsNames.js
CHANGED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.browserUtil = void 0;
|
|
13
|
+
exports.browserUtil = {
|
|
14
|
+
/* c8 ignore next 5 */
|
|
15
|
+
open(url) {
|
|
16
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
17
|
+
const _open = require('open');
|
|
18
|
+
const runningOnWindows = process.platform === 'win32';
|
|
19
|
+
yield _open(url, { wait: runningOnWindows });
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
//# sourceMappingURL=browserUtil.js.map
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
import Global from '/docs/cmd/_global.mdx';
|
|
2
|
+
import Tabs from '@theme/Tabs';
|
|
3
|
+
import TabItem from '@theme/TabItem';
|
|
4
|
+
|
|
5
|
+
# aad sp list
|
|
6
|
+
|
|
7
|
+
Lists the service principals in the directory
|
|
8
|
+
|
|
9
|
+
## Usage
|
|
10
|
+
|
|
11
|
+
```sh
|
|
12
|
+
m365 aad sp list [options]
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Options
|
|
16
|
+
|
|
17
|
+
```md definition-list
|
|
18
|
+
`--displayName [displayName]`
|
|
19
|
+
: Returns only service principals with the specified name
|
|
20
|
+
|
|
21
|
+
`--tag [tag]`
|
|
22
|
+
: Returns only service principals with the specified tag
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
<Global />
|
|
26
|
+
|
|
27
|
+
## Examples
|
|
28
|
+
|
|
29
|
+
Return a list of all service principals
|
|
30
|
+
|
|
31
|
+
```sh
|
|
32
|
+
m365 aad sp list
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Return a list of all service principals that comply with the display name and the tag parameters
|
|
36
|
+
|
|
37
|
+
```sh
|
|
38
|
+
m365 aad sp list --displayName "My custom service principal" --tag "WindowsAzureActiveDirectoryIntegratedApp"
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## Response
|
|
42
|
+
|
|
43
|
+
<Tabs>
|
|
44
|
+
<TabItem value="JSON">
|
|
45
|
+
|
|
46
|
+
```json
|
|
47
|
+
[
|
|
48
|
+
{
|
|
49
|
+
"id": "226859cc-86f0-40d3-b308-f43b3a729b6e",
|
|
50
|
+
"deletedDateTime": null,
|
|
51
|
+
"accountEnabled": true,
|
|
52
|
+
"alternativeNames": [],
|
|
53
|
+
"appDisplayName": "My custom service principal",
|
|
54
|
+
"appDescription": null,
|
|
55
|
+
"appId": "a62ef842-f9ef-49cf-9119-31b85ea58445",
|
|
56
|
+
"applicationTemplateId": null,
|
|
57
|
+
"appOwnerOrganizationId": "fd71909b-55e5-44d2-9f78-dc432421d527",
|
|
58
|
+
"appRoleAssignmentRequired": false,
|
|
59
|
+
"createdDateTime": "2022-11-28T20:32:11Z",
|
|
60
|
+
"description": null,
|
|
61
|
+
"disabledByMicrosoftStatus": null,
|
|
62
|
+
"displayName": "My custom service principal",
|
|
63
|
+
"homepage": null,
|
|
64
|
+
"loginUrl": null,
|
|
65
|
+
"logoutUrl": null,
|
|
66
|
+
"notes": null,
|
|
67
|
+
"notificationEmailAddresses": [],
|
|
68
|
+
"preferredSingleSignOnMode": null,
|
|
69
|
+
"preferredTokenSigningKeyThumbprint": null,
|
|
70
|
+
"replyUrls": [
|
|
71
|
+
"urn:ietf:wg:oauth:2.0:oob",
|
|
72
|
+
"https://localhost",
|
|
73
|
+
"http://localhost",
|
|
74
|
+
"http://localhost:8400"
|
|
75
|
+
],
|
|
76
|
+
"servicePrincipalNames": [
|
|
77
|
+
"https://contoso.onmicrosoft.com/907a8cea-411a-461a-bb30-261e52febcca",
|
|
78
|
+
"907a8cea-411a-461a-bb30-261e52febcca"
|
|
79
|
+
],
|
|
80
|
+
"servicePrincipalType": "Application",
|
|
81
|
+
"signInAudience": "AzureADMultipleOrgs",
|
|
82
|
+
"tags": [
|
|
83
|
+
"WindowsAzureActiveDirectoryIntegratedApp"
|
|
84
|
+
],
|
|
85
|
+
"tokenEncryptionKeyId": null,
|
|
86
|
+
"samlSingleSignOnSettings": null,
|
|
87
|
+
"addIns": [],
|
|
88
|
+
"appRoles": [],
|
|
89
|
+
"info": {
|
|
90
|
+
"logoUrl": null,
|
|
91
|
+
"marketingUrl": null,
|
|
92
|
+
"privacyStatementUrl": null,
|
|
93
|
+
"supportUrl": null,
|
|
94
|
+
"termsOfServiceUrl": null
|
|
95
|
+
},
|
|
96
|
+
"keyCredentials": [],
|
|
97
|
+
"oauth2PermissionScopes": [
|
|
98
|
+
{
|
|
99
|
+
"adminConsentDescription": "Allow the application to access My custom service principal on behalf of the signed-in user.",
|
|
100
|
+
"adminConsentDisplayName": "Access My custom service principal",
|
|
101
|
+
"id": "907a8cea-411a-461a-bb30-261e52febcca",
|
|
102
|
+
"isEnabled": true,
|
|
103
|
+
"type": "User",
|
|
104
|
+
"userConsentDescription": "Allow the application to access My custom service principal on your behalf.",
|
|
105
|
+
"userConsentDisplayName": "Access My custom service principal",
|
|
106
|
+
"value": "user_impersonation"
|
|
107
|
+
}
|
|
108
|
+
],
|
|
109
|
+
"passwordCredentials": [],
|
|
110
|
+
"resourceSpecificApplicationPermissions": [],
|
|
111
|
+
"verifiedPublisher": {
|
|
112
|
+
"displayName": null,
|
|
113
|
+
"verifiedPublisherId": null,
|
|
114
|
+
"addedDateTime": null
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
]
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
</TabItem>
|
|
121
|
+
<TabItem value="Text">
|
|
122
|
+
|
|
123
|
+
```text
|
|
124
|
+
id displayName tag
|
|
125
|
+
-------------------------------------- ---------------------------- ---------------------------------------
|
|
126
|
+
a62ef842-f9ef-49cf-9119-31b85ea58445 My custom service principal WindowsAzureActiveDirectoryIntegratedApp
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
</TabItem>
|
|
130
|
+
<TabItem value="CSV">
|
|
131
|
+
|
|
132
|
+
```csv
|
|
133
|
+
id,accountEnabled,appDisplayName,appId,appOwnerOrganizationId,appRoleAssignmentRequired,createdDateTime,displayName,servicePrincipalType,signInAudience
|
|
134
|
+
226859cc-86f0-40d3-b308-f43b3a729b6e,1,My custom service principal,a62ef842-f9ef-49cf-9119-31b85ea58445,fd71909b-55e5-44d2-9f78-dc432421d527,,2022-11-28T20:32:11Z,My custom service principal,AzureADMultipleOrgs
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
</TabItem>
|
|
138
|
+
<TabItem value="Markdown">
|
|
139
|
+
|
|
140
|
+
```md
|
|
141
|
+
# aad sp list
|
|
142
|
+
|
|
143
|
+
Date: 27/4/2023
|
|
144
|
+
|
|
145
|
+
## My custom service principal (226859cc-86f0-40d3-b308-f43b3a729b6e)
|
|
146
|
+
|
|
147
|
+
Property | Value
|
|
148
|
+
---------|-------
|
|
149
|
+
id | 226859cc-86f0-40d3-b308-f43b3a729b6e
|
|
150
|
+
accountEnabled | true
|
|
151
|
+
appDisplayName | My custom service principal
|
|
152
|
+
appId | a62ef842-f9ef-49cf-9119-31b85ea58445
|
|
153
|
+
appOwnerOrganizationId | fd71909b-55e5-44d2-9f78-dc432421d527
|
|
154
|
+
appRoleAssignmentRequired | false
|
|
155
|
+
createdDateTime | 2022-11-28T20:32:11Z
|
|
156
|
+
displayName | My custom service principal
|
|
157
|
+
servicePrincipalType | Application
|
|
158
|
+
signInAudience | AzureADMultipleOrg
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
</TabItem>
|
|
162
|
+
</Tabs>
|
|
@@ -21,6 +21,9 @@ m365 flow list [options]
|
|
|
21
21
|
`--sharingStatus [sharingStatus]`
|
|
22
22
|
: List a specific type of flows. Valid values: `ownedByMe`, `personal`, `sharedWithMe`, `all`. Defaults to `ownedByMe`. Don't specify this option when using asAdmin.
|
|
23
23
|
|
|
24
|
+
`--includeSolutions`
|
|
25
|
+
: Include flows from solutions.
|
|
26
|
+
|
|
24
27
|
`--asAdmin`
|
|
25
28
|
: Set, to list all Flows as admin. Otherwise will return only your own flows.
|
|
26
29
|
```
|
|
@@ -58,6 +61,18 @@ List all flows in the given environment
|
|
|
58
61
|
m365 flow list --environmentName Default-d87a7535-dd31-4437-bfe1-95340acd55c5 --asAdmin
|
|
59
62
|
```
|
|
60
63
|
|
|
64
|
+
List all flows that are shared with the current user
|
|
65
|
+
|
|
66
|
+
```sh
|
|
67
|
+
m365 flow list --environmentName Default-d87a7535-dd31-4437-bfe1-95340acd55c5 --sharingStatus sharedWithMe
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
List all personal flows and include flows from solutions
|
|
71
|
+
|
|
72
|
+
```sh
|
|
73
|
+
m365 flow list --environmentName Default-d87a7535-dd31-4437-bfe1-95340acd55c5 --sharingStatus personal --includeSolutions
|
|
74
|
+
```
|
|
75
|
+
|
|
61
76
|
## Response
|
|
62
77
|
|
|
63
78
|
### Standard response
|
package/docs/docs/cmd/login.mdx
CHANGED
|
@@ -177,6 +177,16 @@ m365 login --authType secret --secret topSeCr3t@007
|
|
|
177
177
|
```json
|
|
178
178
|
To sign in, use a web browser to open the page https://microsoft.com/devicelogin and enter the code CQBMTLEFC to authenticate.
|
|
179
179
|
```
|
|
180
|
+
Upon successful login:
|
|
181
|
+
```json
|
|
182
|
+
{
|
|
183
|
+
"connectedAs": "john.doe@contoso.onmicrosoft.com",
|
|
184
|
+
"authType": "DeviceCode",
|
|
185
|
+
"appId": "31359c7f-bd7e-475c-86db-fdb8c937548e",
|
|
186
|
+
"appTenant": "common",
|
|
187
|
+
"cloudType": "Public"
|
|
188
|
+
}
|
|
189
|
+
```
|
|
180
190
|
|
|
181
191
|
</TabItem>
|
|
182
192
|
<TabItem value="Text">
|
|
@@ -184,6 +194,14 @@ m365 login --authType secret --secret topSeCr3t@007
|
|
|
184
194
|
```text
|
|
185
195
|
To sign in, use a web browser to open the page https://microsoft.com/devicelogin and enter the code CQBMTLEFC to authenticate.
|
|
186
196
|
```
|
|
197
|
+
Upon successful login:
|
|
198
|
+
```text
|
|
199
|
+
appId : 31359c7f-bd7e-475c-86db-fdb8c937548e
|
|
200
|
+
appTenant : common
|
|
201
|
+
authType : DeviceCode
|
|
202
|
+
connectedAs: john.doe@contoso.onmicrosoft.com,
|
|
203
|
+
cloudType : Public
|
|
204
|
+
```
|
|
187
205
|
|
|
188
206
|
</TabItem>
|
|
189
207
|
<TabItem value="CSV">
|
|
@@ -191,6 +209,11 @@ m365 login --authType secret --secret topSeCr3t@007
|
|
|
191
209
|
```csv
|
|
192
210
|
To sign in, use a web browser to open the page https://microsoft.com/devicelogin and enter the code CQBMTLEFC to authenticate.
|
|
193
211
|
```
|
|
212
|
+
Upon successful login:
|
|
213
|
+
```csv
|
|
214
|
+
connectedAs,authType,appId,appTenant,cloudType
|
|
215
|
+
john.doe@contoso.onmicrosoft.com,DeviceCode,31359c7f-bd7e-475c-86db-fdb8c937548e,common,Public
|
|
216
|
+
```
|
|
194
217
|
|
|
195
218
|
</TabItem>
|
|
196
219
|
<TabItem value="Markdown">
|
|
@@ -198,6 +221,22 @@ m365 login --authType secret --secret topSeCr3t@007
|
|
|
198
221
|
```md
|
|
199
222
|
To sign in, use a web browser to open the page https://microsoft.com/devicelogin and enter the code CQBMTLEFC to authenticate.
|
|
200
223
|
```
|
|
224
|
+
Upon successful login:
|
|
225
|
+
```md
|
|
226
|
+
# status
|
|
227
|
+
|
|
228
|
+
Date: 7/2/2023
|
|
229
|
+
|
|
230
|
+
|
|
231
|
+
|
|
232
|
+
Property | Value
|
|
233
|
+
---------|-------
|
|
234
|
+
connectedAs | john.doe@contoso.onmicrosoft.com
|
|
235
|
+
authType | DeviceCode
|
|
236
|
+
appId | 31359c7f-bd7e-475c-86db-fdb8c937548e
|
|
237
|
+
appTenant | common
|
|
238
|
+
cloudType | Public
|
|
239
|
+
```
|
|
201
240
|
|
|
202
241
|
</TabItem>
|
|
203
242
|
</Tabs>
|
package/docs/docs/cmd/setup.mdx
CHANGED
|
@@ -49,6 +49,7 @@ The `m365 setup` command uses the following presets:
|
|
|
49
49
|
- interactive use:
|
|
50
50
|
- autoOpenLinksInBrowser: true,
|
|
51
51
|
- copyDeviceCodeToClipboard: true,
|
|
52
|
+
- interactive: true,
|
|
52
53
|
- output: 'text',
|
|
53
54
|
- printErrorsAsPlainText: true,
|
|
54
55
|
- prompt: true,
|
|
@@ -57,6 +58,7 @@ The `m365 setup` command uses the following presets:
|
|
|
57
58
|
- scripting use:
|
|
58
59
|
- autoOpenLinksInBrowser: false,
|
|
59
60
|
- copyDeviceCodeToClipboard: false,
|
|
61
|
+
- interactive: false,
|
|
60
62
|
- output: 'json',
|
|
61
63
|
- printErrorsAsPlainText: false,
|
|
62
64
|
- prompt: false,
|
|
@@ -35,7 +35,7 @@ m365 spfx project upgrade [options]
|
|
|
35
35
|
|
|
36
36
|
## Remarks
|
|
37
37
|
|
|
38
|
-
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.17.
|
|
38
|
+
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.17.3).
|
|
39
39
|
|
|
40
40
|
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.
|
|
41
41
|
|