@pnp/cli-microsoft365 12.0.0-beta.0be7d8d → 12.0.0-beta.10c5833
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/allCommands.json +1 -1
- package/allCommandsFull.json +1 -1
- package/dist/Auth.js +2 -6
- package/dist/auth/FileTokenStorage.js +0 -3
- package/dist/auth/msalCachePlugin.js +201 -12
- package/dist/m365/commands/logout.js +2 -4
- package/dist/m365/entra/commands/m365group/m365group-remove.js +4 -3
- package/dist/m365/spe/commands/container/container-remove.js +6 -7
- package/dist/m365/spo/commands/file/file-archive.js +1 -1
- package/dist/m365/spo/commands/file/file-remove.js +5 -5
- package/dist/m365/spo/commands/file/file-unarchive.js +1 -1
- package/dist/m365/spo/commands/folder/folder-archive.js +1 -1
- package/dist/m365/spo/commands/folder/folder-remove.js +5 -5
- package/dist/m365/spo/commands/hidedefaultthemes/hidedefaultthemes-get.js +5 -0
- package/dist/m365/spo/commands/hidedefaultthemes/hidedefaultthemes-set.js +8 -26
- package/dist/m365/spo/commands/homesite/homesite-list.js +5 -0
- package/dist/m365/spo/commands/list/list-remove.js +4 -4
- package/dist/m365/spo/commands/listitem/listitem-batch-remove.js +5 -4
- package/dist/m365/spo/commands/listitem/listitem-remove.js +8 -5
- package/dist/m365/spo/commands/page/page-remove.js +7 -7
- package/dist/m365/spo/commands/site/site-list.js +60 -49
- package/dist/m365/spo/commands/site/site-remove.js +7 -7
- package/dist/m365/spo/commands/spo-get.js +5 -0
- package/dist/m365/spo/commands/spo-set.js +10 -21
- package/dist/m365/spo/commands/storageentity/storageentity-get.js +23 -17
- package/dist/m365/spo/commands/storageentity/storageentity-list.js +39 -36
- package/dist/m365/spo/commands/storageentity/storageentity-remove.js +26 -33
- package/dist/m365/spo/commands/storageentity/storageentity-set.js +26 -36
- package/dist/m365/spo/commands/tenant/tenant-appcatalog-add.js +1 -1
- package/dist/m365/spo/commands/user/user-ensure.js +24 -60
- package/dist/m365/spo/commands/user/user-get.js +25 -65
- package/dist/m365/spo/commands/user/user-list.js +10 -18
- package/dist/m365/spo/commands/user/user-remove.js +26 -68
- package/dist/m365/spo/commands/userprofile/userprofile-get.js +10 -23
- package/dist/m365/spo/commands/userprofile/userprofile-set.js +10 -19
- package/dist/m365/spo/commands/web/web-add.js +20 -55
- package/dist/m365/spo/commands/web/web-clientsidewebpart-list.js +10 -18
- package/dist/m365/spo/commands/web/web-get.js +12 -30
- package/dist/m365/spo/commands/web/web-installedlanguage-list.js +10 -18
- package/dist/m365/spo/commands/web/web-list.js +10 -18
- package/dist/m365/spo/commands/web/web-reindex.js +10 -18
- package/dist/m365/spo/commands/web/web-remove.js +11 -27
- package/dist/m365/spo/commands/web/web-retentionlabel-list.js +10 -18
- package/dist/m365/spo/commands/web/web-roleassignment-add.js +40 -64
- package/dist/m365/spo/commands/web/web-roleassignment-remove.js +31 -58
- package/dist/m365/spo/commands/web/web-roleinheritance-break.js +12 -36
- package/dist/m365/spo/commands/web/web-roleinheritance-reset.js +11 -29
- package/dist/m365/spo/commands/web/web-rule-get.js +47 -0
- package/dist/m365/spo/commands/web/web-rule-list.js +6 -4
- package/dist/m365/spo/commands/web/web-rule-remove.js +0 -3
- package/dist/m365/spo/commands/web/web-set.js +26 -96
- package/dist/m365/spo/commands.js +1 -2
- package/dist/m365/teams/commands/channel/channel-list.js +2 -6
- package/dist/m365/teams/commands/channel/channel-member-add.js +2 -6
- package/dist/m365/teams/commands/channel/channel-member-list.js +2 -6
- package/dist/m365/teams/commands/channel/channel-member-remove.js +2 -6
- package/dist/m365/teams/commands/channel/channel-member-set.js +2 -6
- package/dist/m365/teams/commands/channel/channel-remove.js +2 -8
- package/dist/m365/teams/commands/channel/channel-set.js +2 -8
- package/dist/m365/teams/commands/tab/tab-get.js +2 -6
- package/dist/m365/teams/commands/team/team-archive.js +2 -6
- package/dist/m365/teams/commands/team/team-remove.js +2 -6
- package/dist/m365/teams/commands/team/team-unarchive.js +2 -6
- package/docs/docs/cmd/entra/m365group/m365group-remove.mdx +4 -4
- package/docs/docs/cmd/spe/container/container-remove.mdx +5 -5
- package/docs/docs/cmd/spo/file/file-archive.mdx +8 -0
- package/docs/docs/cmd/spo/file/file-remove.mdx +4 -4
- package/docs/docs/cmd/spo/file/file-unarchive.mdx +8 -0
- package/docs/docs/cmd/spo/folder/folder-archive.mdx +6 -0
- package/docs/docs/cmd/spo/folder/folder-remove.mdx +4 -4
- package/docs/docs/cmd/spo/list/list-remove.mdx +4 -4
- package/docs/docs/cmd/spo/listitem/listitem-batch-remove.mdx +8 -2
- package/docs/docs/cmd/spo/listitem/listitem-remove.mdx +8 -2
- package/docs/docs/cmd/spo/page/page-remove.mdx +4 -4
- package/docs/docs/cmd/spo/site/site-apppermission-add.mdx +52 -21
- package/docs/docs/cmd/spo/site/site-list.mdx +22 -1
- package/docs/docs/cmd/spo/site/site-remove.mdx +3 -3
- package/docs/docs/cmd/spo/storageentity/storageentity-get.mdx +11 -2
- package/docs/docs/cmd/spo/storageentity/storageentity-list.mdx +9 -3
- package/docs/docs/cmd/spo/storageentity/storageentity-remove.mdx +6 -6
- package/docs/docs/cmd/spo/storageentity/storageentity-set.mdx +10 -4
- package/docs/docs/cmd/spo/web/web-rule-get.mdx +108 -0
- package/docs/docs/cmd/spo/web/web-rule-list.mdx +8 -12
- package/docs/docs/cmd/spo/web/web-rule-remove.mdx +0 -6
- package/docs/docs/cmd/teams/app/app-install.mdx +21 -0
- package/docs/docs/cmd/teams/app/app-list.mdx +19 -0
- package/docs/docs/cmd/teams/app/app-publish.mdx +17 -0
- package/docs/docs/cmd/teams/app/app-remove.mdx +19 -0
- package/docs/docs/cmd/teams/app/app-uninstall.mdx +21 -0
- package/docs/docs/cmd/teams/app/app-update.mdx +19 -0
- package/docs/docs/cmd/tenant/people/people-profilecardproperty-add.mdx +19 -0
- package/docs/docs/cmd/tenant/people/people-profilecardproperty-get.mdx +19 -0
- package/docs/docs/cmd/tenant/people/people-profilecardproperty-list.mdx +19 -0
- package/docs/docs/cmd/tenant/people/people-profilecardproperty-remove.mdx +19 -0
- package/docs/docs/cmd/tenant/people/people-profilecardproperty-set.mdx +19 -0
- package/docs/docs/cmd/tenant/serviceannouncement/serviceannouncement-health-get.mdx +19 -0
- package/docs/docs/cmd/tenant/serviceannouncement/serviceannouncement-health-list.mdx +19 -0
- package/docs/docs/cmd/tenant/serviceannouncement/serviceannouncement-healthissue-get.mdx +19 -0
- package/docs/docs/cmd/tenant/serviceannouncement/serviceannouncement-healthissue-list.mdx +19 -0
- package/docs/docs/cmd/tenant/serviceannouncement/serviceannouncement-message-get.mdx +19 -0
- package/docs/docs/cmd/tenant/serviceannouncement/serviceannouncement-message-list.mdx +19 -0
- package/npm-shrinkwrap.json +432 -0
- package/package.json +6 -1
|
@@ -4,8 +4,8 @@ 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 _TeamsChannelListCommand_instances, _TeamsChannelListCommand_initTelemetry, _TeamsChannelListCommand_initOptions, _TeamsChannelListCommand_initValidators, _TeamsChannelListCommand_initOptionSets;
|
|
7
|
-
import { entraGroup } from '../../../../utils/entraGroup.js';
|
|
8
7
|
import { odata } from '../../../../utils/odata.js';
|
|
8
|
+
import { teams } from '../../../../utils/teams.js';
|
|
9
9
|
import { validation } from '../../../../utils/validation.js';
|
|
10
10
|
import GraphCommand from '../../../base/GraphCommand.js';
|
|
11
11
|
import commands from '../../commands.js';
|
|
@@ -31,11 +31,7 @@ class TeamsChannelListCommand extends GraphCommand {
|
|
|
31
31
|
if (args.options.teamId) {
|
|
32
32
|
return args.options.teamId;
|
|
33
33
|
}
|
|
34
|
-
|
|
35
|
-
if (group.resourceProvisioningOptions.indexOf('Team') === -1) {
|
|
36
|
-
throw 'The specified team does not exist in the Microsoft Teams';
|
|
37
|
-
}
|
|
38
|
-
return group.id;
|
|
34
|
+
return teams.getTeamIdByDisplayName(args.options.teamName);
|
|
39
35
|
}
|
|
40
36
|
async commandAction(logger, args) {
|
|
41
37
|
try {
|
|
@@ -5,8 +5,8 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
5
5
|
};
|
|
6
6
|
var _TeamsChannelMemberAddCommand_instances, _TeamsChannelMemberAddCommand_initTelemetry, _TeamsChannelMemberAddCommand_initOptions, _TeamsChannelMemberAddCommand_initValidators, _TeamsChannelMemberAddCommand_initOptionSets;
|
|
7
7
|
import request from '../../../../request.js';
|
|
8
|
-
import { entraGroup } from '../../../../utils/entraGroup.js';
|
|
9
8
|
import { formatting } from '../../../../utils/formatting.js';
|
|
9
|
+
import { teams } from '../../../../utils/teams.js';
|
|
10
10
|
import { validation } from '../../../../utils/validation.js';
|
|
11
11
|
import GraphCommand from '../../../base/GraphCommand.js';
|
|
12
12
|
import commands from '../../commands.js';
|
|
@@ -63,11 +63,7 @@ class TeamsChannelMemberAddCommand extends GraphCommand {
|
|
|
63
63
|
if (args.options.teamId) {
|
|
64
64
|
return args.options.teamId;
|
|
65
65
|
}
|
|
66
|
-
|
|
67
|
-
if (group.resourceProvisioningOptions.indexOf('Team') === -1) {
|
|
68
|
-
throw 'The specified team does not exist in the Microsoft Teams';
|
|
69
|
-
}
|
|
70
|
-
return group.id;
|
|
66
|
+
return teams.getTeamIdByDisplayName(args.options.teamName);
|
|
71
67
|
}
|
|
72
68
|
async getChannelId(teamId, args) {
|
|
73
69
|
if (args.options.channelId) {
|
|
@@ -5,9 +5,9 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
5
5
|
};
|
|
6
6
|
var _TeamsChannelMemberListCommand_instances, _TeamsChannelMemberListCommand_initTelemetry, _TeamsChannelMemberListCommand_initOptions, _TeamsChannelMemberListCommand_initValidators, _TeamsChannelMemberListCommand_initOptionSets;
|
|
7
7
|
import request from '../../../../request.js';
|
|
8
|
-
import { entraGroup } from '../../../../utils/entraGroup.js';
|
|
9
8
|
import { formatting } from '../../../../utils/formatting.js';
|
|
10
9
|
import { odata } from '../../../../utils/odata.js';
|
|
10
|
+
import { teams } from '../../../../utils/teams.js';
|
|
11
11
|
import { validation } from '../../../../utils/validation.js';
|
|
12
12
|
import GraphCommand from '../../../base/GraphCommand.js';
|
|
13
13
|
import commands from '../../commands.js';
|
|
@@ -55,11 +55,7 @@ class TeamsChannelMemberListCommand extends GraphCommand {
|
|
|
55
55
|
if (args.options.teamId) {
|
|
56
56
|
return args.options.teamId;
|
|
57
57
|
}
|
|
58
|
-
|
|
59
|
-
if (group.resourceProvisioningOptions.indexOf('Team') === -1) {
|
|
60
|
-
throw 'The specified team does not exist in the Microsoft Teams';
|
|
61
|
-
}
|
|
62
|
-
return group.id;
|
|
58
|
+
return teams.getTeamIdByDisplayName(args.options.teamName);
|
|
63
59
|
}
|
|
64
60
|
async getChannelId(args) {
|
|
65
61
|
if (args.options.channelId) {
|
|
@@ -6,8 +6,8 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
6
6
|
var _TeamsChannelMemberRemoveCommand_instances, _TeamsChannelMemberRemoveCommand_initTelemetry, _TeamsChannelMemberRemoveCommand_initOptions, _TeamsChannelMemberRemoveCommand_initValidators, _TeamsChannelMemberRemoveCommand_initOptionSets;
|
|
7
7
|
import { cli } from '../../../../cli/cli.js';
|
|
8
8
|
import request from '../../../../request.js';
|
|
9
|
-
import { entraGroup } from '../../../../utils/entraGroup.js';
|
|
10
9
|
import { formatting } from '../../../../utils/formatting.js';
|
|
10
|
+
import { teams } from '../../../../utils/teams.js';
|
|
11
11
|
import { validation } from '../../../../utils/validation.js';
|
|
12
12
|
import GraphCommand from '../../../base/GraphCommand.js';
|
|
13
13
|
import commands from '../../commands.js';
|
|
@@ -72,11 +72,7 @@ class TeamsChannelMemberRemoveCommand extends GraphCommand {
|
|
|
72
72
|
if (args.options.teamId) {
|
|
73
73
|
return args.options.teamId;
|
|
74
74
|
}
|
|
75
|
-
|
|
76
|
-
if (group.resourceProvisioningOptions.indexOf('Team') === -1) {
|
|
77
|
-
throw 'The specified team does not exist in the Microsoft Teams';
|
|
78
|
-
}
|
|
79
|
-
return group.id;
|
|
75
|
+
return teams.getTeamIdByDisplayName(args.options.teamName);
|
|
80
76
|
}
|
|
81
77
|
async getChannelId(args) {
|
|
82
78
|
if (args.options.channelId) {
|
|
@@ -5,8 +5,8 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
5
5
|
};
|
|
6
6
|
var _TeamsChannelMemberSetCommand_instances, _TeamsChannelMemberSetCommand_initTelemetry, _TeamsChannelMemberSetCommand_initOptions, _TeamsChannelMemberSetCommand_initValidators, _TeamsChannelMemberSetCommand_initOptionSets;
|
|
7
7
|
import request from '../../../../request.js';
|
|
8
|
-
import { entraGroup } from '../../../../utils/entraGroup.js';
|
|
9
8
|
import { formatting } from '../../../../utils/formatting.js';
|
|
9
|
+
import { teams } from '../../../../utils/teams.js';
|
|
10
10
|
import { validation } from '../../../../utils/validation.js';
|
|
11
11
|
import GraphCommand from '../../../base/GraphCommand.js';
|
|
12
12
|
import commands from '../../commands.js';
|
|
@@ -56,11 +56,7 @@ class TeamsChannelMemberSetCommand extends GraphCommand {
|
|
|
56
56
|
if (args.options.teamId) {
|
|
57
57
|
return args.options.teamId;
|
|
58
58
|
}
|
|
59
|
-
|
|
60
|
-
if (group.resourceProvisioningOptions.indexOf('Team') === -1) {
|
|
61
|
-
throw `The specified team does not exist in the Microsoft Teams`;
|
|
62
|
-
}
|
|
63
|
-
return group.id;
|
|
59
|
+
return teams.getTeamIdByDisplayName(args.options.teamName);
|
|
64
60
|
}
|
|
65
61
|
async getChannelId(args) {
|
|
66
62
|
if (args.options.channelId) {
|
|
@@ -6,8 +6,8 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
6
6
|
var _TeamsChannelRemoveCommand_instances, _TeamsChannelRemoveCommand_initTelemetry, _TeamsChannelRemoveCommand_initOptions, _TeamsChannelRemoveCommand_initValidators, _TeamsChannelRemoveCommand_initOptionSets;
|
|
7
7
|
import { cli } from '../../../../cli/cli.js';
|
|
8
8
|
import request from '../../../../request.js';
|
|
9
|
-
import { entraGroup } from '../../../../utils/entraGroup.js';
|
|
10
9
|
import { formatting } from '../../../../utils/formatting.js';
|
|
10
|
+
import { teams } from '../../../../utils/teams.js';
|
|
11
11
|
import { validation } from '../../../../utils/validation.js';
|
|
12
12
|
import GraphCommand from '../../../base/GraphCommand.js';
|
|
13
13
|
import commands from '../../commands.js';
|
|
@@ -63,13 +63,7 @@ class TeamsChannelRemoveCommand extends GraphCommand {
|
|
|
63
63
|
if (args.options.teamId) {
|
|
64
64
|
return args.options.teamId;
|
|
65
65
|
}
|
|
66
|
-
|
|
67
|
-
if (group.resourceProvisioningOptions.indexOf('Team') === -1) {
|
|
68
|
-
throw 'The specified team does not exist';
|
|
69
|
-
}
|
|
70
|
-
else {
|
|
71
|
-
return group.id;
|
|
72
|
-
}
|
|
66
|
+
return teams.getTeamIdByDisplayName(args.options.teamName);
|
|
73
67
|
}
|
|
74
68
|
async getChannelId(args) {
|
|
75
69
|
if (args.options.id) {
|
|
@@ -5,8 +5,8 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
5
5
|
};
|
|
6
6
|
var _TeamsChannelSetCommand_instances, _TeamsChannelSetCommand_initTelemetry, _TeamsChannelSetCommand_initOptions, _TeamsChannelSetCommand_initValidators, _TeamsChannelSetCommand_initOptionSets;
|
|
7
7
|
import request from '../../../../request.js';
|
|
8
|
-
import { entraGroup } from '../../../../utils/entraGroup.js';
|
|
9
8
|
import { formatting } from '../../../../utils/formatting.js';
|
|
9
|
+
import { teams } from '../../../../utils/teams.js';
|
|
10
10
|
import { validation } from '../../../../utils/validation.js';
|
|
11
11
|
import GraphCommand from '../../../base/GraphCommand.js';
|
|
12
12
|
import commands from '../../commands.js';
|
|
@@ -58,13 +58,7 @@ class TeamsChannelSetCommand extends GraphCommand {
|
|
|
58
58
|
if (args.options.teamId) {
|
|
59
59
|
return args.options.teamId;
|
|
60
60
|
}
|
|
61
|
-
|
|
62
|
-
if (group.resourceProvisioningOptions.indexOf('Team') === -1) {
|
|
63
|
-
throw 'The specified team does not exist';
|
|
64
|
-
}
|
|
65
|
-
else {
|
|
66
|
-
return group.id;
|
|
67
|
-
}
|
|
61
|
+
return teams.getTeamIdByDisplayName(args.options.teamName);
|
|
68
62
|
}
|
|
69
63
|
async getChannelId(teamId, args) {
|
|
70
64
|
if (args.options.id) {
|
|
@@ -5,8 +5,8 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
5
5
|
};
|
|
6
6
|
var _TeamsTabGetCommand_instances, _TeamsTabGetCommand_initTelemetry, _TeamsTabGetCommand_initOptions, _TeamsTabGetCommand_initValidators, _TeamsTabGetCommand_initOptionSets;
|
|
7
7
|
import request from '../../../../request.js';
|
|
8
|
-
import { entraGroup } from '../../../../utils/entraGroup.js';
|
|
9
8
|
import { formatting } from '../../../../utils/formatting.js';
|
|
9
|
+
import { teams } from '../../../../utils/teams.js';
|
|
10
10
|
import { validation } from '../../../../utils/validation.js';
|
|
11
11
|
import GraphCommand from '../../../base/GraphCommand.js';
|
|
12
12
|
import commands from '../../commands.js';
|
|
@@ -31,11 +31,7 @@ class TeamsTabGetCommand extends GraphCommand {
|
|
|
31
31
|
if (args.options.teamId) {
|
|
32
32
|
return args.options.teamId;
|
|
33
33
|
}
|
|
34
|
-
|
|
35
|
-
if (group.resourceProvisioningOptions.indexOf('Team') === -1) {
|
|
36
|
-
throw 'The specified team does not exist in the Microsoft Teams';
|
|
37
|
-
}
|
|
38
|
-
return group.id;
|
|
34
|
+
return teams.getTeamIdByDisplayName(args.options.teamName);
|
|
39
35
|
}
|
|
40
36
|
async getChannelId(args) {
|
|
41
37
|
if (args.options.channelId) {
|
|
@@ -5,8 +5,8 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
5
5
|
};
|
|
6
6
|
var _TeamsTeamArchiveCommand_instances, _TeamsTeamArchiveCommand_initTelemetry, _TeamsTeamArchiveCommand_initOptions, _TeamsTeamArchiveCommand_initValidators, _TeamsTeamArchiveCommand_initOptionSets;
|
|
7
7
|
import request from '../../../../request.js';
|
|
8
|
-
import { entraGroup } from '../../../../utils/entraGroup.js';
|
|
9
8
|
import { formatting } from '../../../../utils/formatting.js';
|
|
9
|
+
import { teams } from '../../../../utils/teams.js';
|
|
10
10
|
import { validation } from '../../../../utils/validation.js';
|
|
11
11
|
import GraphCommand from '../../../base/GraphCommand.js';
|
|
12
12
|
import commands from '../../commands.js';
|
|
@@ -29,11 +29,7 @@ class TeamsTeamArchiveCommand extends GraphCommand {
|
|
|
29
29
|
if (args.options.id) {
|
|
30
30
|
return args.options.id;
|
|
31
31
|
}
|
|
32
|
-
|
|
33
|
-
if (group.resourceProvisioningOptions.indexOf('Team') === -1) {
|
|
34
|
-
throw 'The specified team does not exist in the Microsoft Teams';
|
|
35
|
-
}
|
|
36
|
-
return group.id;
|
|
32
|
+
return teams.getTeamIdByDisplayName(args.options.name);
|
|
37
33
|
}
|
|
38
34
|
async commandAction(logger, args) {
|
|
39
35
|
const siteReadOnlyForMembers = args.options.shouldSetSpoSiteReadOnlyForMembers === true;
|
|
@@ -6,8 +6,8 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
6
6
|
var _TeamsTeamRemoveCommand_instances, _TeamsTeamRemoveCommand_initTelemetry, _TeamsTeamRemoveCommand_initOptions, _TeamsTeamRemoveCommand_initValidators, _TeamsTeamRemoveCommand_initOptionSets;
|
|
7
7
|
import { cli } from '../../../../cli/cli.js';
|
|
8
8
|
import request from '../../../../request.js';
|
|
9
|
-
import { entraGroup } from '../../../../utils/entraGroup.js';
|
|
10
9
|
import { formatting } from '../../../../utils/formatting.js';
|
|
10
|
+
import { teams } from '../../../../utils/teams.js';
|
|
11
11
|
import { validation } from '../../../../utils/validation.js';
|
|
12
12
|
import GraphCommand from '../../../base/GraphCommand.js';
|
|
13
13
|
import commands from '../../commands.js';
|
|
@@ -30,11 +30,7 @@ class TeamsTeamRemoveCommand extends GraphCommand {
|
|
|
30
30
|
if (args.options.id) {
|
|
31
31
|
return args.options.id;
|
|
32
32
|
}
|
|
33
|
-
|
|
34
|
-
if (group.resourceProvisioningOptions.indexOf('Team') === -1) {
|
|
35
|
-
throw `The specified team does not exist in the Microsoft Teams`;
|
|
36
|
-
}
|
|
37
|
-
return group.id;
|
|
33
|
+
return teams.getTeamIdByDisplayName(args.options.name);
|
|
38
34
|
}
|
|
39
35
|
async commandAction(logger, args) {
|
|
40
36
|
const removeTeam = async () => {
|
|
@@ -5,8 +5,8 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
5
5
|
};
|
|
6
6
|
var _TeamsTeamUnarchiveCommand_instances, _TeamsTeamUnarchiveCommand_initOptions, _TeamsTeamUnarchiveCommand_initValidators, _TeamsTeamUnarchiveCommand_initOptionSets;
|
|
7
7
|
import request from '../../../../request.js';
|
|
8
|
-
import { entraGroup } from '../../../../utils/entraGroup.js';
|
|
9
8
|
import { formatting } from '../../../../utils/formatting.js';
|
|
9
|
+
import { teams } from '../../../../utils/teams.js';
|
|
10
10
|
import { validation } from '../../../../utils/validation.js';
|
|
11
11
|
import GraphCommand from '../../../base/GraphCommand.js';
|
|
12
12
|
import commands from '../../commands.js';
|
|
@@ -28,11 +28,7 @@ class TeamsTeamUnarchiveCommand extends GraphCommand {
|
|
|
28
28
|
if (args.options.id) {
|
|
29
29
|
return args.options.id;
|
|
30
30
|
}
|
|
31
|
-
|
|
32
|
-
if (group.resourceProvisioningOptions.indexOf('Team') === -1) {
|
|
33
|
-
throw 'The specified team does not exist in the Microsoft Teams';
|
|
34
|
-
}
|
|
35
|
-
return group.id;
|
|
31
|
+
return teams.getTeamIdByDisplayName(args.options.name);
|
|
36
32
|
}
|
|
37
33
|
async commandAction(logger, args) {
|
|
38
34
|
const endpoint = `${this.resource}/v1.0`;
|
|
@@ -24,8 +24,8 @@ m365 entra m365group remove [options]
|
|
|
24
24
|
`-f, --force`
|
|
25
25
|
: Don't prompt for confirming removing the group
|
|
26
26
|
|
|
27
|
-
`--
|
|
28
|
-
:
|
|
27
|
+
`--permanent`
|
|
28
|
+
: Permanently remove the group without leaving it in the recycle bin.
|
|
29
29
|
```
|
|
30
30
|
|
|
31
31
|
<Global />
|
|
@@ -53,7 +53,7 @@ m365 entra m365group remove [options]
|
|
|
53
53
|
|
|
54
54
|
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.
|
|
55
55
|
|
|
56
|
-
When you use `--
|
|
56
|
+
When you use the `--permanent` 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.
|
|
57
57
|
|
|
58
58
|
To ensure a smooth deletion process, the command employs a retry mechanism with the following parameters:
|
|
59
59
|
|
|
@@ -80,7 +80,7 @@ m365 entra m365group remove --displayName Finance --force
|
|
|
80
80
|
Remove group with id _28beab62-7540-4db1-a23f-29a6018a3848_ without prompting for confirmation and without moving it to the Recycle Bin
|
|
81
81
|
|
|
82
82
|
```sh
|
|
83
|
-
m365 entra m365group remove --id 28beab62-7540-4db1-a23f-29a6018a3848 --force --
|
|
83
|
+
m365 entra m365group remove --id 28beab62-7540-4db1-a23f-29a6018a3848 --force --permanent
|
|
84
84
|
```
|
|
85
85
|
|
|
86
86
|
## Response
|
|
@@ -27,8 +27,8 @@ m365 spe container remove [options]
|
|
|
27
27
|
`--containerTypeName [containerTypeName]`
|
|
28
28
|
: The name of the container type. Specify either `containerTypeId` or `containerTypeName` when using `name` but not both.
|
|
29
29
|
|
|
30
|
-
`--
|
|
31
|
-
:
|
|
30
|
+
`--permanent`
|
|
31
|
+
: Permanently delete the container instance instead of moving it to the recycle bin.
|
|
32
32
|
|
|
33
33
|
`-f, --force`
|
|
34
34
|
: Do not prompt for confirmation.
|
|
@@ -67,16 +67,16 @@ The command is based on an API that is currently in preview and is subject to ch
|
|
|
67
67
|
|
|
68
68
|
## Examples
|
|
69
69
|
|
|
70
|
-
|
|
70
|
+
Move a container specified by ID to the recycle bin.
|
|
71
71
|
|
|
72
72
|
```sh
|
|
73
73
|
m365 spe container remove --id "b!ISJs1WRro0y0EWgkUYcktDa0mE8zSlFEqFzqRn70Zwp1CEtDEBZgQICPkRbil_5Z"
|
|
74
74
|
```
|
|
75
75
|
|
|
76
|
-
|
|
76
|
+
Permanently remove a container by ID.
|
|
77
77
|
|
|
78
78
|
```sh
|
|
79
|
-
m365 spe container remove --id "b!ISJs1WRro0y0EWgkUYcktDa0mE8zSlFEqFzqRn70Zwp1CEtDEBZgQICPkRbil_5Z" --
|
|
79
|
+
m365 spe container remove --id "b!ISJs1WRro0y0EWgkUYcktDa0mE8zSlFEqFzqRn70Zwp1CEtDEBZgQICPkRbil_5Z" --permanent
|
|
80
80
|
```
|
|
81
81
|
|
|
82
82
|
Remove a container by name specifying the container type id.
|
|
@@ -30,6 +30,14 @@ m365 spo file archive [options]
|
|
|
30
30
|
|
|
31
31
|
<Global />
|
|
32
32
|
|
|
33
|
+
## Remarks
|
|
34
|
+
|
|
35
|
+
:::warning
|
|
36
|
+
|
|
37
|
+
You will be able to reactivate an archived file instantly for the first 7 days. After that, it will take up to 24 hours to reactivate.
|
|
38
|
+
|
|
39
|
+
:::
|
|
40
|
+
|
|
33
41
|
## Permissions
|
|
34
42
|
|
|
35
43
|
<Tabs>
|
|
@@ -30,8 +30,8 @@ m365 spo page template remove
|
|
|
30
30
|
`--url [url]`
|
|
31
31
|
: The server- or site-relative decoded URL of the file to remove. Specify either `id` or `url` but not both.
|
|
32
32
|
|
|
33
|
-
`--
|
|
34
|
-
:
|
|
33
|
+
`--permanent`
|
|
34
|
+
: Permanently delete the file instead of moving it to the recycle bin.
|
|
35
35
|
|
|
36
36
|
`--bypassSharedLock`
|
|
37
37
|
: Remove the file even if it is locked for shared use.
|
|
@@ -75,10 +75,10 @@ Remove a file by site-relative URL.
|
|
|
75
75
|
m365 spo file remove --webUrl https://contoso.sharepoint.com/sites/project-x --url "/Shared Documents/Test.docx"
|
|
76
76
|
```
|
|
77
77
|
|
|
78
|
-
|
|
78
|
+
Permanently remove a file by server-relative URL.
|
|
79
79
|
|
|
80
80
|
```sh
|
|
81
|
-
m365 spo file remove --webUrl https://contoso.sharepoint.com/sites/project-x --url "/sites/project-x/Shared Documents/Test.docx" --
|
|
81
|
+
m365 spo file remove --webUrl https://contoso.sharepoint.com/sites/project-x --url "/sites/project-x/Shared Documents/Test.docx" --permanent
|
|
82
82
|
```
|
|
83
83
|
|
|
84
84
|
Remove a file that is locked
|
|
@@ -32,6 +32,12 @@ m365 spo folder archive [options]
|
|
|
32
32
|
|
|
33
33
|
## Remarks
|
|
34
34
|
|
|
35
|
+
:::warning
|
|
36
|
+
|
|
37
|
+
You will be able to reactivate an archived folder instantly for the first 7 days. After that, it will take up to 24 hours to reactivate.
|
|
38
|
+
|
|
39
|
+
:::
|
|
40
|
+
|
|
35
41
|
Folder archival can take some time to complete, as the status might not be reflected immediately.
|
|
36
42
|
|
|
37
43
|
## Permissions
|
|
@@ -21,8 +21,8 @@ m365 spo folder remove [options]
|
|
|
21
21
|
`--url <url>`
|
|
22
22
|
: The server- or site-relative decoded URL of the folder to delete.
|
|
23
23
|
|
|
24
|
-
`--
|
|
25
|
-
:
|
|
24
|
+
`--permanent`
|
|
25
|
+
: Permanently deletes the folder instead of moving it to the recycle bin.
|
|
26
26
|
|
|
27
27
|
`-f, --force`
|
|
28
28
|
: Don't prompt for confirming deleting the folder.
|
|
@@ -61,10 +61,10 @@ Remove a folder with a specific site-relative URL.
|
|
|
61
61
|
m365 spo folder remove --webUrl https://contoso.sharepoint.com/sites/project-x --url '/Shared Documents/My Folder'
|
|
62
62
|
```
|
|
63
63
|
|
|
64
|
-
|
|
64
|
+
Permanently remove a folder with a specific server-relative URL.
|
|
65
65
|
|
|
66
66
|
```sh
|
|
67
|
-
m365 spo folder remove --webUrl https://contoso.sharepoint.com/sites/project-x --url '/sites/project-x/Shared Documents/My Folder' --
|
|
67
|
+
m365 spo folder remove --webUrl https://contoso.sharepoint.com/sites/project-x --url '/sites/project-x/Shared Documents/My Folder' --permanent
|
|
68
68
|
```
|
|
69
69
|
|
|
70
70
|
## Response
|
|
@@ -24,8 +24,8 @@ m365 spo list remove [options]
|
|
|
24
24
|
`-t, --title [title]`
|
|
25
25
|
: Title of the list to remove. Specify either `id` or `title` but not both.
|
|
26
26
|
|
|
27
|
-
`--
|
|
28
|
-
:
|
|
27
|
+
`--permanent`
|
|
28
|
+
: Permanently delete the list instead of moving it to the recycle bin.
|
|
29
29
|
|
|
30
30
|
`-f, --force`
|
|
31
31
|
: Don't prompt for confirming removing the list.
|
|
@@ -66,10 +66,10 @@ Remove the list with a specific title located in a specific site.
|
|
|
66
66
|
m365 spo list remove --webUrl https://contoso.sharepoint.com/sites/project-x --title 'List 1'
|
|
67
67
|
```
|
|
68
68
|
|
|
69
|
-
|
|
69
|
+
Permanently remove a list specified by ID.
|
|
70
70
|
|
|
71
71
|
```sh
|
|
72
|
-
m365 spo list remove --webUrl https://contoso.sharepoint.com/sites/project-x --id 0cd891ef-afce-4e55-b836-fce03286cccf --
|
|
72
|
+
m365 spo list remove --webUrl https://contoso.sharepoint.com/sites/project-x --id 0cd891ef-afce-4e55-b836-fce03286cccf --permanent
|
|
73
73
|
```
|
|
74
74
|
|
|
75
75
|
## Response
|
|
@@ -31,8 +31,8 @@ m365 spo listitem batch remove [options]
|
|
|
31
31
|
`-i, --ids [ids]`
|
|
32
32
|
: Comma separated list of list item IDs. Specify `filePath` or `ids`, but not both.
|
|
33
33
|
|
|
34
|
-
|
|
35
|
-
:
|
|
34
|
+
`--permanent`
|
|
35
|
+
: Permanently delete the list items instead of moving them to the recycle bin.
|
|
36
36
|
|
|
37
37
|
`-f, --force`
|
|
38
38
|
: Don't prompt for confirmation.
|
|
@@ -65,6 +65,12 @@ Remove a list of IDs from a list by specifying the IDs
|
|
|
65
65
|
m365 spo listitem batch remove --webUrl https://contoso.sharepoint.com/sites/project-x --listTitle "Demo List" --ids "123,234,345"
|
|
66
66
|
```
|
|
67
67
|
|
|
68
|
+
Permanently remove a list of IDs from a list.
|
|
69
|
+
|
|
70
|
+
```sh
|
|
71
|
+
m365 spo listitem batch remove --webUrl https://contoso.sharepoint.com/sites/project-x --listTitle "Demo List" --ids "123,234,345" --permanent
|
|
72
|
+
```
|
|
73
|
+
|
|
68
74
|
## Response
|
|
69
75
|
|
|
70
76
|
The command won't return a response on success.
|
|
@@ -28,8 +28,8 @@ m365 spo listitem remove [options]
|
|
|
28
28
|
`--listUrl [listUrl]`
|
|
29
29
|
: Server- or site-relative URL of the list. Specify either `listTitle`, `listId` or `listUrl`
|
|
30
30
|
|
|
31
|
-
`--
|
|
32
|
-
:
|
|
31
|
+
`--permanent`
|
|
32
|
+
: Permanently delete the list item instead of moving it to the recycle bin.
|
|
33
33
|
|
|
34
34
|
`-f, --force`
|
|
35
35
|
: Don't prompt for confirming removing the list item
|
|
@@ -57,6 +57,12 @@ Remove the list item located in a given site based on the server-relative list u
|
|
|
57
57
|
m365 spo listitem remove --webUrl https://contoso.sharepoint.com/sites/project-x --listUrl /sites/project-x/lists/TestList --id 1
|
|
58
58
|
```
|
|
59
59
|
|
|
60
|
+
Permanently remove a list item.
|
|
61
|
+
|
|
62
|
+
```sh
|
|
63
|
+
m365 spo listitem remove --webUrl https://contoso.sharepoint.com/sites/project-x --listTitle 'List 1' --id 1 --permanent
|
|
64
|
+
```
|
|
65
|
+
|
|
60
66
|
## Response
|
|
61
67
|
|
|
62
68
|
The command won't return a response on success.
|
|
@@ -19,8 +19,8 @@ m365 spo page remove [options]
|
|
|
19
19
|
`-n, --name <name>`
|
|
20
20
|
: Name of the page.
|
|
21
21
|
|
|
22
|
-
`--
|
|
23
|
-
:
|
|
22
|
+
`--permanent`
|
|
23
|
+
: Permanently delete the page instead of moving it to the recycle bin.
|
|
24
24
|
|
|
25
25
|
`--bypassSharedLock`
|
|
26
26
|
: Remove the page even if it is locked for shared use.
|
|
@@ -45,10 +45,10 @@ Remove a modern page without a confirmation prompt
|
|
|
45
45
|
m365 spo page remove --name HR.aspx --webUrl https://contoso.sharepoint.com/sites/Marketing --force
|
|
46
46
|
```
|
|
47
47
|
|
|
48
|
-
|
|
48
|
+
Permanently remove a page
|
|
49
49
|
|
|
50
50
|
```sh
|
|
51
|
-
m365 spo page remove --name HR.aspx --webUrl https://contoso.sharepoint.com/sites/Marketing --
|
|
51
|
+
m365 spo page remove --name HR.aspx --webUrl https://contoso.sharepoint.com/sites/Marketing --permanent
|
|
52
52
|
```
|
|
53
53
|
|
|
54
54
|
Remove a page that is locked
|
|
@@ -34,14 +34,45 @@ m365 spo site apppermission add [options]
|
|
|
34
34
|
|
|
35
35
|
To set permissions, specify at minimum either `appId` or `appDisplayName`. For best performance specify both values to avoid extra lookup.
|
|
36
36
|
|
|
37
|
-
##
|
|
37
|
+
## Permissions
|
|
38
38
|
|
|
39
|
-
|
|
39
|
+
<Tabs>
|
|
40
|
+
<TabItem value="Delegated">
|
|
41
|
+
|
|
42
|
+
| Resource | Permissions |
|
|
43
|
+
|-----------------|---------------------------------------------|
|
|
44
|
+
| Microsoft Graph | Sites.FullControl.All, Application.Read.All |
|
|
45
|
+
|
|
46
|
+
</TabItem>
|
|
47
|
+
<TabItem value="Application">
|
|
48
|
+
|
|
49
|
+
| Resource | Permissions |
|
|
50
|
+
|-----------------|---------------------------------------------|
|
|
51
|
+
| Microsoft Graph | Sites.FullControl.All, Application.Read.All |
|
|
52
|
+
|
|
53
|
+
</TabItem>
|
|
54
|
+
</Tabs>
|
|
55
|
+
|
|
56
|
+
## Examples
|
|
57
|
+
|
|
58
|
+
Grants the app with the specified display name the _read_ permission to a specific site
|
|
40
59
|
|
|
41
60
|
```sh
|
|
42
61
|
m365 spo site apppermission add --siteUrl https://contoso.sharepoint.com/sites/project-x --permission read --appDisplayName Foo
|
|
43
62
|
```
|
|
44
63
|
|
|
64
|
+
Grants the app with the specified ID the _write_ permission to a specific site
|
|
65
|
+
|
|
66
|
+
```sh
|
|
67
|
+
m365 spo site apppermission add --siteUrl https://contoso.sharepoint.com/sites/project-x --permission write --appId 5c89fbbf-670e-48e7-a0bc-fa8942c895a2
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
Grants the app with the specified ID and display name the _manage_ permission to a specific site
|
|
71
|
+
|
|
72
|
+
```sh
|
|
73
|
+
m365 spo site apppermission add --siteUrl https://contoso.sharepoint.com/sites/project-x --permission manage --appId 5c89fbbf-670e-48e7-a0bc-fa8942c895a2 --appDisplayName Foo
|
|
74
|
+
```
|
|
75
|
+
|
|
45
76
|
## Response
|
|
46
77
|
|
|
47
78
|
<Tabs>
|
|
@@ -49,27 +80,27 @@ m365 spo site apppermission add --siteUrl https://contoso.sharepoint.com/sites/p
|
|
|
49
80
|
|
|
50
81
|
```json
|
|
51
82
|
{
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
83
|
+
"id": "aTowaS50fG1zLnNwLmV4dHw1Yzg5ZmJiZi02NzBlLTQ4ZTctYTBiYy1mYTg5NDJjODk1YTJAMWU4NTJiNDktYmY0Yi00YmE1LWJjZDQtYThjNDcwNmM4ZWQ0",
|
|
84
|
+
"roles": [
|
|
85
|
+
"read"
|
|
86
|
+
],
|
|
87
|
+
"grantedToIdentitiesV2": [
|
|
88
|
+
{
|
|
89
|
+
"application": {
|
|
90
|
+
"displayName": "Foo",
|
|
91
|
+
"id": "5c89fbbf-670e-48e7-a0bc-fa8942c895a2"
|
|
92
|
+
}
|
|
61
93
|
}
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
94
|
+
],
|
|
95
|
+
"grantedToIdentities": [
|
|
96
|
+
{
|
|
97
|
+
"application": {
|
|
98
|
+
"displayName": "Foo",
|
|
99
|
+
"id": "5c89fbbf-670e-48e7-a0bc-fa8942c895a2"
|
|
100
|
+
}
|
|
69
101
|
}
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
}
|
|
102
|
+
]
|
|
103
|
+
}
|
|
73
104
|
```
|
|
74
105
|
|
|
75
106
|
</TabItem>
|