@pnp/cli-microsoft365 7.8.1 → 7.9.0-beta.884c943

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.
@@ -0,0 +1,121 @@
1
+ import Global from '/docs/cmd/_global.mdx';
2
+ import Tabs from '@theme/Tabs';
3
+ import TabItem from '@theme/TabItem';
4
+
5
+ # entra user groupmembership list
6
+
7
+ Retrieves all groups where the user is a member of
8
+
9
+ ## Usage
10
+
11
+ ```sh
12
+ m365 entra user groupmembership list [options]
13
+ ```
14
+
15
+ ## Options
16
+
17
+ ```md definition-list
18
+ `-i, --userId [userId]`
19
+ : The ID of the user to retrieve information for. Use either `userId`, `userName` or `userEmail`, but not multiple.
20
+
21
+ `-n, --userName [userName]`
22
+ : The name of the user to retrieve information for. Use either `userId`, `userName` or `userEmail`, but not multiple.
23
+
24
+ `-e, --userEmail [userEmail]`
25
+ : The email of the user to retrieve information for. Use either `userId`, `userName` or `userEmail`, but not multiple.
26
+
27
+ `--securityEnabledOnly [securityEnabledOnly]`
28
+ : Specifies that only security-enabled groups that the user is a member of should be returned
29
+ ```
30
+
31
+ <Global />
32
+
33
+ ## Examples
34
+
35
+ Retrieves groups that the user is a member of
36
+
37
+ ```sh
38
+ m365 entra user groupmembership list --userId '1caf7dcd-7e83-4c3a-94f7-932a1299c844'
39
+ ```
40
+
41
+ Retrieves only security groups that the user is a member of
42
+
43
+ ```sh
44
+ m365 entra user groupmembership list --userName 'john.doe@contoso.com' --securityEnabledOnly
45
+ ```
46
+
47
+ Retrieves groups where the currently logged user is a member of
48
+
49
+ ```sh
50
+ m365 entra user groupmembership list --userId '@meId'
51
+ ```
52
+
53
+ Retrieves groups where the currently logged user is a member of
54
+
55
+ ```sh
56
+ m365 entra user groupmembership list --userName '@meUserName'
57
+ ```
58
+
59
+ ## Response
60
+
61
+ <Tabs>
62
+ <TabItem value="JSON">
63
+
64
+ ```json
65
+ [
66
+ {
67
+ "groupId": "01b62bc5-9701-4f93-9587-9d1ea58a086d"
68
+ },
69
+ {
70
+ "groupId": "619701a2-4bdc-494a-a9dd-9d3aeebcafd9"
71
+ },
72
+ {
73
+ "groupId": "ec98d904-ac8c-49f0-99e1-c9c0e1a1e453"
74
+ }
75
+ ]
76
+ ```
77
+
78
+ </TabItem>
79
+ <TabItem value="Text">
80
+
81
+ ```text
82
+ groupId
83
+ ------------------------------------
84
+ 01b62bc5-9701-4f93-9587-9d1ea58a086d
85
+ 619701a2-4bdc-494a-a9dd-9d3aeebcafd9
86
+ ec98d904-ac8c-49f0-99e1-c9c0e1a1e453
87
+ ```
88
+
89
+ </TabItem>
90
+ <TabItem value="CSV">
91
+
92
+ ```csv
93
+ groupId
94
+ 01b62bc5-9701-4f93-9587-9d1ea58a086d
95
+ 619701a2-4bdc-494a-a9dd-9d3aeebcafd9
96
+ ec98d904-ac8c-49f0-99e1-c9c0e1a1e453
97
+ ```
98
+
99
+ </TabItem>
100
+ <TabItem value="Markdown">
101
+
102
+ ```md
103
+ # entra user groupmembership list --userId "1f5595b2-aa07-445d-9801-a45ea18160b2"
104
+
105
+ Date: 5/17/2024
106
+
107
+ Property | Value
108
+ ---------|-------
109
+ groupId | 01b62bc5-9701-4f93-9587-9d1ea58a086d
110
+
111
+ Property | Value
112
+ ---------|-------
113
+ groupId | 619701a2-4bdc-494a-a9dd-9d3aeebcafd9
114
+
115
+ Property | Value
116
+ ---------|-------
117
+ groupId | ec98d904-ac8c-49f0-99e1-c9c0e1a1e453
118
+ ```
119
+
120
+ </TabItem>
121
+ </Tabs>
@@ -0,0 +1,260 @@
1
+ import Global from '/docs/cmd/_global.mdx';
2
+ import Tabs from '@theme/Tabs';
3
+ import TabItem from '@theme/TabItem';
4
+
5
+ # search
6
+
7
+ Uses the Microsoft Search to query Microsoft 365 data
8
+
9
+ ## Usage
10
+
11
+ ```sh
12
+ m365 search [options]
13
+ ```
14
+
15
+ ## Options
16
+
17
+ ```md definition-list
18
+ `-q, --queryText [queryText]`
19
+ : Query to be executed in Keyword Query Language (KQL) format.
20
+
21
+ `-s, --scopes <scopes>`
22
+ : Comma-separated list of scopes for the search request. Allowed values are `chatMessage`, `message`, `event`, `drive`, `driveItem`, `list`, `listItem`, `site`, `bookmark`, `acronym`, or `person`.
23
+
24
+ `--startIndex [startIndex]`
25
+ : Set the number that indicates the 0-based starting point to list search results on the page. The default value is 0.
26
+
27
+ `--pageSize [pageSize]`
28
+ : Set the number that indicates the number of results to be returned for a page. The default is 25 results. The maximum is 500 results.
29
+
30
+ `--allResults`
31
+ : Set to get all search results from all pages.
32
+
33
+ `--resultsOnly`
34
+ : Set to get only the results form the query response.
35
+
36
+ `--enableTopResults`
37
+ : Use to get the first three messages in the response are sorted by relevance. Use this option only when scopes is set to message type.
38
+
39
+ `--select [select]`
40
+ : Comma-separated list of properties to return in the search results.
41
+
42
+ `--sortBy [sortBy]`
43
+ : Comma-separated list of properties to sort search results.
44
+
45
+ `--enableSpellingSuggestion`
46
+ : Set to get the suggested spelling correction information for typos in the user query.
47
+
48
+ `--enableSpellingModification`
49
+ : Set to get the search results for the corrected query when there are no results for the original query with typos, and get the corresponding correction information.
50
+ ```
51
+
52
+ <Global />
53
+
54
+ ## Remarks
55
+
56
+ The `queryText` option supports [Keyword Query Language](https://learn.microsoft.com/graph/api/resources/search-api-overview#keyword-query-language-kql-support) (KQL).
57
+
58
+ The `sortBy` option allows to specify the order. By default, the order is ascending. If you want to apply descending order, add `:desc` to the property name, like `createdDateTime:desc`.
59
+
60
+ ## Examples
61
+
62
+ Queries messages in the current user mailbox that contain the string "contoso" in any part of the message (the sender name, subject, message body, or any attachments). The query returns the first 100 results.
63
+
64
+ ```sh
65
+ m365 search --scopes 'message' --queryText 'contoso' --pageSize 100
66
+ ```
67
+
68
+ Queries list items and sites that contain the string "accountt" and requests a spelling modification for the query.
69
+
70
+ ```sh
71
+ m365 search --scopes 'listItem, site' --queryText 'accountt' --enableSpellingSuggestion --enableSpellingModification
72
+ ```
73
+
74
+ Search for file report.xlsl in specific folder of user personal OneDrive
75
+
76
+ ```sh
77
+ m365 search --scopes 'driveItem' --queryText 'filename:report.xlsl AND path:\"https://contoso-my.sharepoint.com/personal/john.doe_contoso_com/Documents/Reports/2024\"'
78
+ ```
79
+
80
+ Search for all sites
81
+
82
+ ```sh
83
+ m365 search --scopes 'site' --queryText 'site:\"https://contoso-my.sharepoint.com/personal/*\"'
84
+ ```
85
+
86
+ ## Response
87
+
88
+ ### Standard response
89
+
90
+ <Tabs>
91
+ <TabItem value="JSON">
92
+
93
+ ```json
94
+ {
95
+ "searchTerms": [
96
+ "openapi"
97
+ ],
98
+ "hitsContainers": [
99
+ {
100
+ "hits": [
101
+ {
102
+ "hitId": "012Q4A6LPNNYLDCVMEI2KCVAKTNBV5XVDC",
103
+ "rank": 1,
104
+ "summary": "<ddd/><c0>OpenAPI</c0> Specification v3.1.0 | Introduction, Definitions, & More https://spec.openapis.org<ddd/><c0>OpenAPI</c0> Specification v3.1.0 Version 3.1.0 Published 15 February 2021 Latest editor's <ddd/>",
105
+ "resource": {
106
+ "@odata.type": "#microsoft.graph.driveItem",
107
+ "size": 2980854,
108
+ "fileSystemInfo": {
109
+ "createdDateTime": "2023-11-18T20:26:55Z",
110
+ "lastModifiedDateTime": "2023-11-18T10:10:10Z"
111
+ },
112
+ "listItem": {
113
+ "@odata.type": "#microsoft.graph.listItem",
114
+ "fields": {},
115
+ "id": "5a85c2cd-4b8c-487b-8d01-5368795edf50"
116
+ },
117
+ "id": "012Q4A6LPNNYLDCVMEI2KCVAKTNBV5XVDC",
118
+ "createdBy": {
119
+ "user": {
120
+ "displayName": "John Doe",
121
+ "email": "john.doe@contoso.onmicrosoft.com"
122
+ }
123
+ },
124
+ "createdDateTime": "2023-11-18T20:26:55Z",
125
+ "lastModifiedBy": {
126
+ "user": {
127
+ "displayName": "John Doe",
128
+ "email": "john.doe@contoso.onmicrosoft.com"
129
+ }
130
+ },
131
+ "lastModifiedDateTime": "2023-11-18T10:10:10Z",
132
+ "name": "OpenAPI_spec.pdf",
133
+ "parentReference": {
134
+ "driveId": "b!j_Me8ql9502cTAMB_abcdefabcdefabcdefabcdefMPe9GMre9LSYBTqeitDmsf9gu",
135
+ "id": "01LDCVMA6EMNPM3RRBTVFLSNVCPEJCKWQL",
136
+ "sharepointIds": {
137
+ "listId": "abc52111-d6ab-ab12-cd34-de85ab63ab41",
138
+ "listItemId": "5",
139
+ "listItemUniqueId": "5a85c2cd-4b8c-487b-8d01-5368795edf50"
140
+ },
141
+ "siteId": "contoso.sharepoint.com,f21ef38f-4de7-7da9-0301-9c4cfe485e53,574a2bbe-e791-75cc-1234-5a0b4cbd3def"
142
+ },
143
+ "webUrl": "https://contoso.sharepoint.com/sites/knowledgebase/Shared Documents/OpenAPI_spec.pdf"
144
+ }
145
+ }
146
+ ],
147
+ "total": 1,
148
+ "moreResultsAvailable": false
149
+ }
150
+ ]
151
+ }
152
+ ```
153
+
154
+ </TabItem>
155
+ <TabItem value="Text">
156
+
157
+ ```text
158
+ hitsContainers: [{"hits":[{"hitId":"012Q4A6LPNNYLDCVMEI2KCVAKTNBV5XVDC","rank":1,"summary":"<ddd/><c0>OpenAPI</c0> Specification v3.1.0 | Introduction, Definitions, & More https://spec.openapis.org<ddd/><c0>OpenAPI</c0> Specification v3.1.0 Version 3.1.0 Published 15 February 2021 Latest editor's <ddd/>","resource":{"@odata.type":"#microsoft.graph.driveItem","size":2980854,"fileSystemInfo":{"createdDateTime":"2023-11-18T20:26:55Z","lastModifiedDateTime":"2023-11-18T10:10:10Z"},"listItem":{"@odata.type":"#microsoft.graph.listItem","fields":{},"id":"5a85c2cd-4b8c-487b-8d01-5368795edf50"},"id":"012Q4A6LPNNYLDCVMEI2KCVAKTNBV5XVDC","createdBy":{"user":{"displayName":"John Doe","email":"john.doe@contoso.onmicrosoft.com"}},"createdDateTime":"2023-11-18T20:26:55Z","lastModifiedBy":{"user":{"displayName":"John Doe","email":"john.doe@contoso.onmicrosoft.com"}},"lastModifiedDateTime":"2023-11-18T10:10:10Z","name":"OpenAPI_spec.pdf","parentReference":{"driveId":"b!j_Me8ql9502cTAMB_abcdefabcdefabcdefabcdefMPe9GMre9LSYBTqeitDmsf9gu","id":"01LDCVMA6EMNPM3RRBTVFLSNVCPEJCKWQL","sharepointIds":{"listId":"abc52111-d6ab-ab12-cd34-de85ab63ab41","listItemId":"5","listItemUniqueId":"5a85c2cd-4b8c-487b-8d01-5368795edf50"},"siteId":"contoso.sharepoint.com,f21ef38f-4de7-7da9-0301-9c4cfe485e53,574a2bbe-e791-75cc-1234-5a0b4cbd3def"},"webUrl":"https://contoso.sharepoint.com/sites/knowledgebase/Shared Documents/OpenAPI_spec.pdf"}}],"total":1,"moreResultsAvailable":false}]
159
+ searchTerms : ["openapi"]
160
+ ```
161
+
162
+ </TabItem>
163
+ </Tabs>
164
+
165
+ ### With `resultsOnly` response
166
+
167
+ When we make use of the option `resultsOnly` the response will differ.
168
+
169
+ <Tabs>
170
+ <TabItem value="JSON">
171
+
172
+ ```json
173
+ [
174
+ {
175
+ "hitId": "012Q4A6LPNNYLDCVMEI2KCVAKTNBV5XVDC",
176
+ "rank": 1,
177
+ "summary": "<ddd/><c0>OpenAPI</c0> Specification v3.1.0 | Introduction, Definitions, & More https://spec.openapis.org<ddd/><c0>OpenAPI</c0> Specification v3.1.0 Version 3.1.0 Published 15 February 2021 Latest editor's <ddd/>",
178
+ "resource": {
179
+ "@odata.type": "#microsoft.graph.driveItem",
180
+ "size": 2980854,
181
+ "fileSystemInfo": {
182
+ "createdDateTime": "2023-11-18T20:26:55Z",
183
+ "lastModifiedDateTime": "2023-11-18T10:10:10Z"
184
+ },
185
+ "listItem": {
186
+ "@odata.type": "#microsoft.graph.listItem",
187
+ "fields": {},
188
+ "id": "5a85c2cd-4b8c-487b-8d01-5368795edf50"
189
+ },
190
+ "id": "012Q4A6LPNNYLDCVMEI2KCVAKTNBV5XVDC",
191
+ "createdBy": {
192
+ "user": {
193
+ "displayName": "John Doe",
194
+ "email": "john.doe@contoso.onmicrosoft.com"
195
+ }
196
+ },
197
+ "createdDateTime": "2023-11-18T20:26:55Z",
198
+ "lastModifiedBy": {
199
+ "user": {
200
+ "displayName": "John Doe",
201
+ "email": "john.doe@contoso.onmicrosoft.com"
202
+ }
203
+ },
204
+ "lastModifiedDateTime": "2023-11-18T10:10:10Z",
205
+ "name": "OpenAPI_spec.pdf",
206
+ "parentReference": {
207
+ "driveId": "b!j_Me8ql9502cTAMB_abcdefabcdefabcdefabcdefMPe9GMre9LSYBTqeitDmsf9gu",
208
+ "id": "01LDCVMA6EMNPM3RRBTVFLSNVCPEJCKWQL",
209
+ "sharepointIds": {
210
+ "listId": "abc52111-d6ab-ab12-cd34-de85ab63ab41",
211
+ "listItemId": "5",
212
+ "listItemUniqueId": "5a85c2cd-4b8c-487b-8d01-5368795edf50"
213
+ },
214
+ "siteId": "contoso.sharepoint.com,f21ef38f-4de7-7da9-0301-9c4cfe485e53,574a2bbe-e791-75cc-1234-5a0b4cbd3def"
215
+ },
216
+ "webUrl": "https://contoso.sharepoint.com/sites/knowledgebase/Shared Documents/OpenAPI_spec.pdf"
217
+ }
218
+ }
219
+ ]
220
+ ```
221
+
222
+ </TabItem>
223
+ <TabItem value="Text">
224
+
225
+ ```text
226
+ hitId : 012Q4A6LPNNYLDCVMEI2KCVAKTNBV5XVDC
227
+ rank : 1
228
+ resource: {"@odata.type":"#microsoft.graph.driveItem","size":2980854,"fileSystemInfo":{"createdDateTime":"2023-11-18T20:26:55Z","lastModifiedDateTime":"2023-11-18T10:10:10Z"},"listItem":{"@odata.type":"#microsoft.graph.listItem","fields":{},"id":"5a85c2cd-4b8c-487b-8d01-5368795edf50"},"id":"012Q4A6LPNNYLDCVMEI2KCVAKTNBV5XVDC","createdBy":{"user":{"displayName":"John Doe","email":"john.doe@contoso.onmicrosoft.com"}},"createdDateTime":"2023-11-18T20:26:55Z","lastModifiedBy":{"user":{"displayName":"John Doe","email":"john.doe@contoso.onmicrosoft.com"}},"lastModifiedDateTime":"2023-11-18T10:10:10Z","name":"OpenAPI_spec.pdf","parentReference":{"driveId":"b!j_Me8ql9502cTAMB_abcdefabcdefabcdefabcdefMPe9GMre9LSYBTqeitDmsf9gu","id":"01LDCVMA6EMNPM3RRBTVFLSNVCPEJCKWQL","sharepointIds":{"listId":"abc52111-d6ab-ab12-cd34-de85ab63ab41","listItemId":"5","listItemUniqueId":"5a85c2cd-4b8c-487b-8d01-5368795edf50"},"siteId":"contoso.sharepoint.com,f21ef38f-4de7-7da9-0301-9c4cfe485e53,574a2bbe-e791-75cc-1234-5a0b4cbd3def"},"webUrl":"https://contoso.sharepoint.com/sites/knowledgebase/Shared Documents/OpenAPI_spec.pdf"}
229
+ summary : <ddd/><c0>OpenAPI</c0> Specification v3.1.0 | Introduction, Definitions, & More https://spec.openapis.org<ddd/><c0>OpenAPI</c0> Specification v3.1.0 Version 3.1.0 Published 15 February 2021 Latest editor's <ddd/>
230
+ ```
231
+
232
+ </TabItem>
233
+ <TabItem value="CSV">
234
+
235
+ ```md
236
+ hitId,rank,summary
237
+ 012Q4A6LPNNYLDCVMEI2KCVAKTNBV5XVDC,1,"<ddd/><c0>OpenAPI</c0> Specification v3.1.0 | Introduction, Definitions, & More https://spec.openapis.org<ddd/><c0>OpenAPI</c0> Specification v3.1.0 Version 3.1.0 Published 15 February 2021 Latest editor's <ddd/>"
238
+ ```
239
+
240
+ </TabItem>
241
+ <TabItem value="Markdown">
242
+
243
+ ```md
244
+ # search --scopes "driveItem" --queryString "OpenAPI" --resultsOnly "true"
245
+
246
+ Date: 3/3/2024
247
+
248
+ Property | Value
249
+ ---------|-------
250
+ hitId | 012Q4A6LPNNYLDCVMEI2KCVAKTNBV5XVDC
251
+ rank | 1
252
+ summary | <ddd/><c0>OpenAPI</c0> Specification v3.1.0 \| Introduction, Definitions, & More https://spec.openapis.org<ddd/><c0>OpenAPI</c0> Specification v3.1.0 Version 3.1.0 Published 15 February 2021 Latest editor's <ddd/>
253
+ ```
254
+
255
+ </TabItem>
256
+ </Tabs>
257
+
258
+ ## More information
259
+
260
+ - Use the Microsoft Search API to query data: https://learn.microsoft.com/graph/api/resources/search-api-overview
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@pnp/cli-microsoft365",
3
- "version": "7.8.1",
3
+ "version": "7.9.0",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@pnp/cli-microsoft365",
9
- "version": "7.8.1",
9
+ "version": "7.9.0",
10
10
  "license": "MIT",
11
11
  "dependencies": {
12
12
  "@azure/msal-common": "^14.10.0",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pnp/cli-microsoft365",
3
- "version": "7.8.1",
3
+ "version": "7.9.0-beta.884c943",
4
4
  "description": "Manage Microsoft 365 and SharePoint Framework projects on any platform",
5
5
  "license": "MIT",
6
6
  "main": "./dist/api.js",
@@ -108,6 +108,11 @@
108
108
  "name": "Milan Holemans",
109
109
  "email": "11723921+milanholemans@users.noreply.github.com",
110
110
  "web": "https://github.com/milanholemans"
111
+ },
112
+ {
113
+ "name": "Mathijs Verbeeck",
114
+ "email": "verbeeckmathijs@gmail.com",
115
+ "web": "https://github.com/MathijsVerbeeck"
111
116
  }
112
117
  ],
113
118
  "contributors": [
@@ -302,4 +307,4 @@
302
307
  "sinon": "^17.0.2",
303
308
  "source-map-support": "^0.5.21"
304
309
  }
305
- }
310
+ }