@pnp/cli-microsoft365 6.7.0-beta.54db310 → 6.7.0-beta.872b0f5

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 (43) hide show
  1. package/.devcontainer/Dockerfile +1 -1
  2. package/README.md +1 -1
  3. package/dist/Auth.js +75 -4
  4. package/dist/AuthServer.js +2 -1
  5. package/dist/Command.js +56 -7
  6. package/dist/m365/aad/commands/user/user-set.js +145 -30
  7. package/dist/m365/base/AzmgmtCommand.js +11 -0
  8. package/dist/m365/base/PowerAppsCommand.js +11 -0
  9. package/dist/m365/base/PowerPlatformCommand.js +11 -0
  10. package/dist/m365/commands/login.js +17 -1
  11. package/dist/m365/commands/status.js +4 -2
  12. package/dist/m365/flow/commands/run/run-get.js +31 -1
  13. package/dist/m365/spo/commands/file/file-list.js +104 -31
  14. package/dist/m365/spo/commands/listitem/listitem-list.js +113 -55
  15. package/dist/m365/spo/commands/site/site-recyclebinitem-clear.js +115 -0
  16. package/dist/m365/spo/commands.js +1 -0
  17. package/dist/request.js +7 -0
  18. package/dist/utils/misc.js +11 -0
  19. package/docs/docs/cmd/aad/user/user-set.md +53 -8
  20. package/docs/docs/cmd/flow/run/run-get.md +110 -9
  21. package/docs/docs/cmd/login.md +5 -2
  22. package/docs/docs/cmd/planner/task/task-add.md +3 -1
  23. package/docs/docs/cmd/planner/task/task-set.md +6 -4
  24. package/docs/docs/cmd/spo/file/file-list.md +87 -2
  25. package/docs/docs/cmd/spo/listitem/listitem-list.md +22 -8
  26. package/docs/docs/cmd/spo/site/site-recyclebinitem-clear.md +45 -0
  27. package/docs/docs/cmd/tenant/id/id-get.md +6 -0
  28. package/docs/docs/cmd/tenant/report/report-activeusercounts.md +7 -0
  29. package/docs/docs/cmd/tenant/report/report-activeuserdetail.md +7 -0
  30. package/docs/docs/cmd/tenant/report/report-office365activationcounts.md +7 -0
  31. package/docs/docs/cmd/tenant/report/report-office365activationsusercounts.md +7 -0
  32. package/docs/docs/cmd/tenant/report/report-office365activationsuserdetail.md +7 -0
  33. package/docs/docs/cmd/tenant/report/report-servicesusercounts.md +7 -0
  34. package/docs/docs/cmd/tenant/security/security-alerts-list.md +23 -0
  35. package/docs/docs/cmd/tenant/serviceannouncement/serviceannouncement-health-get.md +32 -0
  36. package/docs/docs/cmd/tenant/serviceannouncement/serviceannouncement-health-list.md +32 -0
  37. package/docs/docs/cmd/tenant/serviceannouncement/serviceannouncement-healthissue-get.md +26 -0
  38. package/docs/docs/cmd/tenant/serviceannouncement/serviceannouncement-healthissue-list.md +26 -0
  39. package/docs/docs/cmd/tenant/serviceannouncement/serviceannouncement-message-get.md +22 -0
  40. package/docs/docs/cmd/tenant/serviceannouncement/serviceannouncement-message-list.md +22 -0
  41. package/package.json +2 -1
  42. package/dist/m365/spo/commands/file/FilePropertiesCollection.js +0 -3
  43. package/dist/m365/spo/commands/folder/FileFolderCollection.js +0 -3
@@ -25,17 +25,56 @@ m365 aad user set [options]
25
25
  `--forceChangePasswordNextSignIn`
26
26
  : If specified, the user will have to change his password the next time they log in. Can only be set in combination with `resetPassword`.
27
27
 
28
+ `--forceChangePasswordNextSignInWithMfa`
29
+ : Whether the user should change his/her password on the next login and setup MFA. Can only be set in combination with `resetPassword`.
30
+
28
31
  `--currentPassword [currentPassword]`
29
32
  : Current password of the user that is signed in. If this parameter is set, `newPassword` is mandatory. Can't be combined with `resetPassword`.
30
33
 
31
34
  `--newPassword [newPassword]`
32
35
  : New password to be set. Must be set when specifying either `resetPassword` or `currentPassword`.
33
36
 
37
+ `--displayName [displayName]`
38
+ : The name to display in the address book for the user.
39
+
40
+ `--firstName [firstName]`
41
+ : The given name (first name) of the user. Maximum length is 64 characters.
42
+
43
+ `--lastName [lastName]`
44
+ : The user's surname (family name or last name). Maximum length is 64 characters.
45
+
46
+ `--usageLocation [usageLocation]`
47
+ : A two letter [country code](https://learn.microsoft.com/en-us/partner-center/commercial-marketplace-co-sell-location-codes#country-and-region-codes) (ISO standard 3166). Required for users that will be assigned licenses.
48
+
49
+ `--officeLocation [officeLocation]`
50
+ : The office location in the user's place of business.
51
+
52
+ `--jobTitle [jobTitle]`
53
+ : The user's job title. Maximum length is 128 characters.
54
+
55
+ `--companyName [companyName]`
56
+ : The company name which the user is associated. The maximum length is 64 characters.
57
+
58
+ `--department [department]`
59
+ : The name for the department in which the user works. Maximum length is 64 characters.
60
+
61
+ `--preferredLanguage [preferredLanguage]`
62
+ : The preferred language for the user. Should follow [ISO 639-1 Code](https://learn.microsoft.com/en-us/openspecs/office_standards/ms-oe376/6c085406-a698-4e12-9d4d-c3b0ee3dbc4a). Example: `en-US`.
63
+
64
+ `--managerUserId [managerUserId]`
65
+ : User ID of the user's manager. Specify `managerUserId`, `managerUserName` or `removeManager` but not both.
66
+
67
+ `--managerUserName [managerUserName]`
68
+ : User principal name of the manager. Specify `managerUserId`, `managerUserName` or `removeManager` but not both.
69
+
70
+ `--removeManager`
71
+ : Remove currently set manager. The user will have no manager when this flag is set. Specify `managerUserId`, `managerUserName` or `removeManager` but not both.
72
+
34
73
  --8<-- "docs/cmd/_global.md"
35
74
 
36
75
  ## Remarks
37
76
 
38
- You can update information of a user, either by specifying that user's id (`objectId`) or user name (`userPrincipalName`), but not both.
77
+ This command allows using unknown options.
39
78
 
40
79
  If the user with the specified id or user name doesn't exist, you will get a `Resource 'xyz' does not exist or one of its queried reference-property objects are not present.` error.
41
80
 
@@ -50,7 +89,7 @@ m365 aad user set --objectId 1caf7dcd-7e83-4c3a-94f7-932a1299c844 --Department I
50
89
  Update multiple properties of user with name _steve@contoso.onmicrosoft.com_
51
90
 
52
91
  ```sh
53
- m365 aad user set --userPrincipalName steve@contoso.onmicrosoft.com --Department "Sales & Marketing" --CompanyName Contoso
92
+ m365 aad user set --userPrincipalName steve@contoso.onmicrosoft.com --firstName John --lastName Doe --jobTitle "Sales Manager" --companyName Contoso --department Sales --officeLocation "New York"
54
93
  ```
55
94
 
56
95
  Enable user with id _1caf7dcd-7e83-4c3a-94f7-932a1299c844_
@@ -65,12 +104,6 @@ Disable user with id _1caf7dcd-7e83-4c3a-94f7-932a1299c844_
65
104
  m365 aad user set --objectId 1caf7dcd-7e83-4c3a-94f7-932a1299c844 --accountEnabled false
66
105
  ```
67
106
 
68
- Enable user with id _1caf7dcd-7e83-4c3a-94f7-932a1299c844_
69
-
70
- ```sh
71
- m365 aad user set --objectId 1caf7dcd-7e83-4c3a-94f7-932a1299c844 --accountEnabled true
72
- ```
73
-
74
107
  Reset password of a given user by userPrincipalName and require the user to change the password on the next sign in
75
108
 
76
109
  ```sh
@@ -83,6 +116,18 @@ Change password of the currently logged in user
83
116
  m365 aad user set --objectId 1caf7dcd-7e83-4c3a-94f7-932a1299c844 --currentPassword SLBF5gnRtyYc --newPassword 6NLUId79Lc24
84
117
  ```
85
118
 
119
+ Updates a user with a manager
120
+
121
+ ```sh
122
+ m365 aad user set --displayName "John Doe" --userName "john.doe@contoso.com" --managerUserName "adele@contoso.com"
123
+ ```
124
+
125
+ Updates a user by removing its manager
126
+
127
+ ```sh
128
+ m365 aad user set --userName "john.doe@contoso.com" --removeManager
129
+ ```
130
+
86
131
  ## Response
87
132
 
88
133
  The command won't return a response on success.
@@ -19,6 +19,9 @@ m365 flow run get [options]
19
19
  `-e, --environmentName <environmentName>`
20
20
  : The name of the environment where the flow is located
21
21
 
22
+ `--includeTriggerInformation`
23
+ : If specified, include information about the trigger details
24
+
22
25
  --8<-- "docs/cmd/_global.md"
23
26
 
24
27
  ## Remarks
@@ -32,6 +35,8 @@ If the Microsoft Flow with the name you specified doesn't exist, you will get th
32
35
 
33
36
  If the run with the name you specified doesn't exist, you will get the `The provided workflow run name is not valid.` error.
34
37
 
38
+ If the option `includeTriggerInformation` is specified, but the trigger does not contain an outputsLink such as for example with a `Recurrence` trigger, this option will be ignored.
39
+
35
40
  ## Examples
36
41
 
37
42
  Get information about the given run of the specified Power Automate flow
@@ -40,6 +45,11 @@ Get information about the given run of the specified Power Automate flow
40
45
  m365 flow run get --environmentName Default-d87a7535-dd31-4437-bfe1-95340acd55c5 --flowName 5923cb07-ce1a-4a5c-ab81-257ce820109a --name 08586653536760200319026785874CU62
41
46
  ```
42
47
 
48
+ Get information about the given run of the specified Power Automate flow including trigger information
49
+
50
+ ```sh
51
+ m365 flow run get --environmentName Default-d87a7535-dd31-4437-bfe1-95340acd55c5 --flowName 5923cb07-ce1a-4a5c-ab81-257ce820109a --name 08586653536760200319026785874CU62 --includeTriggerInformation
52
+ ```
43
53
 
44
54
  ## Response
45
55
 
@@ -61,7 +71,7 @@ m365 flow run get --environmentName Default-d87a7535-dd31-4437-bfe1-95340acd55c5
61
71
  "trigger": {
62
72
  "name": "When_a_new_response_is_submitted",
63
73
  "inputsLink": {
64
- "uri": "https://prod-08.centralindia.logic.azure.com:443/workflows/f7bf8f6b5c494e63bfc21b54087a596e/runs/08585329112602833828909892130CU17/contents/TriggerInputs?api-version=2016-06-01&se=2022-11-17T18%3A00%3A00.0000000Z&sp=%2Fruns%2F08585329112602833828909892130CU17%2Fcontents%2FTriggerInputs%2Fread&sv=1.0&sig=jmdMRWvY7uGoxTmqd3_a2bJtegXuVyuKTKKUVLiwh38",
74
+ "uri": "https://prod-08.centralindia.logic.azure.com:443/workflows/f7bf8f6b5c494e63bfc21b54087a596e/runs/08585329112602833828909892130CU17/contents/TriggerInputs?api-version=2016-06-01&se=2022-11-17T18%3A00%3A00.0000000Z&sp=%2Fruns%2F08585329112602833828909892130CU17%2Fcontents%2FTriggerInputs%2Fread&sv=1.0&sig=",
65
75
  "contentVersion": "6ZrBBE+MJg7IvhMgyJLMmA==",
66
76
  "contentSize": 349,
67
77
  "contentHash": {
@@ -70,7 +80,7 @@ m365 flow run get --environmentName Default-d87a7535-dd31-4437-bfe1-95340acd55c5
70
80
  }
71
81
  },
72
82
  "outputsLink": {
73
- "uri": "https://prod-08.centralindia.logic.azure.com:443/workflows/f7bf8f6b5c494e63bfc21b54087a596e/runs/08585329112602833828909892130CU17/contents/TriggerOutputs?api-version=2016-06-01&se=2022-11-17T18%3A00%3A00.0000000Z&sp=%2Fruns%2F08585329112602833828909892130CU17%2Fcontents%2FTriggerOutputs%2Fread&sv=1.0&sig=Y3qqjuWrrcQJrmF7uvm6LVzQy5w-dNOFWJ8Yt8khXvA",
83
+ "uri": "https://prod-08.centralindia.logic.azure.com:443/workflows/f7bf8f6b5c494e63bfc21b54087a596e/runs/08585329112602833828909892130CU17/contents/TriggerOutputs?api-version=2016-06-01&se=2022-11-17T18%3A00%3A00.0000000Z&sp=%2Fruns%2F08585329112602833828909892130CU17%2Fcontents%2FTriggerOutputs%2Fread&sv=1.0&sig=",
74
84
  "contentVersion": "Z/4a8tfYygNAR1xpc44iww==",
75
85
  "contentSize": 493,
76
86
  "contentHash": {
@@ -97,17 +107,108 @@ m365 flow run get --environmentName Default-d87a7535-dd31-4437-bfe1-95340acd55c5
97
107
  === "Text"
98
108
 
99
109
  ```text
100
- endTime :
101
- name : 08585329112602833828909892130CU17
102
- startTime : 2022-11-17T14:33:45.2763872Z
103
- status : Running
104
- triggerName: When_a_new_response_is_submitted
110
+ endTime : 2023-03-04T09:05:22.5880202Z
111
+ name : 08585236861638480597867166179CU104
112
+ startTime : 2023-03-04T09:05:21.8066368Z
113
+ status : Succeeded
114
+ triggerName: When_an_email_is_flagged_(V4)
105
115
  ```
106
116
 
107
117
  === "CSV"
108
118
 
109
119
  ```csv
110
120
  name,startTime,endTime,status,triggerName
111
- 08585329112602833828909892130CU17,2022-11-17T14:33:45.2763872Z,,Running,When_a_new_response_is_submitted
121
+ 08585236861638480597867166179CU104,2023-03-04T09:05:21.8066368Z,2023-03-04T09:05:22.5880202Z,Succeeded,When_an_email_is_flagged_(V4)
122
+ ```
123
+
124
+ === "Markdown"
125
+
126
+ ```md
127
+ # flow run get --environmentName Default-d87a7535-dd31-4437-bfe1-95340acd55c5 --flowName 5923cb07-ce1a-4a5c-ab81-257ce820109a --name 08586653536760200319026785874CU62
128
+
129
+ Date: 04/03/2023
130
+
131
+ ## 08586653536760200319026785874CU62 (/providers/Microsoft.ProcessSimple/environments/Default-d87a7535-dd31-4437-bfe1-95340acd55c5/flows/5923cb07-ce1a-4a5c-ab81-257ce820109a/runs/08586653536760200319026785874CU62)
132
+
133
+ Property | Value
134
+ ---------|-------
135
+ name | 08586653536760200319026785874CU62
136
+ id | /providers/Microsoft.ProcessSimple/environments/Default-e1dd4023-a656-480a-8a0e-c1b1eec51e1d/flows/c3c707b5-fefd-4f7a-a96c-b8e0d5ca3cc1/runs/08585208964855963748594654409CU47
137
+ type | Microsoft.ProcessSimple/environments/flows/runs
138
+ startTime | 2023-03-04T09:05:21.8066368Z
139
+ endTime | 2023-03-04T09:05:22.5880202Z
140
+ status | Succeeded
141
+ triggerName | When\_an\_email\_is\_flagged\_(V4)
142
+ ```
143
+
144
+ ### `includeTriggerInformation` response
145
+
146
+ When using the option `includeTriggerInformation`, the response for the json-output will differ.
147
+
148
+ === "JSON"
149
+
150
+ ```json
151
+ {
152
+ "name": "08585236861638480597867166179CU104",
153
+ "id": "/providers/Microsoft.ProcessSimple/environments/Default-e1dd4023-a656-480a-8a0e-c1b1eec51e1d/flows/24335774-daf6-4183-acb7-f5155c2cd2fe/runs/08585236861638480597867166179CU104",
154
+ "type": "Microsoft.ProcessSimple/environments/flows/runs",
155
+ "properties": {
156
+ "startTime": "2023-03-04T09:05:21.8066368Z",
157
+ "endTime": "2023-03-04T09:05:22.5880202Z",
158
+ "status": "Succeeded",
159
+ "correlation": {
160
+ "clientTrackingId": "08585236861638480598867166179CU131"
161
+ },
162
+ "trigger": {
163
+ "name": "When_an_email_is_flagged_(V4)",
164
+ "inputsLink": {
165
+ "uri": "https://prod-130.westeurope.logic.azure.com:443/workflows/3ebadb794f6641e0b7f4fda131cdfb0b/runs/08585236861638480597867166179CU104/contents/TriggerInputs?api-version=2016-06-01&se=2023-03-04T14%3A00%3A00.0000000Z&sp=%2Fruns%2F08585236861638480597867166179CU104%2Fcontents%2FTriggerInputs%2Fread&sv=1.0&sig=",
166
+ "contentVersion": "2v/VLXFrKV6JvwSdcN7aHg==",
167
+ "contentSize": 343,
168
+ "contentHash": {
169
+ "algorithm": "md5",
170
+ "value": "2v/VLXFrKV6JvwSdcN7aHg=="
171
+ }
172
+ },
173
+ "outputsLink": {
174
+ "uri": "https://prod-130.westeurope.logic.azure.com:443/workflows/3ebadb794f6641e0b7f4fda131cdfb0b/runs/08585236861638480597867166179CU104/contents/TriggerOutputs?api-version=2016-06-01&se=2023-03-04T14%3A00%3A00.0000000Z&sp=%2Fruns%2F08585236861638480597867166179CU104%2Fcontents%2FTriggerOutputs%2Fread&sv=1.0&sig=",
175
+ "contentVersion": "AHZEeWNlQ0bLe48yDmpzrQ==",
176
+ "contentSize": 3478,
177
+ "contentHash": {
178
+ "algorithm": "md5",
179
+ "value": "AHZEeWNlQ0bLe48yDmpzrQ=="
180
+ }
181
+ },
182
+ "startTime": "2023-03-04T09:05:21.6192576Z",
183
+ "endTime": "2023-03-04T09:05:21.7442626Z",
184
+ "scheduledTime": "2023-03-04T09:05:21.573561Z",
185
+ "originHistoryName": "08585236861638480598867166179CU131",
186
+ "correlation": {
187
+ "clientTrackingId": "08585236861638480598867166179CU131"
188
+ },
189
+ "code": "OK",
190
+ "status": "Succeeded"
191
+ }
192
+ },
193
+ "startTime": "2023-03-04T09:05:21.8066368Z",
194
+ "endTime": "2023-03-04T09:05:22.5880202Z",
195
+ "status": "Succeeded",
196
+ "triggerName": "When_an_email_is_flagged_(V4)",
197
+ "triggerInformation": {
198
+ "from": "john@contoso.com",
199
+ "toRecipients": "doe@contoso.com",
200
+ "subject": "Dummy email",
201
+ "body": "<html><head>\r\\\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\"></head><body><p>This is dummy content</p></body></html>",
202
+ "importance": "normal",
203
+ "bodyPreview": "This is dummy content",
204
+ "hasAttachments": false,
205
+ "id": "AAMkADgzN2Q1NThiLTI0NjYtNGIxYS05MDdjLTg1OWQxNzgwZGM2ZgBGAAAAAAC6jQfUzacTSIHqMw2yacnUBwBiOC8xvYmdT6G2E_hLMK5kAAAAAAEMAABiOC8xvYmdT6G2E_hLMK5kAALUqy81AAA=",
206
+ "internetMessageId": "<DB7PR03MB5018879914324FC65695809FE1AD9@DB7PR03MB5018.eurprd03.prod.outlook.com>",
207
+ "conversationId": "AAQkADgzN2Q1NThiLTI0NjYtNGIxYS05MDdjLTg1OWQxNzgwZGM2ZgAQAMqP9zsK8a1CnIYEgHclLTk=",
208
+ "receivedDateTime": "2023-03-01T15:06:57+00:00",
209
+ "isRead": false,
210
+ "attachments": [],
211
+ "isHtml": true
212
+ }
213
+ }
112
214
  ```
113
-
@@ -37,6 +37,9 @@ m365 login [options]
37
37
  `--tenant [tenant]`
38
38
  : ID of the tenant from which accounts should be able to authenticate. Use `common` or `organization` if the app is multitenant. If not specified, use the tenant specified in the `CLIMICROSOFT365_TENANT` environment variable. If the environment variable is not defined, use `common` as the tenant identifier
39
39
 
40
+ `--cloud [cloud]`
41
+ : Cloud to connect to. Allowed values `Public`, `USGov`, `USGovHigh`, `USGovDoD` and `China`. Default `Public`
42
+
40
43
  --8<-- "docs/cmd/_global.md"
41
44
 
42
45
  ## Remarks
@@ -45,8 +48,6 @@ Using the `login` command you can log in to Microsoft 365.
45
48
 
46
49
  By default, the `login` command uses device code OAuth flow to log in to Microsoft 365. Alternatively, you can authenticate using a user name and password or certificate, which are convenient for CI/CD scenarios, but which come with their own [limitations](../user-guide/connecting-office-365.md).
47
50
 
48
- When logging in to Microsoft 365, the `login` command stores in memory the access token and the refresh token. Both tokens are cleared from memory after exiting the CLI or by calling the [logout](logout.md) command.
49
-
50
51
  When logging in to Microsoft 365 using the user name and password, next to the access and refresh token, the CLI for Microsoft 365 will store the user credentials so that it can automatically re-authenticate if necessary. Similarly to the tokens, the credentials are removed by re-authenticating using the device code or by calling the [logout](logout.md) command.
51
52
 
52
53
  When logging in to Microsoft 365 using a certificate, the CLI for Microsoft 365 will store the contents of the certificate so that it can automatically re-authenticate if necessary. The contents of the certificate are removed by re-authenticating using the device code or by calling the [logout](logout.md) command.
@@ -55,6 +56,8 @@ To log in to Microsoft 365 using a certificate or secret, you will typically [cr
55
56
 
56
57
  Managed identity in Azure Cloud Shell is the identity of the user. It is neither system- nor user-assigned and it can't be configured. To log in to Microsoft 365 using managed identity in Azure Cloud Shell, set `authType` to `identity` and don't specify the `userName` option.
57
58
 
59
+ When connecting to clouds other than `Public`, you'll need to use an Azure AD application registered in a directory provisioned in that cloud. If you try to login using the default Azure AD application, login will fail.
60
+
58
61
  ## Examples
59
62
 
60
63
  Log in to Microsoft 365 using the device code
@@ -50,7 +50,7 @@ m365 planner task add [options]
50
50
  : Hint used to order items of this type in a list view. The format is defined as outlined [here](https://docs.microsoft.com/graph/api/resources/planner-order-hint-format?view=graph-rest-1.0).
51
51
 
52
52
  `--description [description]`
53
- : Description of the task
53
+ : Description of the task.
54
54
 
55
55
  `--appliedCategories [appliedCategories]`
56
56
  : Comma-separated categories that should be added to the task. The possible options are: `category1`, `category2`, `category3`, `category4`, `category5` and/or `category6`. Additional info defined [here](https://docs.microsoft.com/graph/api/resources/plannerappliedcategories?view=graph-rest-1.0).
@@ -81,6 +81,8 @@ When you specify an integer value for `priority`, consider the following:
81
81
  - values 5, 6 and 7 are interpreted as _Medium_
82
82
  - values 8, 9 and 10 are interpreted as _Low_
83
83
 
84
+ When using `description` with a multiple lines value, use the new line character of the shell you are using to indicate line breaks. For PowerShell this is `` `n ``. For Zsh or Bash use `\n` with a `$` in front. E.g. `$"Line 1\nLine 2"`.
85
+
84
86
  ## Examples
85
87
 
86
88
  Adds a Microsoft Planner task with the name _My Planner Task_ for plan with the ID _8QZEH7b3wkSbGQobscsM5gADCBa_ and for the bucket with the ID _IK8tuFTwQEa5vTonM7ZMRZgAKdna_
@@ -50,16 +50,16 @@ m365 planner task set [options]
50
50
  : Comma-separated UPNs of the assignees that should be added to the task assignment. Specify either `assignedToUserIds` or `assignedToUserNames` but not both.
51
51
 
52
52
  `--description [description]`
53
- : Description of the task
53
+ : Description of the task.
54
54
 
55
55
  `--orderHint [orderHint]`
56
- : Hint used to order items of this type in a list view
56
+ : Hint used to order items of this type in a list view.
57
57
 
58
58
  `--assigneePriority [assigneePriority]`
59
- : Hint used to order items of this type in a list view
59
+ : Hint used to order items of this type in a list view.
60
60
 
61
61
  `--appliedCategories [appliedCategories]`
62
- : Comma-separated categories that should be added to the task
62
+ : Comma-separated categories that should be added to the task.
63
63
 
64
64
  `--priority [priority]`
65
65
  : Priority of the task: Urgent, Important, Medium, Low. Or an integer between 0 and 10 (check remarks section for more info).
@@ -83,6 +83,8 @@ When you specify an integer value for `priority`, consider the following:
83
83
 
84
84
  You can add up to 6 categories to the task. An example to add _category1_ and _category3_ would be `category1,category3`.
85
85
 
86
+ When using `description` with a multiple lines value, use the new line character of the shell you are using to indicate line breaks. For PowerShell this is `` `n ``. For Zsh or Bash use `\n` with a `$` in front. E.g. `$"Line 1\nLine 2"`.
87
+
86
88
  ## Examples
87
89
 
88
90
  Updates a Microsoft Planner task name to _My Planner Task_ for the task with the ID _Z-RLQGfppU6H3663DBzfs5gAMD3o_
@@ -16,21 +16,106 @@ m365 spo file list [options]
16
16
  `-f, --folder <folder>`
17
17
  : The server- or site-relative URL of the folder from which to retrieve files
18
18
 
19
+ `--fields [fields]`
20
+ : Comma-separated list of fields to retrieve. Will retrieve all fields if not specified.
21
+
22
+ `--filter [filter]`
23
+ : OData filter to use to query the list of items with
24
+
19
25
  `-r, --recursive`
20
26
  : Set to retrieve files from subfolders
21
27
 
22
28
  --8<-- "docs/cmd/_global.md"
23
29
 
30
+ ## Remarks
31
+
32
+ When the `fields` option includes values with a `/`, for example: `ListItemAllFields/Id`, an additional `$expand` query parameter will be included on `ListItemAllFields`.
33
+
24
34
  ## Examples
25
35
 
26
- Return all files from folder _Shared Documents_ located in site _https://contoso.sharepoint.com/sites/project-x_
36
+ Return all files from a folder
27
37
 
28
38
  ```sh
29
39
  m365 spo file list --webUrl https://contoso.sharepoint.com/sites/project-x --folder 'Shared Documents'
30
40
  ```
31
41
 
32
- Return all files from the folder _Shared Documents_ and all the sub-folders of _Shared Documents_ located in site _https://contoso.sharepoint.com/sites/project-x_
42
+ Return all files from a folder and all the sub-folders
33
43
 
34
44
  ```sh
35
45
  m365 spo file list --webUrl https://contoso.sharepoint.com/sites/project-x --folder 'Shared Documents' --recursive
36
46
  ```
47
+
48
+ Return the files from a folder with specific fields which will be expanded
49
+
50
+ ```sh
51
+ m365 spo file list --webUrl https://contoso.sharepoint.com/sites/project-x --folder 'Shared Documents' --fields "Title,Length"
52
+ ```
53
+
54
+ Return the files from a folder that meet the criteria of the filter with specific fields which will be expanded
55
+
56
+ ```sh
57
+ m365 spo file list --webUrl https://contoso.sharepoint.com/sites/project-x --folder 'Shared Documents' --fields ListItemAllFields/Id --filter "Name eq 'document.docx'"
58
+ ```
59
+
60
+ ## Response
61
+
62
+ === "JSON"
63
+
64
+ ```json
65
+ [
66
+ {
67
+ "CheckInComment": "",
68
+ "CheckOutType": 2,
69
+ "ContentTag": "{F09C4EFE-B8C0-4E89-A166-03418661B89B},9,12",
70
+ "CustomizedPageStatus": 0,
71
+ "ETag": "\"{F09C4EFE-B8C0-4E89-A166-03418661B89B},9\"",
72
+ "Exists": true,
73
+ "IrmEnabled": false,
74
+ "Length": 331673,
75
+ "Level": 1,
76
+ "LinkingUri": "https://contoso.sharepoint.com/sites/project-x/Shared Documents/Document.docx?d=wf09c4efeb8c04e89a16603418661b89b",
77
+ "LinkingUrl": "https://contoso.sharepoint.com/sites/project-x/Shared Documents/Document.docx?d=wf09c4efeb8c04e89a16603418661b89b",
78
+ "MajorVersion": 3,
79
+ "MinorVersion": 0,
80
+ "Name": "Document.docx",
81
+ "ServerRelativeUrl": "/sites/project-x/Shared Documents/Document.docx",
82
+ "TimeCreated": "2018-02-05T08:42:36Z",
83
+ "TimeLastModified": "2018-02-05T08:44:03Z",
84
+ "Title": "",
85
+ "UIVersion": 1536,
86
+ "UIVersionLabel": "3.0",
87
+ "UniqueId": "f09c4efe-b8c0-4e89-a166-03418661b89b"
88
+ }
89
+ ]
90
+ ```
91
+
92
+ === "Text"
93
+
94
+ ```text
95
+ Name ServerRelativeUrl UniqueId
96
+ --------------------------------- ----------------------------------------------- ------------------------------------
97
+ Document.docx /sites/project-x/Shared Documents/Document.docx 5eb97525-2167-4d26-94b8-092a97d65716
98
+ ```
99
+
100
+ === "CSV"
101
+
102
+ ```csv
103
+ Name,ServerRelativeUrl,UniqueId
104
+ Document.docx,/sites/project-x/Shared Documents/Document.docx,5eb97525-2167-4d26-94b8-092a97d65716
105
+ ```
106
+
107
+ === "Markdown"
108
+
109
+ ```md
110
+ # spo file list --webUrl "https://contoso.sharepoint.com" --folder "Shared Documents"
111
+
112
+ Date: 23/3/2023
113
+
114
+ ## Document.docx (5eb97525-2167-4d26-94b8-092a97d65716)
115
+
116
+ Property | Value
117
+ ---------|-------
118
+ Name | Document.docx
119
+ ServerRelativeUrl | /sites/project-x/Shared Documents/Document.docx
120
+ UniqueId | 5eb97525-2167-4d26-94b8-092a97d65716
121
+ ```
@@ -32,7 +32,7 @@ m365 spo listitem list [options]
32
32
  : OData filter to use to query the list of items with. Specify `camlQuery` or `filter` but not both.
33
33
 
34
34
  `-p, --pageSize [pageSize]`
35
- : Number of list items to return. Specify `camlQuery` or `pageSize` but not both.
35
+ : Number of list items to return. Specify `camlQuery` or `pageSize` but not both. The default value is 5000.
36
36
 
37
37
  `-n, --pageNumber [pageNumber]`
38
38
  : Page number to return if `pageSize` is specified (first page is indexed as value of 0).
@@ -41,6 +41,8 @@ m365 spo listitem list [options]
41
41
 
42
42
  ## Remarks
43
43
 
44
+ This command retrieves all items in the list, even if there are more than 5000. Use the `pageSize` and `pageNumber` options if you only want a specific amount of items. When using a CAML query, include a `RowLimit`-node to get all items. If you run into list view threshold exceptions, remove any Query-conditions or filters and also include a `RowLimit`-node.
45
+
44
46
  `pageNumber` is specified as a 0-based index. A value of `2` returns the third page of items.
45
47
 
46
48
  If you want to specify a lookup type in the `properties` option, define which columns from the related list should be returned.
@@ -53,12 +55,6 @@ Get all items from a list named Demo List
53
55
  m365 spo listitem list --listTitle "Demo List" --webUrl https://contoso.sharepoint.com/sites/project-x
54
56
  ```
55
57
 
56
- From a list named _Demo List_ get all items with title _Demo list item_ using a CAML query
57
-
58
- ```sh
59
- m365 spo listitem list --listTitle "Demo List" --webUrl https://contoso.sharepoint.com/sites/project-x --camlQuery "<View><Query><Where><Eq><FieldRef Name='Title' /><Value Type='Text'>Demo list item</Value></Eq></Where></Query></View>"
60
- ```
61
-
62
58
  Get all items from a list with ID _935c13a0-cc53-4103-8b48-c1d0828eaa7f_
63
59
 
64
60
  ```sh
@@ -83,10 +79,16 @@ From a list named _Demo List_ get all items with title _Demo list item_ using an
83
79
  m365 spo listitem list --listTitle "Demo List" --webUrl https://contoso.sharepoint.com/sites/project-x --filter "Title eq 'Demo list item'"
84
80
  ```
85
81
 
82
+ From a list named _Demo List_ get the first 100 items
83
+
84
+ ```sh
85
+ m365 spo listitem list --listTitle "Demo List" --webUrl https://contoso.sharepoint.com/sites/project-x --pageSize 100 --pageNumber 0
86
+ ```
87
+
86
88
  From a list named _Demo List_ get the second batch of 10 items
87
89
 
88
90
  ```sh
89
- m365 spo listitem list --listTitle "Demo List" --webUrl https://contoso.sharepoint.com/sites/project-x --pageSize 10 --pageNumber 2
91
+ m365 spo listitem list --listTitle "Demo List" --webUrl https://contoso.sharepoint.com/sites/project-x --pageSize 10 --pageNumber 1
90
92
  ```
91
93
 
92
94
  Get all items from a list by server-relative URL
@@ -95,6 +97,18 @@ Get all items from a list by server-relative URL
95
97
  m365 spo listitem list --listUrl /sites/project-x/documents --webUrl https://contoso.sharepoint.com/sites/project-x
96
98
  ```
97
99
 
100
+ From a list named _Demo List_ get all items with title _Demo list item_ using a CAML query
101
+
102
+ ```sh
103
+ m365 spo listitem list --listTitle "Demo List" --webUrl https://contoso.sharepoint.com/sites/project-x --camlQuery "<View><Query><Where><Eq><FieldRef Name='Title' /><Value Type='Text'>Demo list item</Value></Eq></Where></Query><RowLimit Paged='TRUE'>5000</RowLimit></View>"
104
+ ```
105
+
106
+ From a library named _Demo Library_ with 5000+ files and folders, get all items recursively without running into a list view threshold exception, using a CAML query
107
+
108
+ ```sh
109
+ m365 spo listitem list --listTitle "Demo List" --webUrl https://contoso.sharepoint.com/sites/project-x --camlQuery "<View Scope='RecursiveAll'><Query></Query><ViewFields><FieldRef Name='Title'/></ViewFields><RowLimit Paged='TRUE'>5000</RowLimit></View>"
110
+ ```
111
+
98
112
  ## Response
99
113
 
100
114
  === "JSON"
@@ -0,0 +1,45 @@
1
+ # spo site recyclebinitem clear
2
+
3
+ Permanently removes all items in a site recycle bin
4
+
5
+ ## Usage
6
+
7
+ ```sh
8
+ m365 spo site recyclebinitem clear [options]
9
+ ```
10
+
11
+ ## Options
12
+
13
+ `-u, --siteUrl <siteUrl>`
14
+ : URL of the site where the recycle bin is located.
15
+
16
+ `--secondary`
17
+ : Remove all items from the second-stage recycle bin. When not specified, items from the first-stage recycle bin will be cleared.
18
+
19
+ `--confirm`
20
+ : Don't prompt for confirmation.
21
+
22
+ --8<-- "docs/cmd/_global.md"
23
+
24
+ ## Remarks
25
+
26
+ !!! warning
27
+ Items in the recycle bin will be permanently removed without the ability to restore them.
28
+
29
+ ## Examples
30
+
31
+ Clear all items from the first-stage recycle bin
32
+
33
+ ```sh
34
+ m365 spo site recyclebinitem clear --siteUrl https://contoso.sharepoint.com/sites/sales
35
+ ```
36
+
37
+ Clear all items from the second-stage recycle bin
38
+
39
+ ```sh
40
+ m365 spo site recyclebinitem clear --siteUrl https://contoso.sharepoint.com/sites/sales --secondary
41
+ ```
42
+
43
+ ## Response
44
+
45
+ The command won't return a response on success.
@@ -52,3 +52,9 @@ m365 tenant id get
52
52
  ```csv
53
53
  e65b162c-6f87-4eb1-a24e-1b37d3504663
54
54
  ```
55
+
56
+ === "Markdown"
57
+
58
+ ```md
59
+ e65b162c-6f87-4eb1-a24e-1b37d3504663
60
+ ```
@@ -72,3 +72,10 @@ m365 tenant report activeusercounts --period D7 --output json > "activeusercount
72
72
  Report Refresh Date,Office 365,Exchange,OneDrive,SharePoint,Skype For Business,Yammer,Teams,Report Date,Report Period
73
73
  2022-10-25,1,5,4,3,2,3,1,2022-10-19,7
74
74
  ```
75
+
76
+ === "Markdown"
77
+
78
+ ```md
79
+ Report Refresh Date,Office 365,Exchange,OneDrive,SharePoint,Skype For Business,Yammer,Teams,Report Date,Report Period
80
+ 2022-10-25,1,5,4,3,2,3,1,2022-10-19,7
81
+ ```
@@ -99,3 +99,10 @@ m365 tenant report activeuserdetail --period D7 --output json > "activeuserdetai
99
99
  Report Refresh Date,User Principal Name,Display Name,Is Deleted,Deleted Date,Has Exchange License,Has OneDrive License,Has SharePoint License,Has Skype For Business License,Has Yammer License,Has Teams License,Exchange Last Activity Date,OneDrive Last Activity Date,SharePoint Last Activity Date,Skype For Business Last Activity Date,Yammer Last Activity Date,Teams Last Activity Date,Exchange License Assign Date,OneDrive License Assign Date,SharePoint License Assign Date,Skype For Business License Assign Date,Yammer License Assign Date,Teams License Assign Date,Assigned Products
100
100
  2022-10-23,77E5979DD60BA6EAA53E814DBEEEFA5F,4291DA7C39EE3263E97336B42734A667,False,,True,True,True,True,True,True,,2022-09-12,2020-09-12,2022-09-12,2021-10-30,2020-10-30,2019-04-21,2017-09-20,2021-01-10,2021-01-10,2021-01-10,2021-01-10,2021-01-10,2021-01-10,MICROSOFT 365 E5 DEVELOPER (WITHOUT WINDOWS AND AUDIO CONFERENCING)
101
101
  ```
102
+
103
+ === "Markdown"
104
+
105
+ ```md
106
+ Report Refresh Date,User Principal Name,Display Name,Is Deleted,Deleted Date,Has Exchange License,Has OneDrive License,Has SharePoint License,Has Skype For Business License,Has Yammer License,Has Teams License,Exchange Last Activity Date,OneDrive Last Activity Date,SharePoint Last Activity Date,Skype For Business Last Activity Date,Yammer Last Activity Date,Teams Last Activity Date,Exchange License Assign Date,OneDrive License Assign Date,SharePoint License Assign Date,Skype For Business License Assign Date,Yammer License Assign Date,Teams License Assign Date,Assigned Products
107
+ 2022-10-23,77E5979DD60BA6EAA53E814DBEEEFA5F,4291DA7C39EE3263E97336B42734A667,False,,True,True,True,True,True,True,,2022-09-12,2020-09-12,2022-09-12,2021-10-30,2020-10-30,2019-04-21,2017-09-20,2021-01-10,2021-01-10,2021-01-10,2021-01-10,2021-01-10,2021-01-10,MICROSOFT 365 E5 DEVELOPER (WITHOUT WINDOWS AND AUDIO CONFERENCING)
108
+ ```
@@ -51,3 +51,10 @@ m365 tenant report office365activationcounts
51
51
  Report Refresh Date,Product Type,Windows,Mac,Android,iOS,Windows 10 Mobile
52
52
  2022-10-25,MICROSOFT 365 APPS FOR ENTERPRISE,5,0,0,0,0
53
53
  ```
54
+
55
+ === "Markdown"
56
+
57
+ ```md
58
+ Report Refresh Date,Product Type,Windows,Mac,Android,iOS,Windows 10 Mobile
59
+ 2022-10-25,MICROSOFT 365 APPS FOR ENTERPRISE,5,0,0,0,0
60
+ ```
@@ -49,3 +49,10 @@ m365 tenant report office365activationsusercounts
49
49
  Report Refresh Date,Product Type,Assigned,Activated,Shared Computer Activation
50
50
  2022-10-25,MICROSOFT 365 APPS FOR ENTERPRISE,24,5,0
51
51
  ```
52
+
53
+ === "Markdown"
54
+
55
+ ```md
56
+ Report Refresh Date,Product Type,Assigned,Activated,Shared Computer Activation
57
+ 2022-10-25,MICROSOFT 365 APPS FOR ENTERPRISE,24,5,0
58
+ ```
@@ -55,3 +55,10 @@ m365 tenant report office365activationsuserdetail
55
55
  Report Refresh Date,User Principal Name,Display Name,Product Type,Last Activated Date,Windows,Mac,Windows 10 Mobile,iOS,Android,Activated On Shared Computer
56
56
  2022-10-25,77E5979DD60BA6EAA53E814DBEEEFA5F,4291DA7C39EE3263E97336B42734A667,MICROSOFT 365 APPS FOR ENTERPRISE,2021-01-10,1,0,0,0,0,False
57
57
  ```
58
+
59
+ === "Markdown"
60
+
61
+ ```md
62
+ Report Refresh Date,User Principal Name,Display Name,Product Type,Last Activated Date,Windows,Mac,Windows 10 Mobile,iOS,Android,Activated On Shared Computer
63
+ 2022-10-25,77E5979DD60BA6EAA53E814DBEEEFA5F,4291DA7C39EE3263E97336B42734A667,MICROSOFT 365 APPS FOR ENTERPRISE,2021-01-10,1,0,0,0,0,False
64
+ ```
@@ -78,3 +78,10 @@ m365 tenant report servicesusercounts --period D7 --output json > "servicesuserc
78
78
  Report Refresh Date,Exchange Active,Exchange Inactive,OneDrive Active,OneDrive Inactive,SharePoint Active,SharePoint Inactive,Skype For Business Active,Skype For Business Inactive,Yammer Active,Yammer Inactive,Teams Active,Teams Inactive,Office 365 Active,Office 365 Inactive,Report Period
79
79
  2022-10-23,1,23,1,23,1,23,0,24,0,24,1,23,2,22,7
80
80
  ```
81
+
82
+ === "Markdown"
83
+
84
+ ```md
85
+ Report Refresh Date,Exchange Active,Exchange Inactive,OneDrive Active,OneDrive Inactive,SharePoint Active,SharePoint Inactive,Skype For Business Active,Skype For Business Inactive,Yammer Active,Yammer Inactive,Teams Active,Teams Inactive,Office 365 Active,Office 365 Inactive,Report Period
86
+ 2022-10-23,1,23,1,23,1,23,0,24,0,24,1,23,2,22,7
87
+ ```