@pnp/cli-microsoft365 8.1.0-beta.bf59841 → 9.0.0-beta.1516729

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 (54) hide show
  1. package/allCommands.json +1 -1
  2. package/allCommandsFull.json +1 -1
  3. package/dist/Auth.js +11 -12
  4. package/dist/Command.js +1 -3
  5. package/dist/cli/cli.js +68 -14
  6. package/dist/config.js +60 -5
  7. package/dist/m365/base/SpoCommand.js +1 -1
  8. package/dist/m365/cli/commands/cli-consent.js +2 -2
  9. package/dist/m365/cli/commands/cli-doctor.js +2 -2
  10. package/dist/m365/cli/commands/cli-reconsent.js +2 -3
  11. package/dist/m365/cli/commands/config/config-set.js +12 -3
  12. package/dist/m365/commands/login.js +38 -14
  13. package/dist/m365/commands/setup.js +256 -33
  14. package/dist/m365/connection/commands/connection-list.js +4 -4
  15. package/dist/m365/entra/commands/app/app-add.js +52 -288
  16. package/dist/m365/entra/commands/enterpriseapp/enterpriseapp-remove.js +123 -0
  17. package/dist/m365/entra/commands/group/group-set.js +256 -0
  18. package/dist/m365/entra/commands/m365group/m365group-user-add.js +109 -32
  19. package/dist/m365/entra/commands/m365group/m365group-user-set.js +159 -84
  20. package/dist/m365/entra/commands.js +3 -0
  21. package/dist/m365/flow/commands/flow-get.js +1 -1
  22. package/dist/m365/onenote/commands/notebook/notebook-add.js +132 -0
  23. package/dist/m365/onenote/commands.js +1 -0
  24. package/dist/m365/pa/commands/app/app-export.js +13 -7
  25. package/dist/m365/spo/commands/folder/folder-sharinglink-get.js +86 -0
  26. package/dist/m365/spo/commands/folder/folder-sharinglink-list.js +110 -0
  27. package/dist/m365/spo/commands/list/ListInstance.js +6 -1
  28. package/dist/m365/spo/commands/list/list-get.js +9 -3
  29. package/dist/m365/spo/commands/site/site-get.js +12 -16
  30. package/dist/m365/spo/commands.js +2 -0
  31. package/dist/m365/teams/commands/message/message-restore.js +106 -0
  32. package/dist/m365/teams/commands.js +1 -0
  33. package/dist/settingsNames.js +7 -1
  34. package/dist/utils/drive.js +61 -0
  35. package/dist/utils/entraApp.js +283 -0
  36. package/dist/utils/spo.js +32 -0
  37. package/docs/docs/_clisettings.mdx +6 -0
  38. package/docs/docs/cmd/entra/enterpriseapp/enterpriseapp-remove.mdx +65 -0
  39. package/docs/docs/cmd/entra/group/group-add.mdx +0 -4
  40. package/docs/docs/cmd/entra/group/group-set.mdx +89 -0
  41. package/docs/docs/cmd/entra/m365group/m365group-user-add.mdx +28 -10
  42. package/docs/docs/cmd/entra/m365group/m365group-user-set.mdx +35 -11
  43. package/docs/docs/cmd/flow/flow-get.mdx +149 -283
  44. package/docs/docs/cmd/onenote/notebook/notebook-add.mdx +169 -0
  45. package/docs/docs/cmd/pa/app/app-export.mdx +15 -9
  46. package/docs/docs/cmd/setup.mdx +16 -3
  47. package/docs/docs/cmd/spo/app/app-uninstall.mdx +1 -1
  48. package/docs/docs/cmd/spo/folder/folder-sharinglink-get.mdx +110 -0
  49. package/docs/docs/cmd/spo/folder/folder-sharinglink-list.mdx +114 -0
  50. package/docs/docs/cmd/spo/list/list-get.mdx +6 -0
  51. package/docs/docs/cmd/teams/message/message-remove.mdx +2 -1
  52. package/docs/docs/cmd/teams/message/message-restore.mdx +62 -0
  53. package/npm-shrinkwrap.json +574 -480
  54. package/package.json +22 -23
@@ -0,0 +1,169 @@
1
+ import Global from '/docs/cmd/_global.mdx';
2
+ import Tabs from '@theme/Tabs';
3
+ import TabItem from '@theme/TabItem';
4
+
5
+ # onenote notebook add
6
+
7
+ Create a new OneNote notebook.
8
+
9
+ ## Usage
10
+
11
+ ```sh
12
+ m365 onenote notebook add [options]
13
+ ```
14
+
15
+ ## Options
16
+
17
+ ```md definition-list
18
+ `-n, --name <name>`
19
+ : Name of the notebook. Notebook names must be unique. The name cannot contain more than 128 characters or contain the following characters: `?*/:<>`
20
+
21
+ `--userId [userId]`
22
+ : Id of the user. Specify either `userId`, `userName`, `groupId`, `groupName` or `webUrl`, but not multiple.
23
+
24
+ `--userName [userName]`
25
+ : Name of the user. Specify either `userId`, `userName`, `groupId`, `groupName` or `webUrl`, but not multiple.
26
+
27
+ `--groupId [groupId]`
28
+ : Id of the SharePoint group. Specify either `userId`, `userName`, `groupId`, `groupName` or `webUrl`, but not multiple.
29
+
30
+ `--groupName [groupName]`
31
+ : Name of the SharePoint group. Specify either `userId`, `userName`, `groupId`, `groupName` or `webUrl`, but not multiple.
32
+
33
+ `-u, --webUrl [webUrl]`
34
+ : URL of the SharePoint site. Specify either `userId`, `userName`, `groupId`, `groupName` or `webUrl`, but not multiple.
35
+ ```
36
+
37
+ <Global />
38
+
39
+ ## Examples
40
+
41
+ Create a Microsoft OneNote notebook for the currently logged in user
42
+
43
+ ```sh
44
+ m365 onenote notebook add --name "Private Notebook"
45
+ ```
46
+
47
+ Create a Microsoft OneNote notebook in a group specified by id.
48
+
49
+ ```sh
50
+ m365 onenote notebook add --name "Private Notebook" --groupId 233e43d0-dc6a-482e-9b4e-0de7a7bce9b4
51
+ ```
52
+
53
+ Create a Microsoft OneNote notebook in a group specified by displayName.
54
+
55
+ ```sh
56
+ m365 onenote notebook add --name "Private Notebook" --groupName "MyGroup"
57
+ ```
58
+
59
+ Create a Microsoft OneNote notebook for a user specified by name
60
+
61
+ ```sh
62
+ m365 onenote notebook add --name "Private Notebook" --userName user1@contoso.onmicrosoft.com
63
+ ```
64
+
65
+ Create a Microsoft OneNote notebook for a user specified by id
66
+
67
+ ```sh
68
+ m365 onenote notebook add --name "Private Notebook" --userId 2609af39-7775-4f94-a3dc-0dd67657e900
69
+ ```
70
+
71
+ Creates a Microsoft OneNote notebooks for a site
72
+
73
+ ```sh
74
+ m365 onenote notebook add --name "Private Notebook" --webUrl https://contoso.sharepoint.com/sites/testsite
75
+ ```
76
+
77
+ ## Response
78
+
79
+ <Tabs>
80
+ <TabItem value="JSON">
81
+
82
+ ```json
83
+ {
84
+ "id": "1-08554ffd-b769-4a4a-9563-faaa3191f253",
85
+ "self": "https://graph.microsoft.com/v1.0/users/fe36f75e-c103-410b-a18a-2bf6df06ac3a/onenote/notebooks/1-08554ffd-b769-4a4a-9563-faaa3191f253",
86
+ "createdDateTime": "2024-04-05T17:58:27Z",
87
+ "displayName": "Private Notebook",
88
+ "lastModifiedDateTime": "2024-04-05T17:58:27Z",
89
+ "isDefault": false,
90
+ "userRole": "Owner",
91
+ "isShared": false,
92
+ "sectionsUrl": "https://graph.microsoft.com/v1.0/users/fe36f75e-c103-410b-a18a-2bf6df06ac3a/onenote/notebooks/1-08554ffd-b769-4a4a-9563-faaa3191f253/sections",
93
+ "sectionGroupsUrl": "https://graph.microsoft.com/v1.0/users/fe36f75e-c103-410b-a18a-2bf6df06ac3a/onenote/notebooks/1-08554ffd-b769-4a4a-9563-faaa3191f253/sectionGroups",
94
+ "createdBy": {
95
+ "user": {
96
+ "id": "fe36f75e-c103-410b-a18a-2bf6df06ac3a",
97
+ "displayName": "John Doe"
98
+ }
99
+ },
100
+ "lastModifiedBy": {
101
+ "user": {
102
+ "id": "fe36f75e-c103-410b-a18a-2bf6df06ac3a",
103
+ "displayName": "John Doe"
104
+ }
105
+ },
106
+ "links": {
107
+ "oneNoteClientUrl": {
108
+ "href": "onenote:https://contoso-my.sharepoint.com/personal/john_contoso_onmicrosoft_com/Documents/Notebooks/Private Notebook"
109
+ },
110
+ "oneNoteWebUrl": {
111
+ "href": "https://contoso-my.sharepoint.com/personal/john_contoso_onmicrosoft_com/Documents/Notebooks/Private Notebook"
112
+ }
113
+ }
114
+ }
115
+ ```
116
+
117
+ </TabItem>
118
+ <TabItem value="Text">
119
+
120
+ ```text
121
+ createdBy : {"user":{"id":"fe36f75e-c103-410b-a18a-2bf6df06ac3a","displayName":"John Doe"}}
122
+ createdDateTime : 2024-04-05T17:58:36Z
123
+ displayName : Private Notebook
124
+ id : 1-f4bba32b-9b3e-4892-8df4-931a15f7eb6f
125
+ isDefault : false
126
+ isShared : false
127
+ lastModifiedBy : {"user":{"id":"fe36f75e-c103-410b-a18a-2bf6df06ac3a","displayName":"John Doe"}}
128
+ lastModifiedDateTime: 2024-04-05T17:58:36Z
129
+ links : {"oneNoteClientUrl":{"href":"onenote:https://contoso-my.sharepoint.com/personal/john_contoso_onmicrosoft_com/Documents/Notebooks/Private Notebook"},"oneNoteWebUrl":{"href":"https://contoso-my.sharepoint.com/personal/john_contoso_onmicrosoft_com/Documents/Notebooks/Private Notebook"}}
130
+ sectionGroupsUrl : https://graph.microsoft.com/v1.0/users/fe36f75e-c103-410b-a18a-2bf6df06ac3a/onenote/notebooks/1-f4bba32b-9b3e-4892-8df4-931a15f7eb6f/sectionGroups
131
+ sectionsUrl : https://graph.microsoft.com/v1.0/users/fe36f75e-c103-410b-a18a-2bf6df06ac3a/onenote/notebooks/1-f4bba32b-9b3e-4892-8df4-931a15f7eb6f/sections
132
+ self : https://graph.microsoft.com/v1.0/users/fe36f75e-c103-410b-a18a-2bf6df06ac3a/onenote/notebooks/1-f4bba32b-9b3e-4892-8df4-931a15f7eb6f
133
+ userRole : Owner
134
+ ```
135
+
136
+ </TabItem>
137
+ <TabItem value="CSV">
138
+
139
+ ```csv
140
+ id,self,createdDateTime,displayName,lastModifiedDateTime,isDefault,userRole,isShared,sectionsUrl,sectionGroupsUrl
141
+ 1-272a5791-2c95-45cf-b27d-7f68e07f6149,https://graph.microsoft.com/v1.0/users/fe36f75e-c103-410b-a18a-2bf6df06ac3a/onenote/notebooks/1-272a5791-2c95-45cf-b27d-7f68e07f6149,2024-04-05T18:00:28Z,Private Notebook,2024-04-05T18:00:28Z,,Owner,,https://graph.microsoft.com/v1.0/users/fe36f75e-c103-410b-a18a-2bf6df06ac3a/onenote/notebooks/1-272a5791-2c95-45cf-b27d-7f68e07f6149/sections,https://graph.microsoft.com/v1.0/users/fe36f75e-c103-410b-a18a-2bf6df06ac3a/onenote/notebooks/1-272a5791-2c95-45cf-b27d-7f68e07f6149/sectionGroups
142
+ ```
143
+
144
+ </TabItem>
145
+ <TabItem value="Markdown">
146
+
147
+ ```md
148
+ # onenote notebook add --name "Private Notebook"
149
+
150
+ Date: 05/04/2024
151
+
152
+ ## Private Notebook (1-fa279d79-4701-43a2-9593-c2abfbe6999f)
153
+
154
+ Property | Value
155
+ ---------|-------
156
+ id | 1-fa279d79-4701-43a2-9593-c2abfbe6999f
157
+ self | https://graph.microsoft.com/v1.0/users/fe36f75e-c103-410b-a18a-2bf6df06ac3a/onenote/notebooks/1-fa279d79-4701-43a2-9593-c2abfbe6999f
158
+ createdDateTime | 2024-04-05T18:00:58Z
159
+ displayName | Private Notebook
160
+ lastModifiedDateTime | 2024-04-05T18:00:58Z
161
+ isDefault | false
162
+ userRole | Owner
163
+ isShared | false
164
+ sectionsUrl | https://graph.microsoft.com/v1.0/users/fe36f75e-c103-410b-a18a-2bf6df06ac3a/onenote/notebooks/1-fa279d79-4701-43a2-9593-c2abfbe6999f/sections
165
+ sectionGroupsUrl | https://graph.microsoft.com/v1.0/users/fe36f75e-c103-410b-a18a-2bf6df06ac3a/onenote/notebooks/1-fa279d79-4701-43a2-9593-c2abfbe6999f/sectionGroups
166
+ ```
167
+
168
+ </TabItem>
169
+ </Tabs>
@@ -14,25 +14,25 @@ m365 pa app export [options]
14
14
 
15
15
  ```md definition-list
16
16
  `-n, --name <name>`
17
- : The name (GUID) of the Power Apps app to export
17
+ : The name (GUID) of the Power Apps app to export.
18
18
 
19
19
  `-e, --environmentName <environmentName>`
20
- : The name of the environment for which to export the app
20
+ : The name of the environment for which to export the app.
21
21
 
22
22
  `--packageDisplayName [packageDisplayName]`
23
- : The display name to use in the exported package
23
+ : The display name to use in the exported package.
24
24
 
25
25
  `-d, --packageDescription [packageDescription]`
26
- : The description to use in the exported package
26
+ : The description to use in the exported package.
27
27
 
28
28
  `-c, --packageCreatedBy [packageCreatedBy]`
29
- : The name of the person to be used as the creator of the exported package
29
+ : The name of the person to be used as the creator of the exported package.
30
30
 
31
31
  `-s, --packageSourceEnvironment [packageSourceEnvironment]`
32
- : The name of the source environment from which the exported package was taken
32
+ : The name of the source environment from which the exported package was taken.
33
33
 
34
34
  `-p, --path [path]`
35
- : The path to save the exported package to. If not specified the app will be exported in the current working directory
35
+ : The path to save the exported package to. If not specified the app will be exported in the current working directory.
36
36
  ```
37
37
 
38
38
  <Global />
@@ -42,13 +42,19 @@ m365 pa app export [options]
42
42
  Export the specified Power App as a ZIP file
43
43
 
44
44
  ```sh
45
- m365 pa app export --environmentName Default-d87a7535-dd31-4437-bfe1-95340acd55c5 --name 3989cb59-ce1a-4a5c-bb78-257c5c39381d --packageDisplayName "PowerApp"
45
+ m365 pa app export --environmentName Default-d87a7535-dd31-4437-bfe1-95340acd55c5 --name 3989cb59-ce1a-4a5c-bb78-257c5c39381d
46
+ ```
47
+
48
+ Export the specified Power App as a ZIP file with a custom package name
49
+
50
+ ```sh
51
+ m365 pa app export --environmentName Default-d87a7535-dd31-4437-bfe1-95340acd55c5 --name 3989cb59-ce1a-4a5c-bb78-257c5c39381d --packageDisplayName "Assets app"
46
52
  ```
47
53
 
48
54
  Export the specified Power App as a ZIP file with the package displayname, package description, the one who created it, the package source environment and the path
49
55
 
50
56
  ```sh
51
- m365 pa app export --environmentName Default-d87a7535-dd31-4437-bfe1-95340acd55c5 --name 3989cb59-ce1a-4a5c-bb78-257c5c39381d --packageDisplayName "PowerApp" --packageDescription "Power App Description" --packageCreatedBy "John Doe" --packageSourceEnvironment "Contoso" --path "C:/Users/John/Documents"
57
+ m365 pa app export --environmentName Default-d87a7535-dd31-4437-bfe1-95340acd55c5 --name 3989cb59-ce1a-4a5c-bb78-257c5c39381d --packageDisplayName "Assets app" --packageDescription "App to track assets of people" --packageCreatedBy "John Doe" --packageSourceEnvironment "Contoso" --path "C:/Users/John/Documents"
52
58
  ```
53
59
 
54
60
  ## Response
@@ -18,6 +18,9 @@ m365 setup [options]
18
18
 
19
19
  `--scripting`
20
20
  : Configure CLI for Microsoft 365 for use in scripts without prompting for additional information.
21
+
22
+ `--skipApp`
23
+ : Skip configuring an Entra app for use with CLI for Microsoft 365.
21
24
  ```
22
25
 
23
26
  <Global />
@@ -28,6 +31,10 @@ The `m365 setup` command is a wizard that helps you configure the CLI for Micros
28
31
 
29
32
  The command will ask you the following questions:
30
33
 
34
+ - _CLI for Microsoft 365 requires a Microsoft Entra app. Do you want to create a new app registration or use an existing one?_
35
+
36
+ You can choose between using an existing Entra app or creating a new one. If you choose to create a new app, the CLI will ask you to choose between a minimal and a full set of permissions. It then signs in as Azure CLI to your tenant, creates a new app registration, and stores its information in the CLI configuration.
37
+
31
38
  - _How do you plan to use the CLI?_
32
39
 
33
40
  You can choose between **interactive** and **scripting** use. In interactive mode, the CLI for Microsoft 365 will prompt you for additional information when needed, automatically open links browser, automatically show help on errors and show spinners. In **scripting** mode, the CLI will not use interactivity to prevent blocking your scripts.
@@ -71,24 +78,30 @@ The `m365 setup` command uses the following presets:
71
78
 
72
79
  ## Examples
73
80
 
74
- Configure CLI for Microsoft based on your preferences interactively
81
+ Configure CLI for Microsoft 365 based on your preferences interactively
75
82
 
76
83
  ```sh
77
84
  m365 setup
78
85
  ```
79
86
 
80
- Configure CLI for Microsoft for interactive use without prompting for additional information
87
+ Configure CLI for Microsoft 365 for interactive use without prompting for additional information
81
88
 
82
89
  ```sh
83
90
  m365 setup --interactive
84
91
  ```
85
92
 
86
- Configure CLI for Microsoft for use in scripts without prompting for additional information
93
+ Configure CLI for Microsoft 365 for use in scripts without prompting for additional information
87
94
 
88
95
  ```sh
89
96
  m365 setup --scripting
90
97
  ```
91
98
 
99
+ Configure CLI for Microsoft 365 without setting up an Entra app
100
+
101
+ ```sh
102
+ m365 setup --skipApp
103
+ ```
104
+
92
105
  ## Response
93
106
 
94
107
  The command won't return a response on success.
@@ -43,7 +43,7 @@ m365 spo app uninstall --id b2307a39-e878-458b-bc90-03bc578531d6 --siteUrl https
43
43
  Uninstall the app with the specified ID from the specified site without prompting for confirmation.
44
44
 
45
45
  ```sh
46
- m365 spo app uninstall --id b2307a39-e878-458b-bc90-03bc578531d6 --siteUrl https://contoso.sharepoint.com
46
+ m365 spo app uninstall --id b2307a39-e878-458b-bc90-03bc578531d6 --siteUrl https://contoso.sharepoint.com --force
47
47
  ```
48
48
 
49
49
  Uninstall the app with the specified ID from the specified site where the app is deployed to the site collection app catalog.
@@ -0,0 +1,110 @@
1
+ import Global from '/docs/cmd/_global.mdx';
2
+ import Tabs from '@theme/Tabs';
3
+ import TabItem from '@theme/TabItem';
4
+
5
+ # spo folder sharinglink get
6
+
7
+ Gets details about a specific sharing link on a folder
8
+
9
+ ## Usage
10
+
11
+ ```sh
12
+ m365 spo folder sharinglink get [options]
13
+ ```
14
+
15
+ ## Options
16
+
17
+ ```md definition-list
18
+ `-u, --webUrl <webUrl>`
19
+ : The URL of the site where the folder is located.
20
+
21
+ `--folderUrl [folderUrl]`
22
+ : The server- or site-relative decoded URL of the folder. Specify either `folderUrl` or `folderId` but not both.
23
+
24
+ `--folderId [folderId]`
25
+ : The Unique ID (GUID) of the folder. Specify either `folderUrl` or `folderId` but not both.
26
+
27
+ `-i, --id <id>`
28
+ : The sharing link ID.
29
+ ```
30
+
31
+ <Global />
32
+
33
+ ## Examples
34
+
35
+ Gets a specific sharing link of a folder by id.
36
+
37
+ ```sh
38
+ m365 spo folder sharinglink get --webUrl https://contoso.sharepoint.com/sites/demo --id 45fa6aed-362f-48b1-b04e-6da85a526506 --folderId daebb04b-a773-4baa-b1d1-3625418e3234
39
+ ```
40
+
41
+ Gets a specific sharing link of a folder by url.
42
+
43
+ ```sh
44
+ m365 spo folder sharinglink get --webUrl https://contoso.sharepoint.com/sites/demo --id 45fa6aed-362f-48b1-b04e-6da85a526506 --folderUrl "/sites/demo/shared documents/folder"
45
+ ```
46
+
47
+ ## Response
48
+
49
+ <Tabs>
50
+ <TabItem value="JSON">
51
+
52
+ ```json
53
+ {
54
+ "id": "d6f6a428-9857-471f-9635-edd68d5aa6c1",
55
+ "roles": [
56
+ "write"
57
+ ],
58
+ "shareId": "u!aHR0cHM6Ly9uYWNoYW4zNjUuc2hhcmVwb2ludC5jb20vOmY6L3MvU1BEZW1vL0VxXzlYcXRIdks1RW9wd3NfX1kteko0QlNybFFNUy1qUTBFOWJsazhVLVNTdVE",
59
+ "hasPassword": false,
60
+ "grantedToIdentitiesV2": [],
61
+ "grantedToIdentities": [],
62
+ "link": {
63
+ "scope": "anonymous",
64
+ "type": "edit",
65
+ "webUrl": "https://contoso.sharepoint.com/:f:/s/demo/Eq_9XqtHvK5Eopws__Y-zJ4BSrlQMS-jQ0E9blk8U-SSuQ",
66
+ "preventsDownload": false
67
+ }
68
+ }
69
+ ```
70
+
71
+ </TabItem>
72
+ <TabItem value="Text">
73
+
74
+ ```text
75
+ grantedToIdentities : []
76
+ grantedToIdentitiesV2 : []
77
+ hasPassword : false
78
+ id : d6f6a428-9857-471f-9635-edd68d5aa6c1
79
+ link : {"scope":"anonymous","type":"edit","webUrl":"https://contoso.sharepoint.com/:f:/s/demo/Eq_9XqtHvK5Eopws__Y-zJ4BSrlQMS-jQ0E9blk8U-SSuQ","preventsDownload":false}
80
+ roles : ["write"]
81
+ shareId : u!aHR0cHM6Ly9uYWNoYW4zNjUuc2hhcmVwb2ludC5jb20vOmY6L3MvU1BEZW1vL0VxXzlYcXRIdks1RW9wd3NfX1kteko0QlNybFFNUy1qUTBFOWJsazhVLVNTdVE
82
+ ```
83
+
84
+ </TabItem>
85
+ <TabItem value="CSV">
86
+
87
+ ```csv
88
+ id,shareId,hasPassword
89
+ d6f6a428-9857-471f-9635-edd68d5aa6c1,u!aHR0cHM6Ly9uYWNoYW4zNjUuc2hhcmVwb2ludC5jb20vOmY6L3MvU1BEZW1vL0VxXzlYcXRIdks1RW9wd3NfX1kteko0QlNybFFNUy1qUTBFOWJsazhVLVNTdVE,
90
+ ```
91
+
92
+ </TabItem>
93
+ <TabItem value="Markdown">
94
+
95
+ ```md
96
+ # spo folder sharinglink get --webUrl "https://contoso.sharepoint.com/sites/demo" --id "d6f6a428-9857-471f-9635-edd68d5aa6c1" --folderUrl "/sites/demo/shared documents/Test"
97
+
98
+ Date: 5/2/2024
99
+
100
+ ## d6f6a428-9857-471f-9635-edd68d5aa6c1
101
+
102
+ Property | Value
103
+ ---------|-------
104
+ id | d6f6a428-9857-471f-9635-edd68d5aa6c1
105
+ shareId | u!aHR0cHM6Ly9uYWNoYW4zNjUuc2hhcmVwb2ludC5jb20vOmY6L3MvU1BEZW1vL0VxXzlYcXRIdks1RW9wd3NfX1kteko0QlNybFFNUy1qUTBFOWJsazhVLVNTdVE
106
+ hasPassword | false
107
+ ```
108
+
109
+ </TabItem>
110
+ </Tabs>
@@ -0,0 +1,114 @@
1
+ import Global from '/docs/cmd/_global.mdx';
2
+ import Tabs from '@theme/Tabs';
3
+ import TabItem from '@theme/TabItem';
4
+
5
+ # spo folder sharinglink list
6
+
7
+ Lists all the sharing links of a specific folder
8
+
9
+ ## Usage
10
+
11
+ ```sh
12
+ m365 spo folder sharinglink list [options]
13
+ ```
14
+
15
+ ## Options
16
+
17
+ ```md definition-list
18
+ `-u, --webUrl <webUrl>`
19
+ : The URL of the site where the folder is located.
20
+
21
+ `--folderUrl [folderUrl]`
22
+ : The server- or site-relative decoded URL of the folder. Specify either `folderUrl` or `folderId` but not both.
23
+
24
+ `--folderId [folderId]`
25
+ : The UniqueId (GUID) of the folder. Specify either `folderUrl` or `folderId` but not both.
26
+
27
+ `-s, --scope [scope]`
28
+ : Filter the results to only sharing links of a given scope: `anonymous`, `users` or `organization`. By default all sharing links are listed.
29
+ ```
30
+
31
+ <Global />
32
+
33
+ ## Examples
34
+
35
+ List sharing links of a folder by id.
36
+
37
+ ```sh
38
+ m365 spo folder sharinglink list --webUrl https://contoso.sharepoint.com/sites/demo --folderId daebb04b-a773-4baa-b1d1-3625418e3234
39
+ ```
40
+
41
+ List sharing links of a folder by url.
42
+
43
+ ```sh
44
+ m365 spo folder sharinglink list --webUrl https://contoso.sharepoint.com/sites/demo --folderUrl "/sites/demo/shared documents/folder"
45
+ ```
46
+
47
+ List anonymous sharing links of a folder by url.
48
+
49
+ ```sh
50
+ m365 spo folder sharinglink list --webUrl https://contoso.sharepoint.com/sites/demo --folderUrl "/sites/demo/shared documents/folder" --scope anonymous
51
+ ```
52
+
53
+ ## Response
54
+
55
+ <Tabs>
56
+ <TabItem value="JSON">
57
+
58
+ ```json
59
+ [
60
+ {
61
+ "id": "e6100f73-981c-4bde-986b-eed262f04659",
62
+ "roles": [
63
+ "write"
64
+ ],
65
+ "shareId": "u!aHR0cHM6Ly83NTY2YXZhLnNoYXJlcG9pbnQuY29tLzpmOi9nL0V2QVFpdnpLV2ZoT3ZJOHJiNm1UVEhjQmQzUUxCOXVsUGIyQTQ1UG81ZmRuYWc",
66
+ "hasPassword": false,
67
+ "grantedToIdentitiesV2": [],
68
+ "grantedToIdentities": [],
69
+ "link": {
70
+ "scope": "anonymous",
71
+ "type": "edit",
72
+ "webUrl": "https://contoso.sharepoint.com/:f:/g/EvAQivzKWfhOvI8rb6mTTHcBd3QLB9ulPb2A45Po5fdnag",
73
+ "preventsDownload": false
74
+ }
75
+ }
76
+ ]
77
+ ```
78
+
79
+ </TabItem>
80
+ <TabItem value="Text">
81
+
82
+ ```text
83
+ id scope roles link
84
+ ------------------------------------ ------------ ----- -----------------------------------------------------------------------------------
85
+ e6100f73-981c-4bde-986b-eed262f04659 anonymous write https://contoso.sharepoint.com/:f:/g/EvAQivzKWfhOvI8rb6mTTHcBd3QLB9ulPb2A45Po5fdnag
86
+ ```
87
+
88
+ </TabItem>
89
+ <TabItem value="CSV">
90
+
91
+ ```csv
92
+ id,shareId,hasPassword
93
+ e6100f73-981c-4bde-986b-eed262f04659,u!aHR0cHM6Ly83NTY2YXZhLnNoYXJlcG9pbnQuY29tLzpmOi9nL0V2QVFpdnpLV2ZoT3ZJOHJiNm1UVEhjQmQzUUxCOXVsUGIyQTQ1UG81ZmRuYWc,
94
+ ```
95
+
96
+ </TabItem>
97
+ <TabItem value="Markdown">
98
+
99
+ ```md
100
+ # spo folder sharinglink list --webUrl "https://contoso.sharepoint.com/" --folderUrl "/shared documents/folder1"
101
+
102
+ Date: 24/04/2024
103
+
104
+ ## e6100f73-981c-4bde-986b-eed262f04659
105
+
106
+ Property | Value
107
+ ---------|-------
108
+ id | e6100f73-981c-4bde-986b-eed262f04659
109
+ shareId | u!aHR0cHM6Ly83NTY2YXZhLnNoYXJlcG9pbnQuY29tLzpmOi9nL0V2QVFpdnpLV2ZoT3ZJOHJiNm1UVEhjQmQzUUxCOXVsUGIyQTQ1UG81ZmRuYWc
110
+ hasPassword | false
111
+ ```
112
+
113
+ </TabItem>
114
+ </Tabs>
@@ -91,6 +91,11 @@ m365 spo list get --title Documents --webUrl https://contoso.sharepoint.com/site
91
91
 
92
92
  ```json
93
93
  {
94
+ "VersionPolicies": {
95
+ "DefaultExpireAfterDays": 0,
96
+ "DefaultTrimMode": 0,
97
+ "DefaultTrimModeValue": "NoExpiration"
98
+ },
94
99
  "AllowContentTypes": true,
95
100
  "BaseTemplate": 100,
96
101
  "BaseType": 0,
@@ -210,6 +215,7 @@ m365 spo list get --title Documents --webUrl https://contoso.sharepoint.com/site
210
215
  ServerTemplateCanCreateFolders : true
211
216
  TemplateFeatureId : 00bfea71-de22-43b2-a848-c05709900100
212
217
  Title : Test
218
+ VersionPolicies : {"DefaultExpireAfterDays": 0,"DefaultTrimMode": 0,"DefaultTrimModeValue": "NoExpiration"}
213
219
  ```
214
220
 
215
221
  </TabItem>
@@ -36,7 +36,6 @@ m365 teams message remove [options]
36
36
 
37
37
  ## Remarks
38
38
 
39
- You can only remove Microsoft Teams messages that you created yourself.
40
39
 
41
40
  :::info
42
41
 
@@ -44,6 +43,8 @@ This command does only support delegated permissions.
44
43
 
45
44
  :::
46
45
 
46
+ You can only remove Microsoft Teams messages that you created yourself.
47
+
47
48
  ## Examples
48
49
 
49
50
  Remove a message by using IDs
@@ -0,0 +1,62 @@
1
+ import Global from '/docs/cmd/_global.mdx';
2
+ import Tabs from '@theme/Tabs';
3
+ import TabItem from '@theme/TabItem';
4
+
5
+ # teams message restore
6
+
7
+ Restores a deleted message from a channel in a Microsoft Teams team
8
+
9
+ ## Usage
10
+
11
+ ```sh
12
+ m365 teams message restore [options]
13
+ ```
14
+
15
+ ## Options
16
+
17
+ ```md definition-list
18
+ `--teamId [teamId]`
19
+ : ID of the Microsoft Teams team. Specify either `teamId` or `teamName` but not both.
20
+
21
+ `--teamName [teamName]`
22
+ : Name of the Microsoft Teams team. Specify either `teamId` or `teamName` but not both.
23
+
24
+ `--channelId [channelId]`
25
+ : Channel ID of the Microsoft Teams team. Specify either `channelId` or `channelName` but not both.
26
+
27
+ `--channelName [channelName]`
28
+ : Channel name of the Microsoft Teams team. Specify either `channelId` or `channelName` but not both.
29
+
30
+ `-i, --id <id>`
31
+ : The ID of the Teams message.
32
+ ```
33
+
34
+ <Global />
35
+
36
+ ## Remarks
37
+
38
+ :::info
39
+
40
+ This command does only support delegated permissions.
41
+
42
+ :::
43
+
44
+ You can only restore Microsoft Teams messages that you created yourself.
45
+
46
+ ## Examples
47
+
48
+ Restore a deleted message by using IDs
49
+
50
+ ```sh
51
+ m365 teams message restore --teamId 5f5d7b71-1161-44d8-bcc1-3da710eb4171 --channelId 19:4a95f7d8db4c4e7fae857bcebe0623e6@thread.tacv2 --id 1540747442203
52
+ ```
53
+
54
+ Restore a deleted message by using display names
55
+
56
+ ```sh
57
+ m365 teams message restore --teamName Marketing --channelName Branding --id 1540747442203
58
+ ```
59
+
60
+ ## Response
61
+
62
+ The command won't return a response on success.