@pnp/cli-microsoft365 12.0.0-beta.0be7d8d → 12.0.0-beta.c9bd7f3

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.
Files changed (89) hide show
  1. package/allCommands.json +1 -1
  2. package/allCommandsFull.json +1 -1
  3. package/dist/Auth.js +2 -6
  4. package/dist/auth/FileTokenStorage.js +0 -3
  5. package/dist/auth/msalCachePlugin.js +201 -12
  6. package/dist/m365/commands/logout.js +2 -4
  7. package/dist/m365/entra/commands/m365group/m365group-remove.js +9 -2
  8. package/dist/m365/spe/commands/container/container-remove.js +6 -7
  9. package/dist/m365/spo/commands/file/file-archive.js +1 -1
  10. package/dist/m365/spo/commands/file/file-remove.js +5 -5
  11. package/dist/m365/spo/commands/file/file-unarchive.js +1 -1
  12. package/dist/m365/spo/commands/folder/folder-archive.js +1 -1
  13. package/dist/m365/spo/commands/folder/folder-remove.js +5 -5
  14. package/dist/m365/spo/commands/hidedefaultthemes/hidedefaultthemes-get.js +5 -0
  15. package/dist/m365/spo/commands/hidedefaultthemes/hidedefaultthemes-set.js +8 -26
  16. package/dist/m365/spo/commands/homesite/homesite-list.js +5 -0
  17. package/dist/m365/spo/commands/list/list-remove.js +4 -4
  18. package/dist/m365/spo/commands/listitem/listitem-batch-remove.js +5 -4
  19. package/dist/m365/spo/commands/listitem/listitem-remove.js +8 -5
  20. package/dist/m365/spo/commands/page/page-remove.js +7 -7
  21. package/dist/m365/spo/commands/site/site-list.js +60 -49
  22. package/dist/m365/spo/commands/site/site-remove.js +12 -6
  23. package/dist/m365/spo/commands/spo-get.js +5 -0
  24. package/dist/m365/spo/commands/spo-set.js +10 -21
  25. package/dist/m365/spo/commands/storageentity/storageentity-get.js +23 -17
  26. package/dist/m365/spo/commands/storageentity/storageentity-list.js +39 -36
  27. package/dist/m365/spo/commands/storageentity/storageentity-remove.js +26 -33
  28. package/dist/m365/spo/commands/storageentity/storageentity-set.js +26 -36
  29. package/dist/m365/spo/commands/user/user-ensure.js +24 -60
  30. package/dist/m365/spo/commands/user/user-get.js +25 -65
  31. package/dist/m365/spo/commands/user/user-list.js +10 -18
  32. package/dist/m365/spo/commands/user/user-remove.js +26 -68
  33. package/dist/m365/spo/commands/userprofile/userprofile-get.js +10 -23
  34. package/dist/m365/spo/commands/userprofile/userprofile-set.js +10 -19
  35. package/dist/m365/spo/commands/web/web-add.js +20 -55
  36. package/dist/m365/spo/commands/web/web-clientsidewebpart-list.js +10 -18
  37. package/dist/m365/spo/commands/web/web-get.js +12 -30
  38. package/dist/m365/spo/commands/web/web-installedlanguage-list.js +10 -18
  39. package/dist/m365/spo/commands/web/web-list.js +10 -18
  40. package/dist/m365/spo/commands/web/web-reindex.js +10 -18
  41. package/dist/m365/spo/commands/web/web-remove.js +11 -27
  42. package/dist/m365/spo/commands/web/web-retentionlabel-list.js +10 -18
  43. package/dist/m365/spo/commands/web/web-roleassignment-add.js +40 -64
  44. package/dist/m365/spo/commands/web/web-roleassignment-remove.js +31 -58
  45. package/dist/m365/spo/commands/web/web-roleinheritance-break.js +12 -36
  46. package/dist/m365/spo/commands/web/web-roleinheritance-reset.js +11 -29
  47. package/dist/m365/spo/commands/web/web-set.js +26 -96
  48. package/dist/m365/spo/commands.js +0 -4
  49. package/dist/m365/teams/commands/channel/channel-list.js +2 -6
  50. package/dist/m365/teams/commands/channel/channel-member-add.js +2 -6
  51. package/dist/m365/teams/commands/channel/channel-member-list.js +2 -6
  52. package/dist/m365/teams/commands/channel/channel-member-remove.js +2 -6
  53. package/dist/m365/teams/commands/channel/channel-member-set.js +2 -6
  54. package/dist/m365/teams/commands/channel/channel-remove.js +2 -8
  55. package/dist/m365/teams/commands/channel/channel-set.js +2 -8
  56. package/dist/m365/teams/commands/tab/tab-get.js +2 -6
  57. package/dist/m365/teams/commands/team/team-archive.js +2 -6
  58. package/dist/m365/teams/commands/team/team-remove.js +2 -6
  59. package/dist/m365/teams/commands/team/team-unarchive.js +2 -6
  60. package/docs/docs/cmd/entra/m365group/m365group-remove.mdx +6 -3
  61. package/docs/docs/cmd/spe/container/container-remove.mdx +5 -5
  62. package/docs/docs/cmd/spo/file/file-archive.mdx +8 -0
  63. package/docs/docs/cmd/spo/file/file-remove.mdx +4 -4
  64. package/docs/docs/cmd/spo/file/file-unarchive.mdx +8 -0
  65. package/docs/docs/cmd/spo/folder/folder-archive.mdx +6 -0
  66. package/docs/docs/cmd/spo/folder/folder-remove.mdx +4 -4
  67. package/docs/docs/cmd/spo/list/list-remove.mdx +4 -4
  68. package/docs/docs/cmd/spo/listitem/listitem-batch-remove.mdx +8 -2
  69. package/docs/docs/cmd/spo/listitem/listitem-remove.mdx +8 -2
  70. package/docs/docs/cmd/spo/page/page-remove.mdx +4 -4
  71. package/docs/docs/cmd/spo/site/site-apppermission-add.mdx +52 -21
  72. package/docs/docs/cmd/spo/site/site-list.mdx +22 -1
  73. package/docs/docs/cmd/spo/site/site-remove.mdx +5 -2
  74. package/docs/docs/cmd/spo/storageentity/storageentity-get.mdx +11 -2
  75. package/docs/docs/cmd/spo/storageentity/storageentity-list.mdx +9 -3
  76. package/docs/docs/cmd/spo/storageentity/storageentity-remove.mdx +6 -6
  77. package/docs/docs/cmd/spo/storageentity/storageentity-set.mdx +10 -4
  78. package/docs/docs/cmd/teams/app/app-install.mdx +21 -0
  79. package/docs/docs/cmd/teams/app/app-list.mdx +19 -0
  80. package/docs/docs/cmd/teams/app/app-publish.mdx +17 -0
  81. package/docs/docs/cmd/teams/app/app-remove.mdx +19 -0
  82. package/docs/docs/cmd/teams/app/app-uninstall.mdx +21 -0
  83. package/docs/docs/cmd/teams/app/app-update.mdx +19 -0
  84. package/npm-shrinkwrap.json +432 -0
  85. package/package.json +6 -1
  86. package/dist/m365/spo/commands/web/web-rule-list.js +0 -111
  87. package/dist/m365/spo/commands/web/web-rule-remove.js +0 -57
  88. package/docs/docs/cmd/spo/web/web-rule-list.mdx +0 -193
  89. package/docs/docs/cmd/spo/web/web-rule-remove.mdx +0 -71
@@ -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
- const group = await entraGroup.getGroupByDisplayName(args.options.teamName);
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
- const group = await entraGroup.getGroupByDisplayName(args.options.teamName);
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
- const group = await entraGroup.getGroupByDisplayName(args.options.teamName);
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
- const group = await entraGroup.getGroupByDisplayName(args.options.teamName);
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
- const group = await entraGroup.getGroupByDisplayName(args.options.teamName);
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
- const group = await entraGroup.getGroupByDisplayName(args.options.name);
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
- const group = await entraGroup.getGroupByDisplayName(args.options.name);
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
- const group = await entraGroup.getGroupByDisplayName(args.options.name);
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,11 @@ m365 entra m365group remove [options]
24
24
  `-f, --force`
25
25
  : Don't prompt for confirming removing the group
26
26
 
27
+ `--permanent`
28
+ : Permanently remove the group without leaving it in the recycle bin.
29
+
27
30
  `--skipRecycleBin`
28
- : Set to directly remove the group without moving it to the Recycle Bin
31
+ : Deprecated: use `--permanent` instead.
29
32
  ```
30
33
 
31
34
  <Global />
@@ -53,7 +56,7 @@ m365 entra m365group remove [options]
53
56
 
54
57
  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
58
 
56
- 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.
59
+ 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
60
 
58
61
  To ensure a smooth deletion process, the command employs a retry mechanism with the following parameters:
59
62
 
@@ -80,7 +83,7 @@ m365 entra m365group remove --displayName Finance --force
80
83
  Remove group with id _28beab62-7540-4db1-a23f-29a6018a3848_ without prompting for confirmation and without moving it to the Recycle Bin
81
84
 
82
85
  ```sh
83
- m365 entra m365group remove --id 28beab62-7540-4db1-a23f-29a6018a3848 --force --skipRecycleBin
86
+ m365 entra m365group remove --id 28beab62-7540-4db1-a23f-29a6018a3848 --force --permanent
84
87
  ```
85
88
 
86
89
  ## 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
- `--recycle`
31
- : Recycle the container instance instead of permanently deleting it.
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
- Remove a container by ID.
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
- Move a container specified by ID to the recycle bin.
76
+ Permanently remove a container by ID.
77
77
 
78
78
  ```sh
79
- m365 spe container remove --id "b!ISJs1WRro0y0EWgkUYcktDa0mE8zSlFEqFzqRn70Zwp1CEtDEBZgQICPkRbil_5Z" --recycle
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
- `--recycle`
34
- : Recycle the file instead of actually deleting it.
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
- Remove a file by server-relative URL to the recycle bin.
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" --recycle
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
@@ -30,6 +30,14 @@ m365 spo file unarchive [options]
30
30
 
31
31
  <Global />
32
32
 
33
+ ## Remarks
34
+
35
+ :::warning
36
+
37
+ Reactivation could take up to 24 hours. Files that are reactivated cannot be archived again for **120 days**.
38
+
39
+ :::
40
+
33
41
  ## Permissions
34
42
 
35
43
  <Tabs>
@@ -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
- `--recycle`
25
- : Recycles the folder instead of actually deleting it.
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
- Remove a folder with a specific server relative URL to the site recycle bin.
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' --recycle
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
- `--recycle`
28
- : Instead of permanently deleting, send the list to the recycle bin.
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
- Remove a list specified by id by sending it to the recycle bin instead of permanently removing it
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 --recycle
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
- `-r, --recycle`
35
- : Recycle the list items. Otherwise, they will be permanently deleted.
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
- `--recycle`
32
- : Recycle the list item
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
- `--recycle`
23
- : Send the page to the recycle bin instead of permanently deleting it.
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
- Send a page to the recycle bin
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 --recycle
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
- ## Example
37
+ ## Permissions
38
38
 
39
- Grants the specified app the _read_ permission to site _https://contoso.sharepoint.com/sites/project-x_
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
- "id": "aTowaS50fG1zLnNwLmV4dHw1Yzg5ZmJiZi02NzBlLTQ4ZTctYTBiYy1mYTg5NDJjODk1YTJAMWU4NTJiNDktYmY0Yi00YmE1LWJjZDQtYThjNDcwNmM4ZWQ0",
53
- "roles": [
54
- "read"
55
- ],
56
- "grantedToIdentitiesV2": [
57
- {
58
- "application": {
59
- "displayName": "Foo",
60
- "id": "5c89fbbf-670e-48e7-a0bc-fa8942c895a2"
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
- "grantedToIdentities": [
65
- {
66
- "application": {
67
- "displayName": "Foo",
68
- "id": "5c89fbbf-670e-48e7-a0bc-fa8942c895a2"
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>
@@ -16,7 +16,10 @@ m365 spo site list [options]
16
16
 
17
17
  ```md definition-list
18
18
  `-t, --type [type]`
19
- : convenience option for type of sites to list. Allowed values are `TeamSite,CommunicationSite`.
19
+ : convenience option for type of sites to list. Allowed values are `TeamSite` and `CommunicationSite`.
20
+
21
+ `--state [state]`
22
+ : option to filter sites by their archived state. Allowed values are `active`, `fullyArchived`, `recentlyArchived` and `archived`.
20
23
 
21
24
  `--webTemplate [webTemplate]`
22
25
  : type of sites to list. To be used with values like `GROUP#0` and `SITEPAGEPUBLISHING#0`. Specify either `type` or `webTemplate`, but not both.
@@ -31,6 +34,12 @@ m365 spo site list [options]
31
34
  <Global />
32
35
 
33
36
  ## Remarks
37
+ When providing a value for option `state`, consider the following:
38
+
39
+ - `active`: return sites that are not archived
40
+ - `fullyArchived`: return sites that are fully archived (longer than 7 days)
41
+ - `recentlyArchived`: return sites that are recently archived (within 7 days)
42
+ - `archived`: return both recently archived and fully archived sites
34
43
 
35
44
  Using the `--filter` option you can specify which sites you want to retrieve. For example, to get sites with _project_ in their URL, use `Url -like 'project'` as the filter.
36
45
 
@@ -76,6 +85,18 @@ List all sites in the currently connected tenant including OneDrive sites.
76
85
  m365 spo site list --withOneDriveSites
77
86
  ```
78
87
 
88
+ List all active (non-archived) sites in the currently connected tenant.
89
+
90
+ ```sh
91
+ m365 spo site list --state active
92
+ ```
93
+
94
+ List all archived sites in the currently connected tenant.
95
+
96
+ ```sh
97
+ m365 spo site list --state archived
98
+ ```
99
+
79
100
  ## Response
80
101
 
81
102
  <Tabs>
@@ -16,8 +16,11 @@ m365 spo site remove [options]
16
16
  `-u, --url <url>`
17
17
  : URL of the site.
18
18
 
19
+ `--permanent`
20
+ : Permanently remove the site without leaving it in the recycle bin.
21
+
19
22
  `--skipRecycleBin`
20
- : Set to directly remove the site without moving it to the recycle bin.
23
+ : Deprecated: use `--permanent` instead.
21
24
 
22
25
  `--fromRecycleBin`
23
26
  : Set to remove the site from the recycle bin.
@@ -49,7 +52,7 @@ m365 spo site remove --url https://contoso.sharepoint.com/sites/demosite
49
52
  Remove the site without moving it to the recycle bin.
50
53
 
51
54
  ```sh
52
- m365 spo site remove --url https://contoso.sharepoint.com/sites/demosite --skipRecycleBin
55
+ m365 spo site remove --url https://contoso.sharepoint.com/sites/demosite --permanent
53
56
  ```
54
57
 
55
58
  Remove the previously deleted site from the recycle bin.
@@ -17,22 +17,31 @@ m365 spo storageentity get [options]
17
17
  ```md definition-list
18
18
  `-k, --key <key>`
19
19
  : Name of the tenant property to retrieve
20
+
21
+ `-u, --appCatalogUrl [appCatalogUrl]`
22
+ : URL of the app catalog site. If not specified, the tenant app catalog URL will be used.
20
23
  ```
21
24
 
22
25
  <Global />
23
26
 
24
27
  ## Remarks
25
28
 
26
- Tenant properties are stored in the app catalog site associated with the site to which you are currently connected. When retrieving the specified tenant property, SharePoint will automatically find the associated app catalog and try to retrieve the property from it.
29
+ Tenant properties are stored in the app catalog site associated with the site to which you are currently connected. When retrieving the specified tenant property, SharePoint will use the specified app catalog URL or automatically resolve the tenant app catalog URL.
27
30
 
28
31
  ## Examples
29
32
 
30
- Show the value, description and comment of the _AnalyticsId_ tenant property
33
+ Show the value, description and comment of the _AnalyticsId_ tenant property using the tenant app catalog
31
34
 
32
35
  ```sh
33
36
  m365 spo storageentity get -k AnalyticsId
34
37
  ```
35
38
 
39
+ Show the value, description and comment of the _AnalyticsId_ tenant property from a specific app catalog site
40
+
41
+ ```sh
42
+ m365 spo storageentity get -k AnalyticsId -u https://contoso.sharepoint.com/sites/appcatalog
43
+ ```
44
+
36
45
  ## Response
37
46
 
38
47
  <Tabs>