@pnp/cli-microsoft365 7.0.0 → 7.1.0-beta.129c6c7
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 +0 -1
- package/.eslintrc.cjs +1 -0
- package/Dockerfile +0 -1
- package/dist/Auth.js +1 -1
- package/dist/Command.js +18 -28
- package/dist/appInsights.js +5 -9
- package/dist/cli/Cli.js +9 -4
- package/dist/m365/aad/commands/m365group/m365group-remove.js +109 -15
- package/dist/m365/commands/setup.js +2 -1
- package/dist/m365/spo/commands/app/app-deploy.js +1 -1
- package/dist/m365/spo/commands/app/app-get.js +1 -1
- package/dist/m365/spo/commands/app/app-teamspackage-download.js +1 -1
- package/dist/m365/spo/commands/apppage/apppage-add.js +1 -1
- package/dist/m365/spo/commands/feature/feature-disable.js +8 -6
- package/dist/m365/spo/commands/feature/feature-enable.js +6 -5
- package/dist/m365/spo/commands/page/Page.js +1 -1
- package/dist/m365/spo/commands/page/page-add.js +1 -1
- package/dist/m365/spo/commands/page/page-get.js +1 -1
- package/dist/m365/spo/commands/page/page-header-set.js +1 -1
- package/dist/m365/spo/commands/page/page-remove.js +1 -1
- package/dist/m365/spo/commands/page/page-set.js +2 -2
- package/dist/m365/spo/commands/page/page-text-add.js +1 -1
- package/dist/m365/spo/commands/sitedesign/sitedesign-get.js +15 -14
- package/dist/m365/spo/commands/sitedesign/sitedesign-remove.js +22 -22
- package/dist/m365/spo/commands/user/user-get.js +7 -1
- package/dist/m365/todo/commands/task/task-list.js +8 -10
- package/dist/m365/todo/commands/task/task-remove.js +36 -36
- package/dist/m365/todo/commands/task/task-set.js +11 -13
- package/dist/m365/yammer/commands/group/group-user-remove.js +22 -23
- package/dist/telemetry.js +30 -14
- package/dist/telemetryRunner.js +26 -0
- package/dist/utils/prompt.js +16 -0
- package/docs/docs/cmd/aad/license/license-list.mdx +21 -16
- package/docs/docs/cmd/aad/m365group/m365group-add.mdx +1 -1
- package/docs/docs/cmd/aad/m365group/m365group-remove.mdx +11 -1
- package/docs/docs/cmd/aad/user/user-add.mdx +2 -4
- package/docs/docs/cmd/aad/user/user-license-add.mdx +2 -4
- package/docs/docs/cmd/aad/user/user-license-list.mdx +3 -5
- package/docs/docs/cmd/aad/user/user-recyclebinitem-list.mdx +1 -3
- package/docs/docs/cmd/aad/user/user-recyclebinitem-restore.mdx +1 -3
- package/docs/docs/cmd/flow/environment/environment-get.mdx +3 -4
- package/docs/docs/cmd/flow/environment/environment-list.mdx +3 -4
- package/docs/docs/cmd/flow/owner/owner-list.mdx +2 -3
- package/docs/docs/cmd/flow/run/run-list.mdx +6 -8
- package/docs/docs/cmd/graph/schemaextension/schemaextension-list.mdx +2 -3
- package/docs/docs/cmd/onenote/page/page-list.mdx +6 -9
- package/docs/docs/cmd/outlook/message/message-get.mdx +5 -15
- package/docs/docs/cmd/outlook/message/message-list.mdx +5 -14
- package/docs/docs/cmd/outlook/room/room-list.mdx +3 -6
- package/docs/docs/cmd/outlook/roomlist/roomlist-list.mdx +1 -3
- package/docs/docs/cmd/pa/app/app-get.mdx +4 -7
- package/docs/docs/cmd/pa/app/app-list.mdx +4 -7
- package/docs/docs/cmd/pa/connector/connector-list.mdx +2 -4
- package/docs/docs/cmd/pa/environment/environment-get.mdx +2 -4
- package/docs/docs/cmd/pa/environment/environment-list.mdx +1 -3
- package/docs/docs/cmd/planner/plan/plan-add.mdx +4 -11
- package/docs/docs/cmd/planner/plan/plan-get.mdx +4 -9
- package/docs/docs/cmd/planner/plan/plan-list.mdx +3 -6
- package/docs/docs/cmd/planner/plan/plan-set.mdx +3 -9
- package/docs/docs/cmd/planner/roster/roster-member-add.mdx +2 -4
- package/docs/docs/cmd/planner/roster/roster-member-get.mdx +2 -4
- package/docs/docs/cmd/planner/roster/roster-member-list.mdx +1 -3
- package/docs/docs/cmd/planner/task/task-add.mdx +4 -14
- package/docs/docs/cmd/planner/task/task-checklistitem-add.mdx +2 -4
- package/docs/docs/cmd/planner/task/task-checklistitem-list.mdx +1 -3
- package/docs/docs/cmd/planner/task/task-get.mdx +0 -7
- package/docs/docs/cmd/planner/task/task-list.mdx +1 -5
- package/docs/docs/cmd/planner/task/task-reference-add.mdx +0 -2
- package/docs/docs/cmd/planner/task/task-reference-list.mdx +0 -2
- package/docs/docs/cmd/planner/task/task-set.mdx +4 -13
- package/docs/docs/cmd/planner/tenant/tenant-settings-list.mdx +1 -3
- package/docs/docs/cmd/planner/tenant/tenant-settings-set.mdx +3 -5
- package/docs/docs/cmd/pp/aibuildermodel/aibuildermodel-get.mdx +6 -8
- package/docs/docs/cmd/pp/aibuildermodel/aibuildermodel-list.mdx +4 -7
- package/docs/docs/cmd/pp/card/card-get.mdx +4 -8
- package/docs/docs/cmd/pp/card/card-list.mdx +0 -4
- package/docs/docs/cmd/pp/chatbot/chatbot-get.mdx +4 -6
- package/docs/docs/cmd/pp/dataverse/dataverse-table-get.mdx +3 -14
- package/docs/docs/cmd/pp/dataverse/dataverse-table-list.mdx +3 -14
- package/docs/docs/cmd/pp/environment/environment-get.mdx +3 -5
- package/docs/docs/cmd/pp/environment/environment-list.mdx +2 -4
- package/docs/docs/cmd/pp/gateway/gateway-get.mdx +0 -3
- package/docs/docs/cmd/pp/gateway/gateway-list.mdx +1 -4
- package/docs/docs/cmd/purview/auditlog/auditlog-list.mdx +4 -0
- package/docs/docs/cmd/purview/retentionevent/retentionevent-add.mdx +3 -8
- package/docs/docs/cmd/purview/retentionevent/retentionevent-get.mdx +1 -3
- package/docs/docs/cmd/purview/retentionevent/retentionevent-list.mdx +1 -5
- package/docs/docs/cmd/purview/retentioneventtype/retentioneventtype-add.mdx +0 -2
- package/docs/docs/cmd/purview/retentioneventtype/retentioneventtype-get.mdx +1 -3
- package/docs/docs/cmd/purview/retentioneventtype/retentioneventtype-list.mdx +1 -3
- package/docs/docs/cmd/purview/sensitivitylabel/sensitivitylabel-get.mdx +3 -6
- package/docs/docs/cmd/purview/sensitivitylabel/sensitivitylabel-list.mdx +3 -5
- package/docs/docs/cmd/purview/threatassessment/threatassessment-get.mdx +4 -8
- package/docs/docs/cmd/spo/app/app-add.mdx +94 -7
- package/docs/docs/cmd/spo/app/app-deploy.mdx +11 -7
- package/docs/docs/cmd/spo/app/app-get.mdx +117 -8
- package/docs/docs/cmd/spo/app/app-install.mdx +9 -5
- package/docs/docs/cmd/spo/app/app-instance-list.mdx +85 -2
- package/docs/docs/cmd/spo/app/app-list.mdx +95 -3
- package/docs/docs/cmd/spo/app/app-remove.mdx +11 -7
- package/docs/docs/cmd/spo/app/app-retract.mdx +9 -5
- package/docs/docs/cmd/spo/app/app-teamspackage-download.mdx +12 -8
- package/docs/docs/cmd/spo/app/app-uninstall.mdx +11 -7
- package/docs/docs/cmd/spo/app/app-upgrade.mdx +9 -5
- package/docs/docs/cmd/spo/applicationcustomizer/applicationcustomizer-add.mdx +4 -2
- package/docs/docs/cmd/spo/applicationcustomizer/applicationcustomizer-get.mdx +9 -7
- package/docs/docs/cmd/spo/applicationcustomizer/applicationcustomizer-list.mdx +6 -6
- package/docs/docs/cmd/spo/applicationcustomizer/applicationcustomizer-remove.mdx +12 -6
- package/docs/docs/cmd/spo/applicationcustomizer/applicationcustomizer-set.mdx +4 -2
- package/docs/docs/cmd/spo/apppage/apppage-add.mdx +54 -5
- package/docs/docs/cmd/spo/apppage/apppage-set.mdx +8 -4
- package/docs/docs/cmd/spo/cdn/cdn-get.mdx +36 -1
- package/docs/docs/cmd/spo/cdn/cdn-origin-add.mdx +7 -3
- package/docs/docs/cmd/spo/cdn/cdn-origin-list.mdx +48 -3
- package/docs/docs/cmd/spo/cdn/cdn-origin-remove.mdx +8 -4
- package/docs/docs/cmd/spo/cdn/cdn-policy-list.mdx +53 -3
- package/docs/docs/cmd/spo/cdn/cdn-policy-set.mdx +7 -3
- package/docs/docs/cmd/spo/cdn/cdn-set.mdx +7 -3
- package/docs/docs/cmd/spo/commandset/commandset-add.mdx +6 -6
- package/docs/docs/cmd/spo/commandset/commandset-get.mdx +3 -5
- package/docs/docs/cmd/spo/commandset/commandset-list.mdx +6 -5
- package/docs/docs/cmd/spo/commandset/commandset-remove.mdx +7 -3
- package/docs/docs/cmd/spo/commandset/commandset-set.mdx +6 -4
- package/docs/docs/cmd/spo/contenttype/contenttype-add.mdx +148 -9
- package/docs/docs/cmd/spo/contenttype/contenttype-field-remove.mdx +19 -15
- package/docs/docs/cmd/spo/contenttype/contenttype-field-set.mdx +12 -8
- package/docs/docs/cmd/spo/contenttype/contenttype-get.mdx +147 -8
- package/docs/docs/cmd/spo/contenttype/contenttype-list.mdx +115 -4
- package/docs/docs/cmd/spo/contenttype/contenttype-remove.mdx +8 -4
- package/docs/docs/cmd/spo/contenttype/contenttype-set.mdx +8 -4
- package/docs/docs/cmd/spo/contenttypehub/contenttypehub-get.mdx +44 -0
- package/docs/docs/cmd/spo/customaction/customaction-add.mdx +12 -8
- package/docs/docs/cmd/spo/customaction/customaction-clear.mdx +10 -7
- package/docs/docs/cmd/spo/customaction/customaction-get.mdx +11 -15
- package/docs/docs/cmd/spo/customaction/customaction-list.mdx +87 -5
- package/docs/docs/cmd/spo/customaction/customaction-remove.mdx +17 -13
- package/docs/docs/cmd/spo/customaction/customaction-set.mdx +27 -23
- package/docs/docs/cmd/spo/eventreceiver/eventreceiver-get.mdx +29 -14
- package/docs/docs/cmd/spo/eventreceiver/eventreceiver-list.mdx +66 -5
- package/docs/docs/cmd/spo/eventreceiver/eventreceiver-remove.mdx +4 -0
- package/docs/docs/cmd/spo/externaluser/externaluser-list.mdx +78 -7
- package/docs/docs/cmd/spo/feature/feature-disable.mdx +10 -6
- package/docs/docs/cmd/spo/feature/feature-enable.mdx +9 -5
- package/docs/docs/cmd/spo/feature/feature-list.mdx +52 -0
- package/docs/docs/cmd/spo/field/field-add.mdx +177 -11
- package/docs/docs/cmd/spo/field/field-get.mdx +175 -9
- package/docs/docs/cmd/spo/field/field-list.mdx +135 -8
- package/docs/docs/cmd/spo/field/field-remove.mdx +16 -12
- package/docs/docs/cmd/spo/field/field-set.mdx +15 -11
- package/docs/docs/cmd/spo/file/file-add.mdx +31 -27
- package/docs/docs/cmd/spo/file/file-checkin.mdx +13 -9
- package/docs/docs/cmd/spo/file/file-checkout.mdx +9 -5
- package/docs/docs/cmd/spo/file/file-copy.mdx +5 -5
- package/docs/docs/cmd/spo/file/file-get.mdx +89 -18
- package/docs/docs/cmd/spo/file/file-list.mdx +5 -5
- package/docs/docs/cmd/spo/file/file-move.mdx +5 -5
- package/docs/docs/cmd/spo/file/file-remove.mdx +13 -9
- package/docs/docs/cmd/spo/file/file-rename.mdx +63 -5
- package/docs/docs/cmd/spo/file/file-retentionlabel-ensure.mdx +3 -3
- package/docs/docs/cmd/spo/file/file-retentionlabel-remove.mdx +2 -2
- package/docs/docs/cmd/spo/file/file-roleassignment-add.mdx +4 -0
- package/docs/docs/cmd/spo/file/file-roleassignment-remove.mdx +7 -3
- package/docs/docs/cmd/spo/file/file-roleinheritance-break.mdx +9 -5
- package/docs/docs/cmd/spo/file/file-roleinheritance-reset.mdx +10 -6
- package/docs/docs/cmd/spo/file/file-sharinginfo-get.mdx +133 -5
- package/docs/docs/cmd/spo/file/file-sharinglink-add.mdx +21 -3
- package/docs/docs/cmd/spo/file/file-sharinglink-clear.mdx +2 -2
- package/docs/docs/cmd/spo/file/file-sharinglink-get.mdx +18 -0
- package/docs/docs/cmd/spo/file/file-sharinglink-list.mdx +20 -3
- package/docs/docs/cmd/spo/file/file-sharinglink-set.mdx +2 -7
- package/docs/docs/cmd/spo/file/file-version-clear.mdx +7 -7
- package/docs/docs/cmd/spo/file/file-version-get.mdx +28 -6
- package/docs/docs/cmd/spo/file/file-version-list.mdx +28 -6
- package/docs/docs/cmd/spo/file/file-version-remove.mdx +8 -8
- package/docs/docs/cmd/spo/file/file-version-restore.mdx +8 -8
- package/docs/docs/cmd/spo/folder/folder-add.mdx +3 -3
- package/docs/docs/cmd/spo/folder/folder-copy.mdx +1 -1
- package/docs/docs/cmd/spo/folder/folder-get.mdx +257 -3
- package/docs/docs/cmd/spo/folder/folder-list.mdx +3 -4
- package/docs/docs/cmd/spo/folder/folder-move.mdx +5 -5
- package/docs/docs/cmd/spo/folder/folder-remove.mdx +6 -2
- package/docs/docs/cmd/spo/folder/folder-rename.mdx +2 -2
- package/docs/docs/cmd/spo/folder/folder-retentionlabel-ensure.mdx +3 -3
- package/docs/docs/cmd/spo/folder/folder-retentionlabel-remove.mdx +2 -2
- package/docs/docs/cmd/spo/folder/folder-roleassignment-add.mdx +13 -8
- package/docs/docs/cmd/spo/folder/folder-roleassignment-remove.mdx +8 -4
- package/docs/docs/cmd/spo/folder/folder-roleinheritance-break.mdx +4 -0
- package/docs/docs/cmd/spo/folder/folder-roleinheritance-reset.mdx +5 -1
- package/docs/docs/cmd/spo/group/group-add.mdx +78 -0
- package/docs/docs/cmd/spo/group/group-get.mdx +81 -3
- package/docs/docs/cmd/spo/group/group-list.mdx +74 -3
- package/docs/docs/cmd/spo/group/group-member-add.mdx +13 -21
- package/docs/docs/cmd/spo/group/group-member-list.mdx +80 -5
- package/docs/docs/cmd/spo/group/group-member-remove.mdx +4 -4
- package/docs/docs/cmd/spo/group/group-remove.mdx +10 -6
- package/docs/docs/cmd/spo/group/group-set.mdx +9 -5
- package/docs/docs/cmd/spo/hidedefaultthemes/hidedefaultthemes-get.mdx +36 -1
- package/docs/docs/cmd/spo/hidedefaultthemes/hidedefaultthemes-set.mdx +6 -2
- package/docs/docs/cmd/spo/hubsite/hubsite-data-get.mdx +0 -2
- package/docs/docs/cmd/spo/list/list-add.mdx +0 -3
- package/docs/docs/cmd/spo/list/list-contenttype-add.mdx +0 -2
- package/docs/docs/cmd/spo/list/list-contenttype-list.mdx +0 -2
- package/docs/docs/cmd/spo/list/list-get.mdx +1 -4
- package/docs/docs/cmd/spo/list/list-list.mdx +0 -4
- package/docs/docs/cmd/spo/list/list-view-add.mdx +0 -3
- package/docs/docs/cmd/spo/list/list-view-get.mdx +9 -12
- package/docs/docs/cmd/spo/list/list-view-list.mdx +4 -7
- package/docs/docs/cmd/spo/listitem/listitem-attachment-list.mdx +8 -11
- package/docs/docs/cmd/spo/listitem/listitem-get.mdx +0 -2
- package/docs/docs/cmd/spo/navigation/navigation-node-add.mdx +4 -6
- package/docs/docs/cmd/spo/navigation/navigation-node-get.mdx +0 -2
- package/docs/docs/cmd/spo/navigation/navigation-node-list.mdx +4 -6
- package/docs/docs/cmd/spo/page/page-copy.mdx +4 -8
- package/docs/docs/cmd/spo/page/page-get.mdx +2 -5
- package/docs/docs/cmd/spo/page/page-list.mdx +1 -5
- package/docs/docs/cmd/spo/sitescript/sitescript-get.mdx +4 -4
- package/docs/docs/cmd/spo/sitescript/sitescript-set.mdx +6 -7
- package/docs/docs/cmd/spo/tenant/tenant-applicationcustomizer-add.mdx +3 -1
- package/docs/docs/cmd/spo/tenant/tenant-applicationcustomizer-get.mdx +5 -3
- package/docs/docs/cmd/spo/tenant/tenant-applicationcustomizer-list.mdx +4 -2
- package/docs/docs/cmd/spo/tenant/tenant-applicationcustomizer-remove.mdx +5 -1
- package/docs/docs/cmd/spo/tenant/tenant-applicationcustomizer-set.mdx +2 -0
- package/docs/docs/cmd/spo/tenant/tenant-commandset-add.mdx +2 -1
- package/docs/docs/cmd/spo/tenant/tenant-commandset-get.mdx +5 -2
- package/docs/docs/cmd/spo/tenant/tenant-commandset-list.mdx +4 -1
- package/docs/docs/cmd/spo/tenant/tenant-commandset-remove.mdx +5 -1
- package/docs/docs/cmd/spo/tenant/tenant-commandset-set.mdx +3 -1
- package/docs/docs/cmd/spo/user/user-get.mdx +6 -0
- package/docs/docs/cmd/teams/channel/channel-member-list.mdx +3 -5
- package/docs/docs/cmd/teams/channel/channel-member-set.mdx +0 -2
- package/docs/docs/cmd/teams/chat/chat-get.mdx +2 -4
- package/docs/docs/cmd/teams/chat/chat-list.mdx +1 -3
- package/docs/docs/cmd/teams/chat/chat-member-list.mdx +2 -4
- package/docs/docs/cmd/teams/message/message-get.mdx +0 -7
- package/docs/docs/cmd/teams/message/message-list.mdx +0 -6
- package/docs/docs/cmd/teams/message/message-reply-list.mdx +0 -6
- package/docs/docs/cmd/teams/tab/tab-add.mdx +10 -12
- package/docs/docs/cmd/teams/tab/tab-get.mdx +8 -10
- package/docs/docs/cmd/teams/tab/tab-list.mdx +4 -7
- package/docs/docs/cmd/teams/team/team-add.mdx +0 -7
- package/docs/docs/cmd/teams/team/team-get.mdx +0 -6
- package/docs/docs/cmd/tenant/security/security-alerts-list.mdx +1 -1
- package/docs/docs/cmd/todo/task/task-add.mdx +9 -13
- package/docs/docs/cmd/todo/task/task-set.mdx +10 -14
- package/eslint-rules/lib/index.js +2 -1
- package/eslint-rules/lib/rules/no-by-server-relative-url-usage.js +55 -0
- package/npm-shrinkwrap.json +88 -84
- package/package.json +53 -32
|
@@ -4,7 +4,9 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
4
4
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
5
5
|
};
|
|
6
6
|
var _SpoSiteDesignGetCommand_instances, _SpoSiteDesignGetCommand_initTelemetry, _SpoSiteDesignGetCommand_initOptions, _SpoSiteDesignGetCommand_initValidators, _SpoSiteDesignGetCommand_initOptionSets;
|
|
7
|
+
import { Cli } from '../../../../cli/Cli.js';
|
|
7
8
|
import request from '../../../../request.js';
|
|
9
|
+
import { formatting } from '../../../../utils/formatting.js';
|
|
8
10
|
import { spo } from '../../../../utils/spo.js';
|
|
9
11
|
import { validation } from '../../../../utils/validation.js';
|
|
10
12
|
import SpoCommand from '../../../base/SpoCommand.js';
|
|
@@ -24,9 +26,9 @@ class SpoSiteDesignGetCommand extends SpoCommand {
|
|
|
24
26
|
__classPrivateFieldGet(this, _SpoSiteDesignGetCommand_instances, "m", _SpoSiteDesignGetCommand_initValidators).call(this);
|
|
25
27
|
__classPrivateFieldGet(this, _SpoSiteDesignGetCommand_instances, "m", _SpoSiteDesignGetCommand_initOptionSets).call(this);
|
|
26
28
|
}
|
|
27
|
-
getSiteDesignId(args, spoUrl) {
|
|
29
|
+
async getSiteDesignId(args, spoUrl) {
|
|
28
30
|
if (args.options.id) {
|
|
29
|
-
return
|
|
31
|
+
return args.options.id;
|
|
30
32
|
}
|
|
31
33
|
const requestOptions = {
|
|
32
34
|
url: `${spoUrl}/_api/Microsoft.Sharepoint.Utilities.WebTemplateExtensions.SiteScriptUtility.GetSiteDesigns`,
|
|
@@ -35,18 +37,17 @@ class SpoSiteDesignGetCommand extends SpoCommand {
|
|
|
35
37
|
},
|
|
36
38
|
responseType: 'json'
|
|
37
39
|
};
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
});
|
|
40
|
+
const response = await request.post(requestOptions);
|
|
41
|
+
const matchingSiteDesigns = response.value.filter(x => x.Title === args.options.title);
|
|
42
|
+
if (matchingSiteDesigns.length === 0) {
|
|
43
|
+
throw `The specified site design does not exist`;
|
|
44
|
+
}
|
|
45
|
+
if (matchingSiteDesigns.length > 1) {
|
|
46
|
+
const resultAsKeyValuePair = formatting.convertArrayToHashTable('Id', matchingSiteDesigns);
|
|
47
|
+
const result = await Cli.handleMultipleResultsFound(`Multiple site designs with title '${args.options.title}' found.`, resultAsKeyValuePair);
|
|
48
|
+
return result.Id;
|
|
49
|
+
}
|
|
50
|
+
return matchingSiteDesigns[0].Id;
|
|
50
51
|
}
|
|
51
52
|
async commandAction(logger, args) {
|
|
52
53
|
try {
|
|
@@ -25,28 +25,8 @@ class SpoSiteDesignRemoveCommand extends SpoCommand {
|
|
|
25
25
|
__classPrivateFieldGet(this, _SpoSiteDesignRemoveCommand_instances, "m", _SpoSiteDesignRemoveCommand_initValidators).call(this);
|
|
26
26
|
}
|
|
27
27
|
async commandAction(logger, args) {
|
|
28
|
-
const removeSiteDesign = async () => {
|
|
29
|
-
try {
|
|
30
|
-
const spoUrl = await spo.getSpoUrl(logger, this.debug);
|
|
31
|
-
const requestDigest = await spo.getRequestDigest(spoUrl);
|
|
32
|
-
const requestOptions = {
|
|
33
|
-
url: `${spoUrl}/_api/Microsoft.Sharepoint.Utilities.WebTemplateExtensions.SiteScriptUtility.DeleteSiteDesign`,
|
|
34
|
-
headers: {
|
|
35
|
-
'X-RequestDigest': requestDigest.FormDigestValue,
|
|
36
|
-
'content-type': 'application/json;charset=utf-8',
|
|
37
|
-
accept: 'application/json;odata=nometadata'
|
|
38
|
-
},
|
|
39
|
-
data: { id: args.options.id },
|
|
40
|
-
responseType: 'json'
|
|
41
|
-
};
|
|
42
|
-
await request.post(requestOptions);
|
|
43
|
-
}
|
|
44
|
-
catch (err) {
|
|
45
|
-
this.handleRejectedODataJsonPromise(err);
|
|
46
|
-
}
|
|
47
|
-
};
|
|
48
28
|
if (args.options.force) {
|
|
49
|
-
await removeSiteDesign();
|
|
29
|
+
await this.removeSiteDesign(logger, args.options.id);
|
|
50
30
|
}
|
|
51
31
|
else {
|
|
52
32
|
const result = await Cli.prompt({
|
|
@@ -56,10 +36,30 @@ class SpoSiteDesignRemoveCommand extends SpoCommand {
|
|
|
56
36
|
message: `Are you sure you want to remove the site design ${args.options.id}?`
|
|
57
37
|
});
|
|
58
38
|
if (result.continue) {
|
|
59
|
-
await removeSiteDesign();
|
|
39
|
+
await this.removeSiteDesign(logger, args.options.id);
|
|
60
40
|
}
|
|
61
41
|
}
|
|
62
42
|
}
|
|
43
|
+
async removeSiteDesign(logger, id) {
|
|
44
|
+
try {
|
|
45
|
+
const spoUrl = await spo.getSpoUrl(logger, this.debug);
|
|
46
|
+
const requestDigest = await spo.getRequestDigest(spoUrl);
|
|
47
|
+
const requestOptions = {
|
|
48
|
+
url: `${spoUrl}/_api/Microsoft.Sharepoint.Utilities.WebTemplateExtensions.SiteScriptUtility.DeleteSiteDesign`,
|
|
49
|
+
headers: {
|
|
50
|
+
'X-RequestDigest': requestDigest.FormDigestValue,
|
|
51
|
+
'content-type': 'application/json;charset=utf-8',
|
|
52
|
+
accept: 'application/json;odata=nometadata'
|
|
53
|
+
},
|
|
54
|
+
data: { id: id },
|
|
55
|
+
responseType: 'json'
|
|
56
|
+
};
|
|
57
|
+
await request.post(requestOptions);
|
|
58
|
+
}
|
|
59
|
+
catch (err) {
|
|
60
|
+
this.handleRejectedODataJsonPromise(err);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
63
|
}
|
|
64
64
|
_SpoSiteDesignRemoveCommand_instances = new WeakSet(), _SpoSiteDesignRemoveCommand_initTelemetry = function _SpoSiteDesignRemoveCommand_initTelemetry() {
|
|
65
65
|
this.telemetry.push((args) => {
|
|
@@ -38,6 +38,9 @@ class SpoUserGetCommand extends SpoCommand {
|
|
|
38
38
|
else if (args.options.loginName) {
|
|
39
39
|
requestUrl = `${args.options.webUrl}/_api/web/siteusers/GetByLoginName('${formatting.encodeQueryParameter(args.options.loginName)}')`;
|
|
40
40
|
}
|
|
41
|
+
else {
|
|
42
|
+
requestUrl = `${args.options.webUrl}/_api/web/currentuser`;
|
|
43
|
+
}
|
|
41
44
|
const requestOptions = {
|
|
42
45
|
url: requestUrl,
|
|
43
46
|
method: 'GET',
|
|
@@ -82,7 +85,10 @@ _SpoUserGetCommand_instances = new WeakSet(), _SpoUserGetCommand_initTelemetry =
|
|
|
82
85
|
return validation.isValidSharePointUrl(args.options.webUrl);
|
|
83
86
|
});
|
|
84
87
|
}, _SpoUserGetCommand_initOptionSets = function _SpoUserGetCommand_initOptionSets() {
|
|
85
|
-
this.optionSets.push({
|
|
88
|
+
this.optionSets.push({
|
|
89
|
+
options: ['id', 'email', 'loginName'],
|
|
90
|
+
runsWhen: (args) => args.options.id || args.options.loginName || args.options.email
|
|
91
|
+
});
|
|
86
92
|
};
|
|
87
93
|
export default new SpoUserGetCommand();
|
|
88
94
|
//# sourceMappingURL=user-get.js.map
|
|
@@ -26,9 +26,9 @@ class TodoTaskListCommand extends GraphCommand {
|
|
|
26
26
|
__classPrivateFieldGet(this, _TodoTaskListCommand_instances, "m", _TodoTaskListCommand_initOptions).call(this);
|
|
27
27
|
__classPrivateFieldGet(this, _TodoTaskListCommand_instances, "m", _TodoTaskListCommand_initOptionSets).call(this);
|
|
28
28
|
}
|
|
29
|
-
getTodoListId(args) {
|
|
29
|
+
async getTodoListId(args) {
|
|
30
30
|
if (args.options.listId) {
|
|
31
|
-
return
|
|
31
|
+
return args.options.listId;
|
|
32
32
|
}
|
|
33
33
|
const requestOptions = {
|
|
34
34
|
url: `${this.resource}/v1.0/me/todo/lists?$filter=displayName eq '${escape(args.options.listName)}'`,
|
|
@@ -37,14 +37,12 @@ class TodoTaskListCommand extends GraphCommand {
|
|
|
37
37
|
},
|
|
38
38
|
responseType: 'json'
|
|
39
39
|
};
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
return Promise.resolve(taskList.id);
|
|
47
|
-
});
|
|
40
|
+
const response = await request.get(requestOptions);
|
|
41
|
+
const taskList = response.value[0];
|
|
42
|
+
if (!taskList) {
|
|
43
|
+
throw `The specified task list does not exist`;
|
|
44
|
+
}
|
|
45
|
+
return taskList.id;
|
|
48
46
|
}
|
|
49
47
|
async commandAction(logger, args) {
|
|
50
48
|
try {
|
|
@@ -23,42 +23,8 @@ class TodoTaskRemoveCommand extends GraphCommand {
|
|
|
23
23
|
__classPrivateFieldGet(this, _TodoTaskRemoveCommand_instances, "m", _TodoTaskRemoveCommand_initOptionSets).call(this);
|
|
24
24
|
}
|
|
25
25
|
async commandAction(logger, args) {
|
|
26
|
-
const getToDoListId = async () => {
|
|
27
|
-
if (args.options.listName) {
|
|
28
|
-
// Search list by its name
|
|
29
|
-
const requestOptions = {
|
|
30
|
-
url: `${this.resource}/v1.0/me/todo/lists?$filter=displayName eq '${escape(args.options.listName)}'`,
|
|
31
|
-
headers: {
|
|
32
|
-
accept: "application/json;odata.metadata=none"
|
|
33
|
-
},
|
|
34
|
-
responseType: 'json'
|
|
35
|
-
};
|
|
36
|
-
const response = await request.get(requestOptions);
|
|
37
|
-
return response.value && response.value.length === 1 ? response.value[0].id : undefined;
|
|
38
|
-
}
|
|
39
|
-
return Promise.resolve(args.options.listId);
|
|
40
|
-
};
|
|
41
|
-
const removeToDoTask = async () => {
|
|
42
|
-
try {
|
|
43
|
-
const toDoListId = await getToDoListId();
|
|
44
|
-
if (!toDoListId) {
|
|
45
|
-
throw `The list ${args.options.listName} cannot be found`;
|
|
46
|
-
}
|
|
47
|
-
const requestOptions = {
|
|
48
|
-
url: `${this.resource}/v1.0/me/todo/lists/${toDoListId}/tasks/${args.options.id}`,
|
|
49
|
-
headers: {
|
|
50
|
-
accept: "application/json;odata.metadata=none"
|
|
51
|
-
},
|
|
52
|
-
responseType: 'json'
|
|
53
|
-
};
|
|
54
|
-
await request.delete(requestOptions);
|
|
55
|
-
}
|
|
56
|
-
catch (err) {
|
|
57
|
-
this.handleRejectedODataJsonPromise(err);
|
|
58
|
-
}
|
|
59
|
-
};
|
|
60
26
|
if (args.options.force) {
|
|
61
|
-
await removeToDoTask();
|
|
27
|
+
await this.removeToDoTask(args.options);
|
|
62
28
|
}
|
|
63
29
|
else {
|
|
64
30
|
const result = await Cli.prompt({
|
|
@@ -68,10 +34,44 @@ class TodoTaskRemoveCommand extends GraphCommand {
|
|
|
68
34
|
message: `Are you sure you want to remove the task ${args.options.id} from list ${args.options.listId || args.options.listName}?`
|
|
69
35
|
});
|
|
70
36
|
if (result.continue) {
|
|
71
|
-
await removeToDoTask();
|
|
37
|
+
await this.removeToDoTask(args.options);
|
|
72
38
|
}
|
|
73
39
|
}
|
|
74
40
|
}
|
|
41
|
+
async getToDoListId(options) {
|
|
42
|
+
if (options.listName) {
|
|
43
|
+
// Search list by its name
|
|
44
|
+
const requestOptions = {
|
|
45
|
+
url: `${this.resource}/v1.0/me/todo/lists?$filter=displayName eq '${escape(options.listName)}'`,
|
|
46
|
+
headers: {
|
|
47
|
+
accept: "application/json;odata.metadata=none"
|
|
48
|
+
},
|
|
49
|
+
responseType: 'json'
|
|
50
|
+
};
|
|
51
|
+
const response = await request.get(requestOptions);
|
|
52
|
+
return response.value && response.value.length === 1 ? response.value[0].id : undefined;
|
|
53
|
+
}
|
|
54
|
+
return options.listId;
|
|
55
|
+
}
|
|
56
|
+
async removeToDoTask(options) {
|
|
57
|
+
try {
|
|
58
|
+
const toDoListId = await this.getToDoListId(options);
|
|
59
|
+
if (!toDoListId) {
|
|
60
|
+
throw `The list ${options.listName} cannot be found`;
|
|
61
|
+
}
|
|
62
|
+
const requestOptions = {
|
|
63
|
+
url: `${this.resource}/v1.0/me/todo/lists/${toDoListId}/tasks/${options.id}`,
|
|
64
|
+
headers: {
|
|
65
|
+
accept: "application/json;odata.metadata=none"
|
|
66
|
+
},
|
|
67
|
+
responseType: 'json'
|
|
68
|
+
};
|
|
69
|
+
await request.delete(requestOptions);
|
|
70
|
+
}
|
|
71
|
+
catch (err) {
|
|
72
|
+
this.handleRejectedODataJsonPromise(err);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
75
|
}
|
|
76
76
|
_TodoTaskRemoveCommand_instances = new WeakSet(), _TodoTaskRemoveCommand_initTelemetry = function _TodoTaskRemoveCommand_initTelemetry() {
|
|
77
77
|
this.telemetry.push((args) => {
|
|
@@ -28,7 +28,7 @@ class TodoTaskSetCommand extends GraphCommand {
|
|
|
28
28
|
const endpoint = `${this.resource}/v1.0`;
|
|
29
29
|
const data = this.mapRequestBody(args.options);
|
|
30
30
|
try {
|
|
31
|
-
const listId = await this.getTodoListId(args);
|
|
31
|
+
const listId = await this.getTodoListId(args.options);
|
|
32
32
|
const requestOptions = {
|
|
33
33
|
url: `${endpoint}/me/todo/lists/${listId}/tasks/${formatting.encodeQueryParameter(args.options.id)}`,
|
|
34
34
|
headers: {
|
|
@@ -45,25 +45,23 @@ class TodoTaskSetCommand extends GraphCommand {
|
|
|
45
45
|
this.handleRejectedODataJsonPromise(err);
|
|
46
46
|
}
|
|
47
47
|
}
|
|
48
|
-
getTodoListId(
|
|
49
|
-
if (
|
|
50
|
-
return
|
|
48
|
+
async getTodoListId(options) {
|
|
49
|
+
if (options.listId) {
|
|
50
|
+
return options.listId;
|
|
51
51
|
}
|
|
52
52
|
const requestOptions = {
|
|
53
|
-
url: `${this.resource}/v1.0/me/todo/lists?$filter=displayName eq '${escape(
|
|
53
|
+
url: `${this.resource}/v1.0/me/todo/lists?$filter=displayName eq '${escape(options.listName)}'`,
|
|
54
54
|
headers: {
|
|
55
55
|
accept: 'application/json;odata.metadata=none'
|
|
56
56
|
},
|
|
57
57
|
responseType: 'json'
|
|
58
58
|
};
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
return Promise.resolve(taskList.id);
|
|
66
|
-
});
|
|
59
|
+
const response = await request.get(requestOptions);
|
|
60
|
+
const taskList = response.value[0];
|
|
61
|
+
if (!taskList) {
|
|
62
|
+
throw `The specified task list does not exist`;
|
|
63
|
+
}
|
|
64
|
+
return taskList.id;
|
|
67
65
|
}
|
|
68
66
|
getDateTimeTimeZone(dateTime) {
|
|
69
67
|
return {
|
|
@@ -23,29 +23,8 @@ class YammerGroupUserRemoveCommand extends YammerCommand {
|
|
|
23
23
|
__classPrivateFieldGet(this, _YammerGroupUserRemoveCommand_instances, "m", _YammerGroupUserRemoveCommand_initValidators).call(this);
|
|
24
24
|
}
|
|
25
25
|
async commandAction(logger, args) {
|
|
26
|
-
const executeRemoveAction = async () => {
|
|
27
|
-
const endpoint = `${this.resource}/v1/group_memberships.json`;
|
|
28
|
-
const requestOptions = {
|
|
29
|
-
url: endpoint,
|
|
30
|
-
headers: {
|
|
31
|
-
accept: 'application/json;odata.metadata=none',
|
|
32
|
-
'content-type': 'application/json;odata=nometadata'
|
|
33
|
-
},
|
|
34
|
-
responseType: 'json',
|
|
35
|
-
data: {
|
|
36
|
-
group_id: args.options.groupId,
|
|
37
|
-
user_id: args.options.id
|
|
38
|
-
}
|
|
39
|
-
};
|
|
40
|
-
try {
|
|
41
|
-
await request.delete(requestOptions);
|
|
42
|
-
}
|
|
43
|
-
catch (err) {
|
|
44
|
-
this.handleRejectedODataJsonPromise(err);
|
|
45
|
-
}
|
|
46
|
-
};
|
|
47
26
|
if (args.options.force) {
|
|
48
|
-
await executeRemoveAction();
|
|
27
|
+
await this.executeRemoveAction(args.options);
|
|
49
28
|
}
|
|
50
29
|
else {
|
|
51
30
|
let messagePrompt = `Are you sure you want to leave group ${args.options.groupId}?`;
|
|
@@ -59,8 +38,28 @@ class YammerGroupUserRemoveCommand extends YammerCommand {
|
|
|
59
38
|
message: messagePrompt
|
|
60
39
|
});
|
|
61
40
|
if (result.continue) {
|
|
62
|
-
await executeRemoveAction();
|
|
41
|
+
await this.executeRemoveAction(args.options);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
async executeRemoveAction(options) {
|
|
46
|
+
const requestOptions = {
|
|
47
|
+
url: `${this.resource}/v1/group_memberships.json`,
|
|
48
|
+
headers: {
|
|
49
|
+
accept: 'application/json;odata.metadata=none',
|
|
50
|
+
'content-type': 'application/json;odata=nometadata'
|
|
51
|
+
},
|
|
52
|
+
responseType: 'json',
|
|
53
|
+
data: {
|
|
54
|
+
group_id: options.groupId,
|
|
55
|
+
user_id: options.id
|
|
63
56
|
}
|
|
57
|
+
};
|
|
58
|
+
try {
|
|
59
|
+
await request.delete(requestOptions);
|
|
60
|
+
}
|
|
61
|
+
catch (err) {
|
|
62
|
+
this.handleRejectedODataJsonPromise(err);
|
|
64
63
|
}
|
|
65
64
|
}
|
|
66
65
|
}
|
package/dist/telemetry.js
CHANGED
|
@@ -1,26 +1,42 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import child_process from 'child_process';
|
|
2
|
+
import path from 'path';
|
|
3
|
+
import url from 'url';
|
|
4
|
+
import { Cli } from './cli/Cli.js';
|
|
5
|
+
import { settingsNames } from './settingsNames.js';
|
|
6
|
+
import { pid } from './utils/pid.js';
|
|
7
|
+
import { session } from './utils/session.js';
|
|
8
|
+
const __dirname = url.fileURLToPath(new URL('.', import.meta.url));
|
|
9
|
+
function trackTelemetry(object) {
|
|
10
|
+
try {
|
|
11
|
+
const child = child_process.spawn('node', [path.join(__dirname, 'telemetryRunner.js')], {
|
|
12
|
+
stdio: ['pipe', 'ignore', 'ignore'],
|
|
13
|
+
detached: true
|
|
14
|
+
});
|
|
15
|
+
child.unref();
|
|
16
|
+
object.shell = pid.getProcessName(process.ppid) || '';
|
|
17
|
+
object.session = session.getId(process.ppid);
|
|
18
|
+
child.stdin.write(JSON.stringify(object));
|
|
19
|
+
child.stdin.end();
|
|
20
|
+
}
|
|
21
|
+
catch { }
|
|
22
|
+
}
|
|
23
|
+
export const telemetry = {
|
|
24
|
+
trackEvent: (commandName, properties) => {
|
|
6
25
|
if (Cli.getInstance().getSettingWithDefaultValue(settingsNames.disableTelemetry, false)) {
|
|
7
26
|
return;
|
|
8
27
|
}
|
|
9
|
-
|
|
10
|
-
|
|
28
|
+
trackTelemetry({
|
|
29
|
+
commandName,
|
|
11
30
|
properties
|
|
12
31
|
});
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
trackException(exception) {
|
|
32
|
+
},
|
|
33
|
+
trackException: (exception) => {
|
|
16
34
|
if (Cli.getInstance().getSettingWithDefaultValue(settingsNames.disableTelemetry, false)) {
|
|
17
35
|
return;
|
|
18
36
|
}
|
|
19
|
-
|
|
37
|
+
trackTelemetry({
|
|
20
38
|
exception
|
|
21
39
|
});
|
|
22
|
-
appInsights.flush();
|
|
23
40
|
}
|
|
24
|
-
}
|
|
25
|
-
export const telemetry = new Telemetry();
|
|
41
|
+
};
|
|
26
42
|
//# sourceMappingURL=telemetry.js.map
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import appInsights from './appInsights.js';
|
|
2
|
+
import * as process from 'process';
|
|
3
|
+
import * as fs from 'fs';
|
|
4
|
+
process.stdin.setEncoding('utf8');
|
|
5
|
+
try {
|
|
6
|
+
// read from stdin
|
|
7
|
+
const input = fs.readFileSync(0, 'utf-8');
|
|
8
|
+
const data = JSON.parse(input);
|
|
9
|
+
const { commandName, properties, exception, shell, session } = data;
|
|
10
|
+
appInsights.commonProperties.shell = shell;
|
|
11
|
+
appInsights.context.tags['ai.session.id'] = session;
|
|
12
|
+
if (exception) {
|
|
13
|
+
appInsights.trackException({
|
|
14
|
+
exception
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
else {
|
|
18
|
+
appInsights.trackEvent({
|
|
19
|
+
name: commandName,
|
|
20
|
+
properties
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
appInsights.flush();
|
|
24
|
+
}
|
|
25
|
+
catch { }
|
|
26
|
+
//# sourceMappingURL=telemetryRunner.js.map
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Cli } from '../cli/Cli.js';
|
|
2
|
+
import { settingsNames } from '../settingsNames.js';
|
|
3
|
+
let inquirer;
|
|
4
|
+
export const prompt = {
|
|
5
|
+
/* c8 ignore next 10 */
|
|
6
|
+
async forInput(config, answers) {
|
|
7
|
+
if (!inquirer) {
|
|
8
|
+
inquirer = await import('inquirer');
|
|
9
|
+
}
|
|
10
|
+
const cli = Cli.getInstance();
|
|
11
|
+
const errorOutput = cli.getSettingWithDefaultValue(settingsNames.errorOutput, 'stderr');
|
|
12
|
+
const prompt = inquirer.createPromptModule({ output: errorOutput === 'stderr' ? process.stderr : process.stdout });
|
|
13
|
+
return await prompt(config, answers);
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=prompt.js.map
|
|
@@ -18,7 +18,7 @@ m365 aad license list [options]
|
|
|
18
18
|
|
|
19
19
|
## Examples
|
|
20
20
|
|
|
21
|
-
List all licenses within the tenant
|
|
21
|
+
List all licenses within the tenant.
|
|
22
22
|
|
|
23
23
|
```sh
|
|
24
24
|
m365 aad license list
|
|
@@ -32,24 +32,30 @@ m365 aad license list
|
|
|
32
32
|
```json
|
|
33
33
|
[
|
|
34
34
|
{
|
|
35
|
+
"accountName": "contoso",
|
|
36
|
+
"accountId": "a9b44919-790b-4843-9b45-1923b8c3d61f",
|
|
37
|
+
"appliesTo": "User",
|
|
35
38
|
"capabilityStatus": "Enabled",
|
|
36
39
|
"consumedUnits": 1,
|
|
37
40
|
"id": "48a80680-7326-48cd-9935-b556b81d3a4e_c7df2760-2c81-4ef7-b578-5b5392b571df",
|
|
38
41
|
"skuId": "c7df2760-2c81-4ef7-b578-5b5392b571df",
|
|
39
|
-
"skuPartNumber": "ENTERPRISEPREMIUM",
|
|
40
|
-
"
|
|
42
|
+
"skuPartNumber": "ENTERPRISEPREMIUM",
|
|
43
|
+
"subscriptionIds": [
|
|
44
|
+
"b079cd48-7a9e-4d8b-af82-60f3adefe53b"
|
|
45
|
+
],
|
|
41
46
|
"prepaidUnits": {
|
|
42
47
|
"enabled": 10000,
|
|
43
48
|
"suspended": 0,
|
|
44
|
-
"warning": 0
|
|
49
|
+
"warning": 0,
|
|
50
|
+
"lockedOut": 0
|
|
45
51
|
},
|
|
46
52
|
"servicePlans": [
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
+
{
|
|
54
|
+
"servicePlanId": "8c098270-9dd4-4350-9b30-ba4703f3b36b",
|
|
55
|
+
"servicePlanName": "ADALLOM_S_O365",
|
|
56
|
+
"provisioningStatus": "Success",
|
|
57
|
+
"appliesTo": "User"
|
|
58
|
+
}
|
|
53
59
|
]
|
|
54
60
|
}
|
|
55
61
|
]
|
|
@@ -68,8 +74,8 @@ m365 aad license list
|
|
|
68
74
|
<TabItem value="CSV">
|
|
69
75
|
|
|
70
76
|
```csv
|
|
71
|
-
id,skuId,skuPartNumber
|
|
72
|
-
48a80680-7326-48cd-9935-b556b81d3a4e_c7df2760-2c81-4ef7-b578-5b5392b571df,c7df2760-2c81-4ef7-b578-5b5392b571df,ENTERPRISEPREMIUM
|
|
77
|
+
accountName,accountId,appliesTo,capabilityStatus,consumedUnits,id,skuId,skuPartNumber
|
|
78
|
+
contoso,a9b44919-790b-4843-9b45-1923b8c3d61f,User,Enabled,1,48a80680-7326-48cd-9935-b556b81d3a4e_c7df2760-2c81-4ef7-b578-5b5392b571df,c7df2760-2c81-4ef7-b578-5b5392b571df,ENTERPRISEPREMIUM
|
|
73
79
|
```
|
|
74
80
|
|
|
75
81
|
</TabItem>
|
|
@@ -84,16 +90,15 @@ m365 aad license list
|
|
|
84
90
|
|
|
85
91
|
Property | Value
|
|
86
92
|
---------|-------
|
|
93
|
+
accountName | contoso
|
|
94
|
+
accountId | a9b44919-790b-4843-9b45-1923b8c3d61f
|
|
95
|
+
appliesTo | User
|
|
87
96
|
capabilityStatus | Enabled
|
|
88
97
|
consumedUnits | 1
|
|
89
98
|
id | 48a80680-7326-48cd-9935-b556b81d3a4e_c7df2760-2c81-4ef7-b578-5b5392b571df
|
|
90
99
|
skuId | c7df2760-2c81-4ef7-b578-5b5392b571df
|
|
91
100
|
skuPartNumber | ENTERPRISEPREMIUM
|
|
92
|
-
appliesTo | User
|
|
93
|
-
prepaidUnits | {"enabled":10000,"suspended":0,"warning":0}
|
|
94
|
-
servicePlans | [{"servicePlanId":"8c098270-9dd4-4350-9b30-ba4703f3b36b","servicePlanName": "ADALLOM_S_O365","provisioningStatus": "Success","appliesTo": "User"}]
|
|
95
101
|
```
|
|
96
102
|
|
|
97
103
|
</TabItem>
|
|
98
104
|
</Tabs>
|
|
99
|
-
|
|
@@ -31,7 +31,7 @@ m365 aad m365group add [options]
|
|
|
31
31
|
: Comma-separated list of Microsoft 365 Group members
|
|
32
32
|
|
|
33
33
|
`--visibility [visibility]`
|
|
34
|
-
: Specifies the group join policy and group content visibility for groups.
|
|
34
|
+
: Specifies the group join policy and group content visibility for groups. Allowed values: `Private`, `Public`, or `HiddenMembership`. Defaults to `Public`.
|
|
35
35
|
|
|
36
36
|
`--allowMembersToPost [allowMembersToPost]`
|
|
37
37
|
: Set if only group members should be able to post conversations to the group
|
|
@@ -27,7 +27,17 @@ m365 aad m365group remove [options]
|
|
|
27
27
|
|
|
28
28
|
## Remarks
|
|
29
29
|
|
|
30
|
-
If the specified _id_ doesn't refer to an existing group, you will get a `Resource does not exist` error.
|
|
30
|
+
If the specified _id_ doesn't refer to an existing group, you will get a `Resource does not exist` error. Additionally, if you do not have access to the group or the associated group-connected site, you will get an `Access denied` error.
|
|
31
|
+
|
|
32
|
+
When you use `--skipRecycleBin` flag to remove a Microsoft 365 group permanently, the process involves deleting the associated group-connected site and the group, and then checking if the group has been moved to the deleted groups list. In some cases, it may take a few seconds for the group to appear in the deleted groups list.
|
|
33
|
+
|
|
34
|
+
To ensure a smooth deletion process, the command employs a retry mechanism with the following parameters:
|
|
35
|
+
|
|
36
|
+
- `maxRetries`: This parameter is set to 10 by default. It specifies the maximum number of times the command will check if the group has been moved to the deleted groups list.
|
|
37
|
+
|
|
38
|
+
- `intervalInMs`: This parameter is set to 5000 milliseconds (5 seconds) by default. It defines the time interval between each retry attempt.
|
|
39
|
+
|
|
40
|
+
If the group is successfully moved to the deleted groups list within the specified number of retries, the command will then proceed to permanently remove it from the tenant. If the group cannot be removed after all retries, it will remain in the deleted groups list.
|
|
31
41
|
|
|
32
42
|
## Examples
|
|
33
43
|
|
|
@@ -22,7 +22,7 @@ m365 aad user add [options]
|
|
|
22
22
|
: The user principal name (someuser@contoso.com).
|
|
23
23
|
|
|
24
24
|
`--accountEnabled [accountEnabled]`
|
|
25
|
-
: Whether the account is enabled.
|
|
25
|
+
: Whether the account is enabled. Allowed values: `true`, `false`. Defaults to `true`.
|
|
26
26
|
|
|
27
27
|
`--mailNickname [mailNickname]`
|
|
28
28
|
: The mail alias for the user. By default this value will be extracted from `userName`.
|
|
@@ -73,7 +73,7 @@ m365 aad user add [options]
|
|
|
73
73
|
|
|
74
74
|
:::info
|
|
75
75
|
|
|
76
|
-
To use this command you must be a Global administrator, User administrator or Privileged Authentication administrator
|
|
76
|
+
To use this command you must be a Global administrator, User administrator or Privileged Authentication administrator.
|
|
77
77
|
|
|
78
78
|
:::
|
|
79
79
|
|
|
@@ -174,7 +174,6 @@ m365 aad user add --displayName "John Doe" --userName "john.doe@contoso.com" --m
|
|
|
174
174
|
Property | Value
|
|
175
175
|
---------|-------
|
|
176
176
|
id | 990e2425-f595-43bc-85ed-b89a44093793
|
|
177
|
-
businessPhones | []
|
|
178
177
|
displayName | John Doe
|
|
179
178
|
givenName | John
|
|
180
179
|
jobTitle | Sales Manager
|
|
@@ -189,4 +188,3 @@ m365 aad user add --displayName "John Doe" --userName "john.doe@contoso.com" --m
|
|
|
189
188
|
|
|
190
189
|
</TabItem>
|
|
191
190
|
</Tabs>
|
|
192
|
-
|
|
@@ -37,13 +37,13 @@ The user must have a `usageLocation` value in order to assign a license to it.
|
|
|
37
37
|
|
|
38
38
|
## Examples
|
|
39
39
|
|
|
40
|
-
Assign specific licenses to a specific user by UPN
|
|
40
|
+
Assign specific licenses to a specific user by UPN.
|
|
41
41
|
|
|
42
42
|
```sh
|
|
43
43
|
m365 aad user license add --userName "john.doe@contoso.com" --ids "45715bb8-13f9-4bf6-927f-ef96c102d394,bea13e0c-3828-4daa-a392-28af7ff61a0f"
|
|
44
44
|
```
|
|
45
45
|
|
|
46
|
-
Assign specific licenses from a specific user by ID
|
|
46
|
+
Assign specific licenses from a specific user by ID.
|
|
47
47
|
|
|
48
48
|
```sh
|
|
49
49
|
m365 aad user license add --userId "5c241023-2ba5-4ea8-a516-a2481a3e6c51" --ids "45715bb8-13f9-4bf6-927f-ef96c102d394,bea13e0c-3828-4daa-a392-28af7ff61a0f"
|
|
@@ -107,7 +107,6 @@ m365 aad user license add --userId "5c241023-2ba5-4ea8-a516-a2481a3e6c51" --ids
|
|
|
107
107
|
|
|
108
108
|
Property | Value
|
|
109
109
|
---------|-------
|
|
110
|
-
businessPhones | []
|
|
111
110
|
displayName | John Doe
|
|
112
111
|
givenName | null
|
|
113
112
|
jobTitle | null
|
|
@@ -122,4 +121,3 @@ m365 aad user license add --userId "5c241023-2ba5-4ea8-a516-a2481a3e6c51" --ids
|
|
|
122
121
|
|
|
123
122
|
</TabItem>
|
|
124
123
|
</Tabs>
|
|
125
|
-
|
|
@@ -79,9 +79,9 @@ m365 aad user license list --userId 59f80e08-24b1-41f8-8586-16765fd830d3
|
|
|
79
79
|
<TabItem value="Text">
|
|
80
80
|
|
|
81
81
|
```text
|
|
82
|
-
id
|
|
83
|
-
|
|
84
|
-
|
|
82
|
+
id skuId skuPartNumber
|
|
83
|
+
------------------------------------------- ------------------------------------ -----------------------------------------
|
|
84
|
+
x4s03usaBkSMs5fbAhyttK6cK8RP6rdKlxeBV2I1zKw c42b9cae-ea4f-4ab7-9717-81576235ccac DEVELOPERPACK_E5
|
|
85
85
|
```
|
|
86
86
|
|
|
87
87
|
</TabItem>
|
|
@@ -107,9 +107,7 @@ m365 aad user license list --userId 59f80e08-24b1-41f8-8586-16765fd830d3
|
|
|
107
107
|
id | x4s03usaBkSMs5fbAhyttK6cK8RP6rdKlxeBV2I1zKw
|
|
108
108
|
skuId | c42b9cae-ea4f-4ab7-9717-81576235ccac
|
|
109
109
|
skuPartNumber | DEVELOPERPACK\_E5
|
|
110
|
-
servicePlans | [{"servicePlanId":"7547a3fe-08ee-4ccb-b430-5077c5041653","servicePlanName":"YAMMER\_ENTERPRISE","provisioningStatus":"Success","appliesTo":"User"}]
|
|
111
110
|
```
|
|
112
111
|
|
|
113
112
|
</TabItem>
|
|
114
113
|
</Tabs>
|
|
115
|
-
|