@pnp/cli-microsoft365 7.3.0-beta.d293309 → 7.3.0

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 (36) hide show
  1. package/allCommands.json +1 -1
  2. package/allCommandsFull.json +1 -1
  3. package/dist/Auth.js +3 -0
  4. package/dist/m365/aad/commands/administrativeunit/administrativeunit-member-add.js +137 -0
  5. package/dist/m365/aad/commands/administrativeunit/administrativeunit-member-get.js +112 -0
  6. package/dist/m365/aad/commands/app/app-permission-add.js +237 -0
  7. package/dist/m365/aad/commands.js +4 -1
  8. package/dist/m365/base/PowerAutomateCommand.js +18 -0
  9. package/dist/m365/external/commands/connection/connection-schema-add.js +36 -3
  10. package/dist/m365/flow/commands/environment/environment-get.js +3 -3
  11. package/dist/m365/flow/commands/environment/environment-list.js +3 -3
  12. package/dist/m365/flow/commands/flow-disable.js +3 -3
  13. package/dist/m365/flow/commands/flow-enable.js +3 -3
  14. package/dist/m365/flow/commands/flow-get.js +3 -3
  15. package/dist/m365/flow/commands/flow-list.js +14 -12
  16. package/dist/m365/flow/commands/flow-remove.js +3 -3
  17. package/dist/m365/flow/commands/owner/owner-ensure.js +3 -3
  18. package/dist/m365/flow/commands/owner/owner-list.js +3 -3
  19. package/dist/m365/flow/commands/owner/owner-remove.js +3 -3
  20. package/dist/m365/flow/commands/run/run-cancel.js +3 -3
  21. package/dist/m365/flow/commands/run/run-get.js +3 -3
  22. package/dist/m365/flow/commands/run/run-list.js +8 -7
  23. package/dist/m365/flow/commands/run/run-resubmit.js +4 -4
  24. package/dist/m365/spo/commands/listitem/listitem-batch-add.js +18 -7
  25. package/dist/m365/spo/commands/page/page-add.js +7 -28
  26. package/dist/m365/teams/commands/user/user-app-add.js +23 -5
  27. package/dist/utils/aadAdministrativeUnit.js +4 -4
  28. package/dist/utils/aadDevice.js +25 -0
  29. package/docs/docs/cmd/aad/administrativeunit/administrativeunit-member-add.mdx +93 -0
  30. package/docs/docs/cmd/aad/administrativeunit/administrativeunit-member-get.mdx +130 -0
  31. package/docs/docs/cmd/aad/app/app-permission-add.mdx +62 -0
  32. package/docs/docs/cmd/external/connection/connection-schema-add.mdx +14 -1
  33. package/docs/docs/cmd/spo/listitem/listitem-batch-add.mdx +25 -3
  34. package/docs/docs/cmd/teams/user/user-app-add.mdx +12 -3
  35. package/docs/docs/cmd/teams/user/user-app-remove.mdx +2 -2
  36. package/package.json +2 -2
@@ -0,0 +1,93 @@
1
+ import Global from '/docs/cmd/_global.mdx';
2
+ import Tabs from '@theme/Tabs';
3
+ import TabItem from '@theme/TabItem';
4
+
5
+ # aad administrativeunit member add
6
+
7
+ Add a member (user, group, or device) to an administrative unit
8
+
9
+ ## Usage
10
+
11
+ ```sh
12
+ m365 aad administrativeunit member add [options]
13
+ ```
14
+
15
+ ## Options
16
+
17
+ ```md definition-list
18
+ `-i, --administrativeUnitId [administrativeUnitId]`
19
+ : The id of the administrative unit. Specify either `administrativeUnitId` or `administrativeUnitName` but not both.
20
+
21
+ `-n, --administrativeUnitName [administrativeUnitName]`
22
+ : The name of the administrative unit. Specify either `administrativeUnitId` or `administrativeUnitName` but not both.
23
+
24
+ `--userId [userId]`
25
+ : The id of the user to be added. Specify `userId`, `userName`, `groupId`, `groupName`, `deviceId` or `deviceName`.
26
+
27
+ `--userName [userName]`
28
+ : The user principal name (UPN) of the user to be added. Specify `userId`, `userName`, `groupId`, `groupName`, `deviceId` or `deviceName`.
29
+
30
+ `--groupId [groupId]`
31
+ : The id of the group to be added. Specify `userId`, `userName`, `groupId`, `groupName`, `deviceId` or `deviceName`.
32
+
33
+ `--groupName [groupName]`
34
+ : The name of the group to be added. Specify `userId`, `userName`, `groupId`, `groupName`, `deviceId` or `deviceName`.
35
+
36
+ `--deviceId [deviceId]`
37
+ : The id of the device to be added. Specify `userId`, `userName`, `groupId`, `groupName`, `deviceId` or `deviceName`.
38
+
39
+ `--deviceName [deviceName]`
40
+ : The name of the device to be added. Specify `userId`, `userName`, `groupId`, `groupName`, `deviceId` or `deviceName`.
41
+ ```
42
+
43
+ <Global />
44
+
45
+ ## Remarks
46
+
47
+ :::info
48
+
49
+ To use this command you must be either **Global Administrator** or **Privileged Role Administrator**.
50
+
51
+ :::
52
+
53
+ ## Examples
54
+
55
+ Add a single user specified by id to an administrative unit specified by id
56
+
57
+ ```sh
58
+ m365 aad administrativeunit member add --administrativeUnitId 03c4c9dc-6f0c-4c4f-a4e6-0c9ed80f54c7 --userId 1caf7dcd-7e83-4c3a-94f7-932a1299c844
59
+ ```
60
+
61
+ Add a single user specified by user principal name to an administrative unit specified by name
62
+
63
+ ```sh
64
+ m365 aad administrativeunit member add --administrativeUnitName 'Marketing Division' --userName john.doe@contoso.com
65
+ ```
66
+
67
+ Add a single group specified by id to an administrative unit specified by id
68
+
69
+ ```sh
70
+ m365 aad administrativeunit member add --administrativeUnitId 03c4c9dc-6f0c-4c4f-a4e6-0c9ed80f54c7 --groupId b2307a39-e878-458b-bc90-03bc578531d6
71
+ ```
72
+
73
+ Add a single group specified by name to an administrative unit specified by name
74
+
75
+ ```sh
76
+ m365 aad administrativeunit member add --administrativeUnitName 'Marketing Division' --groupName 'Marketing Group'
77
+ ```
78
+
79
+ Add a single device specified by id to an administrative unit specified by id
80
+
81
+ ```sh
82
+ m365 aad administrativeunit member add --administrativeUnitId 03c4c9dc-6f0c-4c4f-a4e6-0c9ed80f54c7 --deviceId 810c84a8-4a9e-49e6-bf7d-12d183f40d01
83
+ ```
84
+
85
+ Add a single device specified by name to an administrative unit specified by name
86
+
87
+ ```sh
88
+ m365 aad administrativeunit member add --administrativeUnitName 'Marketing Division' --deviceName 'JohnDoe-PC'
89
+ ```
90
+
91
+ ## More information
92
+
93
+ - Administrative units: https://learn.microsoft.com/entra/identity/role-based-access-control/administrative-units
@@ -0,0 +1,130 @@
1
+ import Global from '/docs/cmd/_global.mdx';
2
+ import Tabs from '@theme/Tabs';
3
+ import TabItem from '@theme/TabItem';
4
+
5
+ # aad administrativeunit member get
6
+
7
+ Retrieves info about a specific member of an administrative unit
8
+
9
+ ## Usage
10
+
11
+ ```sh
12
+ m365 aad administrativeunit member get [options]
13
+ ```
14
+
15
+ ## Options
16
+
17
+ ```md definition-list
18
+ `-i, --id <id>`
19
+ : The id of a member to be retrieved.
20
+
21
+ `-u, --administrativeUnitId [administrativeUnitId]`
22
+ : The id of the administrative unit. Specify either `administrativeUnitId` or `administrativeUnitName`.
23
+
24
+ `-n, --administrativeUnitName [administrativeUnitName]`
25
+ : The name of the administrative unit. Specify either `administrativeUnitId` or `administrativeUnitName`.
26
+
27
+ `-p, --properties [properties]`
28
+ : Comma-separated list of properties to retrieve.
29
+ ```
30
+
31
+ <Global />
32
+
33
+ ## Remarks
34
+
35
+ To get the member of a hidden membership in an administrative unit, the `Member.Read.Hidden` permission is required.
36
+
37
+ When the `properties` option includes values with a `/`, for example: `manager/displayName`, an additional `$expand` query parameter will be included on manager.
38
+
39
+ ## Examples
40
+
41
+ Get information about a member specified by id from an administrative unit specified by id
42
+
43
+ ```sh
44
+ m365 aad administrativeunit member get --id 64131a70-beb9-4ccb-b590-4401e58446ec --administrativeUnitId 03c4c9dc-6f0c-4c4f-a4e6-0c9ed80f54c7
45
+ ```
46
+
47
+ Get information about a member specified by id from an administrative unit specified by name
48
+
49
+ ```sh
50
+ m365 aad administrativeunit member get --id 64131a70-beb9-4ccb-b590-4401e58446ec --administrativeUnitName 'Marketing Division'
51
+ ```
52
+
53
+ ## Response
54
+
55
+ <Tabs>
56
+ <TabItem value="JSON">
57
+
58
+ ```json
59
+ {
60
+ "id": "64131a70-beb9-4ccb-b590-4401e58446ec",
61
+ "businessPhones": [
62
+ "+20 255501070"
63
+ ],
64
+ "displayName": "Pradeep Gupta",
65
+ "givenName": "Pradeep",
66
+ "jobTitle": "Accountant",
67
+ "mail": "PradeepG@contoso.com",
68
+ "mobilePhone": null,
69
+ "officeLocation": "98/2202",
70
+ "preferredLanguage": "en-US",
71
+ "surname": "Gupta",
72
+ "userPrincipalName": "PradeepG@contoso.com",
73
+ "type": "user"
74
+ }
75
+ ```
76
+
77
+ </TabItem>
78
+ <TabItem value="Text">
79
+
80
+ ```text
81
+ businessPhones : ["+20 255501070"]
82
+ displayName : Pradeep Gupta
83
+ givenName : Pradeep
84
+ id : 64131a70-beb9-4ccb-b590-4401e58446ec
85
+ jobTitle : Accountant
86
+ mail : PradeepG@contoso.com
87
+ mobilePhone : null
88
+ officeLocation : 98/2202
89
+ preferredLanguage: en-US
90
+ surname : Gupta
91
+ type : user
92
+ userPrincipalName: PradeepG@contoso.com
93
+ ```
94
+
95
+ </TabItem>
96
+ <TabItem value="CSV">
97
+
98
+ ```csv
99
+ id,displayName,givenName,jobTitle,mail,officeLocation,preferredLanguage,surname,userPrincipalName,type
100
+ 64131a70-beb9-4ccb-b590-4401e58446ec,Pradeep Gupta,Pradeep,Accountant,PradeepG@contoso.com,98/2202,en-US,Gupta,PradeepG@contoso.com,user
101
+ ```
102
+
103
+ </TabItem>
104
+ <TabItem value="Markdown">
105
+
106
+ ```md
107
+ Date: 11/10/2023
108
+
109
+ ## Pradeep Gupta (64131a70-beb9-4ccb-b590-4401e58446ec)
110
+
111
+ Property | Value
112
+ ---------|-------
113
+ id | 64131a70-beb9-4ccb-b590-4401e58446ec
114
+ displayName | Pradeep Gupta
115
+ givenName | Pradeep
116
+ jobTitle | Accountant
117
+ mail | PradeepG@contoso.com
118
+ officeLocation | 98/2202
119
+ preferredLanguage | en-US
120
+ surname | Gupta
121
+ userPrincipalName | PradeepG@contoso.com
122
+ type | user
123
+ ```
124
+
125
+ </TabItem>
126
+ </Tabs>
127
+
128
+ ## More information
129
+
130
+ - Administrative units: https://learn.microsoft.com/entra/identity/role-based-access-control/administrative-units
@@ -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
+ # aad app permission add
6
+
7
+ Adds the specified application and/or delegated permissions to a specified Entra ID (Azure AD) app
8
+
9
+ ## Usage
10
+
11
+ ```sh
12
+ m365 aad app permission add [options]
13
+ ```
14
+
15
+ ## Options
16
+
17
+ ```md definition-list
18
+ `-i, --appId [appId]`
19
+ : Client ID of the Entra ID (Azure AD) app to add the API permissions to. Specify `appId` or `appObjectId` but not both.
20
+
21
+ `--appObjectId [appObjectId]`
22
+ : Object ID of the Entra ID (Azure AD) app to add the API permissions to. Specify `appId` or `appObjectId` but not both.
23
+
24
+ `-a, --applicationPermissions [applicationPermissions]`
25
+ : Space-separated list of application permissions to add. Specify at least `applicationPermissions` or `delegatedPermissions`.
26
+
27
+ `-d, --delegatedPermissions [delegatedPermissions]`
28
+ : Space-separated list of delegated permissions to add. Specify at least `applicationPermissions` or `delegatedPermissions`.
29
+
30
+ `--grantAdminConsent`
31
+ : When specified, grants application & delegated permissions through admin consent.
32
+ ```
33
+
34
+ <Global />
35
+
36
+ ## Remarks
37
+
38
+ Scopes/Roles to grant must be fully-qualified so that we can disambiguate them between the different resources.
39
+
40
+ ## Examples
41
+
42
+ Grant multiple delegated API permissions to an Entra ID (Azure AD) app specified by client id
43
+
44
+ ```sh
45
+ m365 aad app permission add --appId 'f1417aa3-bf0b-4cc5-a845-a0b2cf11f690' --delegatedPermissions 'https://management.azure.com/user_impersonation https://service.flow.microsoft.com/Flows.Read.All https://graph.microsoft.com/Agreement.Read.All'
46
+ ```
47
+
48
+ Grant multiple delegated API permissions to an Entra ID (Azure AD) app specified by object id
49
+
50
+ ```sh
51
+ m365 aad app permission add --appObjectId 'e0306bb2-bf0b-4cc5-a845-a0b2cf11f690' --delegatedPermissions 'https://management.azure.com/user_impersonation https://service.flow.microsoft.com/Flows.Read.All https://graph.microsoft.com/Agreement.Read.All'
52
+ ```
53
+
54
+ Grant multiple app-only permissions to an Entra ID (Azure AD) app specified by client id and grant admin consent
55
+
56
+ ```sh
57
+ m365 aad app permission add --appId 'f1417aa3-bf0b-4cc5-a845-a0b2cf11f690' --applicationPermissions 'https://graph.microsoft.com/Sites.FullControl.All https://microsoft.sharepoint-df.com/Sites.FullControl.All' --grandAdminConsent
58
+ ```
59
+
60
+ ## Response
61
+
62
+ The command won't return a response on success.
@@ -24,6 +24,9 @@ m365 search externalconnection schema add
24
24
 
25
25
  `-s, --schema [schema]`
26
26
  : The schema object to be added.
27
+
28
+ `--wait`
29
+ : Wait for the schema to be added before completing the command.
27
30
  ```
28
31
 
29
32
  <Global />
@@ -36,6 +39,16 @@ Adds a new schema to a specific external connection.
36
39
  m365 external connection schema add --externalConnectionId 'CliConnectionId' --schema '{"baseType":"microsoft.graph.externalItem","properties":[{"name":"ticketTitle","type":"String","isSearchable":"true","isRetrievable":"true","labels":["title"]},{"name":"priority","type":"String","isQueryable":"true","isRetrievable":"true","isSearchable":"false"},{"name":"assignee","type":"String","isRetrievable":"true"}]}'
37
40
  ```
38
41
 
42
+ Adds a new schema to a specific external connection and wait for its provisioning to complete.
43
+
44
+ ```sh
45
+ m365 external connection schema add --externalConnectionId 'CliConnectionId' --schema '{"baseType":"microsoft.graph.externalItem","properties":[{"name":"ticketTitle","type":"String","isSearchable":"true","isRetrievable":"true","labels":["title"]},{"name":"priority","type":"String","isQueryable":"true","isRetrievable":"true","isSearchable":"false"},{"name":"assignee","type":"String","isRetrievable":"true"}]}' --wait
46
+ ```
47
+
39
48
  ## Response
40
49
 
41
- The command won't return a response on success.
50
+ Upon executing the command, you'll receive the job status URL. This URL enables manual checking of the job's progress if automated polling fails or for interactive monitoring purposes.
51
+
52
+ ```text
53
+ "https://graph.microsoft.com/v1.0/external/connections/MyApp/operations/795b6888-4093-0fe7-6270-ddbcac9ebd3a"
54
+ ```
@@ -13,12 +13,15 @@ m365 spo listitem batch add [options]
13
13
  ## Options
14
14
 
15
15
  ```md definition-list
16
- `-p, --filePath <filePath>`
17
- : The absolute or relative path to a flat file containing the list items.
18
-
19
16
  `-u, --webUrl <webUrl>`
20
17
  : URL of the site.
21
18
 
19
+ `-p, --filePath [filePath]`
20
+ : The absolute or relative path to a flat file containing the list items. Specify `filePath` or `csvContent`, but not both.
21
+
22
+ `-c, --csvContent [csvContent]`
23
+ : A string content in CSV-format containing the list items. Specify `filePath` or `csvContent`, but not both.
24
+
22
25
  `-l, --listId [listId]`
23
26
  : ID of the list. Specify either `listTitle`, `listId` or `listUrl`, but not multiple.
24
27
 
@@ -54,6 +57,25 @@ Add a batch of items to a list retrieved by title in a specific site
54
57
  m365 spo listitem batch add --filePath "C:\Path\To\Csv\CsvFile.csv" --webUrl https://contoso.sharepoint.com/sites/project-x --listTitle "Demo List"
55
58
  ```
56
59
 
60
+ Add a batch of items to a list retrieved by title in a specific site using csv content
61
+
62
+ ```sh
63
+ $obj = @(
64
+ [PSCustomObject]@{
65
+ Title = "Item A"
66
+ Age = 10
67
+ },
68
+ [PSCustomObject]@{
69
+ Title = "Item B"
70
+ Age = 20
71
+ }
72
+ )
73
+
74
+ $csvContent = $obj | ConvertTo-Csv -NoTypeInformation -Delimiter "," | Out-String | ForEach-Object { $_.Replace('"','\"') }
75
+
76
+ m365 spo listitem batch add --csvContent $csvContent --webUrl https://contoso.sharepoint.com/sites/project-x --listTitle "Demo List"
77
+ ```
78
+
57
79
  Add a batch of items to a list retrieved by Id in a specific site
58
80
 
59
81
  ```sh
@@ -16,8 +16,11 @@ m365 teams user app add [options]
16
16
  `--id <id>`
17
17
  : The ID of the app to install.
18
18
 
19
- `--userId <userId>`
20
- : The ID of the user to install the app for.
19
+ `--userId [userId]`
20
+ : The ID of the user to install the app for. Specify either `userId` or `userName` but not both.
21
+
22
+ `--userName [userName]`
23
+ : The UPN of the user to install the app for. Specify either `userId` or `userName` but not both.
21
24
  ```
22
25
 
23
26
  <Global />
@@ -28,12 +31,18 @@ The `id` has to be the ID of the app from the Microsoft Teams App Catalog. Do no
28
31
 
29
32
  ## Examples
30
33
 
31
- Install an app from the catalog for the specified user.
34
+ Install an app from the catalog for the specified user by id.
32
35
 
33
36
  ```sh
34
37
  m365 teams user app add --id 4440558e-8c73-4597-abc7-3644a64c4bce --userId 2609af39-7775-4f94-a3dc-0dd67657e900
35
38
  ```
36
39
 
40
+ Install an app from the catalog for the specified user by name.
41
+
42
+ ```sh
43
+ m365 teams user app add --id 4440558e-8c73-4597-abc7-3644a64c4bce --userName admin@contoso.com
44
+ ```
45
+
37
46
  ## Response
38
47
 
39
48
  The command won't return a response on success.
@@ -20,10 +20,10 @@ m365 teams user app remove [options]
20
20
  : Name of the app instance installed for the user. Specify either `id` or `name`.
21
21
 
22
22
  `--userId [userId]`
23
- : The ID of the user to uninstall the app for. Specify `userId` or `userName` but not both.
23
+ : The ID of the user to uninstall the app for. Specify either `userId` or `userName`.
24
24
 
25
25
  `--userName [userName]`
26
- : The UPN of the user to uninstall the app for. Specify `userId` or `userName` but not both.
26
+ : The UPN of the user to uninstall the app for. Specify either `userId` or `userName`.
27
27
 
28
28
  `-f, --force`
29
29
  : Confirm removal of app for user.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pnp/cli-microsoft365",
3
- "version": "7.3.0-beta.d293309",
3
+ "version": "7.3.0",
4
4
  "description": "Manage Microsoft 365 and SharePoint Framework projects on any platform",
5
5
  "license": "MIT",
6
6
  "main": "./dist/api.js",
@@ -301,4 +301,4 @@
301
301
  "sinon": "^17.0.0",
302
302
  "source-map-support": "^0.5.21"
303
303
  }
304
- }
304
+ }