@pnp/cli-microsoft365 11.0.0-beta.1f852eb → 11.0.0-beta.3143306

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 (159) hide show
  1. package/.devproxy/api-specs/sharepoint.yaml +54 -0
  2. package/.eslintrc.cjs +2 -0
  3. package/allCommands.json +1 -1
  4. package/allCommandsFull.json +1 -1
  5. package/dist/Command.js +4 -0
  6. package/dist/config.js +1 -0
  7. package/dist/m365/adaptivecard/commands/adaptivecard-send.js +1 -1
  8. package/dist/m365/entra/commands/administrativeunit/administrativeunit-add.js +13 -27
  9. package/dist/m365/entra/commands/administrativeunit/administrativeunit-get.js +18 -43
  10. package/dist/m365/entra/commands/administrativeunit/administrativeunit-list.js +10 -21
  11. package/dist/m365/entra/commands/administrativeunit/administrativeunit-remove.js +25 -49
  12. package/dist/m365/entra/commands/app/app-add.js +14 -2
  13. package/dist/m365/entra/commands/group/group-member-add.js +6 -27
  14. package/dist/m365/entra/commands/group/group-member-set.js +5 -26
  15. package/dist/m365/entra/commands/m365group/m365group-get.js +1 -7
  16. package/dist/m365/entra/commands/m365group/m365group-list.js +1 -7
  17. package/dist/m365/entra/commands/pim/pim-role-assignment-eligibility-list.js +1 -7
  18. package/dist/m365/entra/commands/pim/pim-role-assignment-list.js +1 -7
  19. package/dist/m365/entra/commands/pim/pim-role-request-list.js +1 -7
  20. package/dist/m365/entra/commands/roleassignment/roleassignment-add.js +146 -0
  21. package/dist/m365/entra/commands.js +1 -0
  22. package/dist/m365/flow/commands/environment/environment-get.js +19 -29
  23. package/dist/m365/flow/commands/flow-list.js +7 -14
  24. package/dist/m365/flow/commands/run/run-get.js +1 -7
  25. package/dist/m365/graph/commands/openextension/openextension-add.js +2 -2
  26. package/dist/m365/graph/commands/openextension/openextension-set.js +2 -6
  27. package/dist/m365/graph/commands/subscription/subscription-add.js +3 -10
  28. package/dist/m365/outlook/commands/mail/mail-searchfolder-add.js +85 -0
  29. package/dist/m365/outlook/commands.js +1 -0
  30. package/dist/m365/pa/commands/environment/environment-get.js +18 -23
  31. package/dist/m365/pp/commands/copilot/copilot-get.js +0 -4
  32. package/dist/m365/pp/commands/copilot/copilot-list.js +0 -4
  33. package/dist/m365/pp/commands/copilot/copilot-remove.js +0 -4
  34. package/dist/m365/pp/commands/environment/environment-get.js +19 -26
  35. package/dist/m365/pp/commands/solution/solution-publisher-list.js +1 -8
  36. package/dist/m365/pp/commands.js +0 -7
  37. package/dist/m365/purview/commands/threatassessment/threatassessment-get.js +1 -7
  38. package/dist/m365/spe/commands/container/container-add.js +1 -3
  39. package/dist/m365/spe/commands/container/container-list.js +1 -3
  40. package/dist/m365/spe/commands/container/container-recyclebinitem-list.js +1 -3
  41. package/dist/m365/spe/commands/container/container-recyclebinitem-restore.js +1 -3
  42. package/dist/m365/spe/commands/container/container-remove.js +1 -3
  43. package/dist/m365/spe/commands/containertype/containertype-add.js +67 -90
  44. package/dist/m365/spe/commands/containertype/containertype-get.js +53 -81
  45. package/dist/m365/spe/commands/containertype/containertype-list.js +8 -19
  46. package/dist/m365/spe/commands/containertype/containertype-remove.js +27 -5
  47. package/dist/m365/spfx/commands/project/project-upgrade.js +23 -66
  48. package/dist/m365/spo/commands/customaction/customaction-list.js +3 -10
  49. package/dist/m365/spo/commands/file/file-move.js +2 -8
  50. package/dist/m365/spo/commands/file/file-version-keep.js +78 -0
  51. package/dist/m365/spo/commands/homesite/homesite-add.js +26 -2
  52. package/dist/m365/spo/commands/homesite/homesite-get.js +28 -14
  53. package/dist/m365/spo/commands/homesite/homesite-list.js +1 -12
  54. package/dist/m365/spo/commands/homesite/homesite-remove.js +6 -34
  55. package/dist/m365/spo/commands/homesite/homesite-set.js +88 -44
  56. package/dist/m365/spo/commands/hubsite/hubsite-get.js +4 -13
  57. package/dist/m365/spo/commands/hubsite/hubsite-list.js +1 -8
  58. package/dist/m365/spo/commands/list/list-view-add.js +1 -1
  59. package/dist/m365/spo/commands/serviceprincipal/serviceprincipal-grant-list.js +17 -25
  60. package/dist/m365/spo/commands/{tenant/tenant-site-archive.js → site/site-archive.js} +14 -14
  61. package/dist/m365/spo/commands/{tenant/tenant-site-list.js → site/site-list.js} +16 -27
  62. package/dist/m365/spo/commands/{tenant/tenant-site-membership-list.js → site/site-membership-list.js} +15 -15
  63. package/dist/m365/spo/commands/{tenant/tenant-site-rename.js → site/site-rename.js} +14 -14
  64. package/dist/m365/spo/commands/{tenant/tenant-site-unarchive.js → site/site-unarchive.js} +14 -14
  65. package/dist/m365/spo/commands/term/term-list.js +1 -7
  66. package/dist/m365/spo/commands.js +5 -7
  67. package/dist/m365/teams/commands/chat/chat-member-add.js +3 -9
  68. package/dist/m365/teams/commands/report/report-directroutingcalls.js +5 -12
  69. package/dist/m365/teams/commands/report/report-pstncalls.js +5 -12
  70. package/dist/m365/viva/commands/engage/engage-network-list.js +1 -7
  71. package/dist/m365/viva/commands.js +0 -3
  72. package/dist/utils/entraAdministrativeUnit.js +1 -1
  73. package/dist/utils/entraApp.js +15 -0
  74. package/dist/utils/spe.js +5 -39
  75. package/docs/docs/cmd/entra/app/app-add.mdx +7 -1
  76. package/docs/docs/cmd/entra/group/group-member-add.mdx +7 -26
  77. package/docs/docs/cmd/entra/group/group-member-set.mdx +5 -23
  78. package/docs/docs/cmd/entra/m365group/m365group-get.mdx +0 -3
  79. package/docs/docs/cmd/entra/m365group/m365group-list.mdx +0 -3
  80. package/docs/docs/cmd/entra/pim/pim-role-assignment-eligibility-list.mdx +0 -3
  81. package/docs/docs/cmd/entra/pim/pim-role-assignment-list.mdx +0 -3
  82. package/docs/docs/cmd/entra/pim/pim-role-request-list.mdx +0 -3
  83. package/docs/docs/cmd/entra/roleassignment/roleassignment-add.mdx +163 -0
  84. package/docs/docs/cmd/flow/environment/environment-get.mdx +6 -5
  85. package/docs/docs/cmd/flow/flow-list.mdx +0 -3
  86. package/docs/docs/cmd/flow/run/run-get.mdx +0 -3
  87. package/docs/docs/cmd/graph/subscription/subscription-add.mdx +0 -3
  88. package/docs/docs/cmd/outlook/mail/mail-searchfolder-add.mdx +147 -0
  89. package/docs/docs/cmd/pa/environment/environment-get.mdx +5 -2
  90. package/docs/docs/cmd/pp/copilot/copilot-get.mdx +0 -6
  91. package/docs/docs/cmd/pp/copilot/copilot-list.mdx +0 -6
  92. package/docs/docs/cmd/pp/copilot/copilot-remove.mdx +0 -6
  93. package/docs/docs/cmd/pp/environment/environment-get.mdx +5 -2
  94. package/docs/docs/cmd/pp/solution/solution-publisher-list.mdx +0 -3
  95. package/docs/docs/cmd/purview/threatassessment/threatassessment-get.mdx +0 -3
  96. package/docs/docs/cmd/spe/container/container-activate.mdx +21 -0
  97. package/docs/docs/cmd/spe/container/container-add.mdx +29 -0
  98. package/docs/docs/cmd/spe/container/container-get.mdx +20 -1
  99. package/docs/docs/cmd/spe/container/container-list.mdx +29 -0
  100. package/docs/docs/cmd/spe/container/container-permission-list.mdx +19 -0
  101. package/docs/docs/cmd/spe/container/container-recyclebinitem-list.mdx +29 -0
  102. package/docs/docs/cmd/spe/container/container-recyclebinitem-restore.mdx +31 -0
  103. package/docs/docs/cmd/spe/container/container-remove.mdx +31 -0
  104. package/docs/docs/cmd/spe/containertype/containertype-add.mdx +111 -55
  105. package/docs/docs/cmd/spe/containertype/containertype-get.mdx +69 -38
  106. package/docs/docs/cmd/spe/containertype/containertype-list.mdx +59 -31
  107. package/docs/docs/cmd/spe/containertype/containertype-remove.mdx +31 -4
  108. package/docs/docs/cmd/spfx/project/project-upgrade.mdx +18 -5
  109. package/docs/docs/cmd/spo/file/file-move.mdx +0 -3
  110. package/docs/docs/cmd/spo/file/file-version-keep.mdx +68 -0
  111. package/docs/docs/cmd/spo/homesite/homesite-add.mdx +13 -4
  112. package/docs/docs/cmd/spo/homesite/homesite-get.mdx +44 -23
  113. package/docs/docs/cmd/spo/homesite/homesite-list.mdx +0 -6
  114. package/docs/docs/cmd/spo/homesite/homesite-remove.mdx +10 -35
  115. package/docs/docs/cmd/spo/homesite/homesite-set.mdx +84 -44
  116. package/docs/docs/cmd/spo/hubsite/hubsite-get.mdx +0 -3
  117. package/docs/docs/cmd/spo/hubsite/hubsite-list.mdx +0 -3
  118. package/docs/docs/cmd/spo/list/list-view-add.mdx +11 -11
  119. package/docs/docs/cmd/spo/serviceprincipal/serviceprincipal-grant-list.mdx +18 -18
  120. package/docs/docs/cmd/spo/{tenant/tenant-site-archive.mdx → site/site-archive.mdx} +4 -4
  121. package/docs/docs/cmd/spo/{tenant/tenant-site-list.mdx → site/site-list.mdx} +7 -16
  122. package/docs/docs/cmd/spo/{tenant/tenant-site-membership-list.mdx → site/site-membership-list.mdx} +5 -5
  123. package/docs/docs/cmd/spo/{tenant/tenant-site-rename.mdx → site/site-rename.mdx} +7 -7
  124. package/docs/docs/cmd/spo/{tenant/tenant-site-unarchive.mdx → site/site-unarchive.mdx} +4 -4
  125. package/docs/docs/cmd/spo/term/term-list.mdx +0 -3
  126. package/docs/docs/cmd/teams/chat/chat-member-add.mdx +2 -5
  127. package/docs/docs/cmd/teams/report/report-directroutingcalls.mdx +25 -44
  128. package/docs/docs/cmd/teams/report/report-pstncalls.mdx +25 -48
  129. package/docs/docs/cmd/viva/engage/engage-community-list.mdx +19 -0
  130. package/docs/docs/cmd/viva/engage/engage-community-user-add.mdx +19 -0
  131. package/docs/docs/cmd/viva/engage/engage-community-user-remove.mdx +19 -0
  132. package/docs/docs/cmd/viva/engage/engage-network-list.mdx +0 -3
  133. package/npm-shrinkwrap.json +51 -51
  134. package/package.json +12 -12
  135. package/dist/m365/pp/commands/card/card-clone.js +0 -101
  136. package/dist/m365/pp/commands/card/card-get.js +0 -89
  137. package/dist/m365/pp/commands/card/card-list.js +0 -55
  138. package/dist/m365/pp/commands/card/card-remove.js +0 -105
  139. package/dist/m365/skype/commands/report/report-activitycounts.js +0 -15
  140. package/dist/m365/skype/commands/report/report-activityusercounts.js +0 -15
  141. package/dist/m365/skype/commands/report/report-activityuserdetail.js +0 -15
  142. package/dist/m365/skype/commands.js +0 -7
  143. package/dist/m365/spo/commands/mail/mail-send.js +0 -108
  144. package/dist/m365/spo/commands/tenant/SPOTenantSitePropertiesEnumerable.js +0 -2
  145. package/dist/m365/spo/commands/tenant/TenantSiteProperties.js +0 -2
  146. package/dist/m365/viva/commands/engage/engage-group-list.js +0 -93
  147. package/dist/m365/viva/commands/engage/engage-group-user-add.js +0 -73
  148. package/dist/m365/viva/commands/engage/engage-group-user-remove.js +0 -88
  149. package/docs/docs/cmd/pp/card/card-clone.mdx +0 -103
  150. package/docs/docs/cmd/pp/card/card-get.mdx +0 -212
  151. package/docs/docs/cmd/pp/card/card-list.mdx +0 -163
  152. package/docs/docs/cmd/pp/card/card-remove.mdx +0 -86
  153. package/docs/docs/cmd/skype/report/report-activitycounts.mdx +0 -96
  154. package/docs/docs/cmd/skype/report/report-activityusercounts.mdx +0 -96
  155. package/docs/docs/cmd/skype/report/report-activityuserdetail.mdx +0 -134
  156. package/docs/docs/cmd/spo/mail/mail-send.mdx +0 -69
  157. package/docs/docs/cmd/viva/engage/engage-group-list.mdx +0 -174
  158. package/docs/docs/cmd/viva/engage/engage-group-user-add.mdx +0 -60
  159. package/docs/docs/cmd/viva/engage/engage-group-user-remove.mdx +0 -58
package/dist/utils/spe.js CHANGED
@@ -1,58 +1,24 @@
1
- import request from '../request.js';
2
1
  import { formatting } from './formatting.js';
3
2
  import { cli } from '../cli/cli.js';
4
- import config from '../config.js';
5
3
  import { odata } from './odata.js';
6
4
  const graphResource = 'https://graph.microsoft.com';
7
5
  export const spe = {
8
- /**
9
- * Get all container types.
10
- * @param spoAdminUrl The URL of the SharePoint Online admin center site (e.g. https://contoso-admin.sharepoint.com)
11
- * @returns Array of container types
12
- */
13
- async getAllContainerTypes(spoAdminUrl) {
14
- const requestOptions = {
15
- url: `${spoAdminUrl}/_vti_bin/client.svc/ProcessQuery`,
16
- headers: {
17
- accept: 'application/json;odata=nometadata'
18
- },
19
- responseType: 'json',
20
- data: `<Request AddExpandoFieldTypeSuffix="true" SchemaVersion="15.0.0.0" LibraryVersion="16.0.0.0" ApplicationName="${config.applicationName}" xmlns="http://schemas.microsoft.com/sharepoint/clientquery/2009"><Actions><ObjectPath Id="46" ObjectPathId="45" /><Method Name="GetSPOContainerTypes" Id="47" ObjectPathId="45"><Parameters><Parameter Type="Enum">1</Parameter></Parameters></Method></Actions><ObjectPaths><Constructor Id="45" TypeId="{268004ae-ef6b-4e9b-8425-127220d84719}" /></ObjectPaths></Request>`
21
- };
22
- const json = await request.post(requestOptions);
23
- const response = json[0];
24
- if (response.ErrorInfo) {
25
- throw new Error(response.ErrorInfo.ErrorMessage);
26
- }
27
- const containerTypes = json[json.length - 1];
28
- // Format the response to remove CSOM GUIDs and convert them to real GUIDs
29
- containerTypes.forEach(ct => {
30
- delete ct._ObjectType_;
31
- ct.AzureSubscriptionId = formatting.extractCsomGuid(ct.AzureSubscriptionId);
32
- ct.ContainerTypeId = formatting.extractCsomGuid(ct.ContainerTypeId);
33
- ct.OwningAppId = formatting.extractCsomGuid(ct.OwningAppId);
34
- ct.OwningTenantId = formatting.extractCsomGuid(ct.OwningTenantId);
35
- });
36
- return containerTypes;
37
- },
38
6
  /**
39
7
  * Get the ID of a container type by its name.
40
- * @param spoAdminUrl SharePoint Online admin center URL (e.g. https://contoso-admin.sharepoint.com)
41
8
  * @param name Name of the container type to search for
42
9
  * @returns ID of the container type
43
10
  */
44
- async getContainerTypeIdByName(spoAdminUrl, name) {
45
- const allContainerTypes = await this.getAllContainerTypes(spoAdminUrl);
46
- const containerTypes = allContainerTypes.filter(ct => ct.DisplayName.toLowerCase() === name.toLowerCase());
11
+ async getContainerTypeIdByName(name) {
12
+ const containerTypes = await odata.getAllItems(`${graphResource}/beta/storage/fileStorage/containerTypes?$select=id,name&$filter=name eq '${formatting.encodeQueryParameter(name)}'`);
47
13
  if (containerTypes.length === 0) {
48
14
  throw new Error(`The specified container type '${name}' does not exist.`);
49
15
  }
50
16
  if (containerTypes.length > 1) {
51
- const containerTypeKeyValuePair = formatting.convertArrayToHashTable('ContainerTypeId', containerTypes);
17
+ const containerTypeKeyValuePair = formatting.convertArrayToHashTable('id', containerTypes);
52
18
  const containerType = await cli.handleMultipleResultsFound(`Multiple container types with name '${name}' found.`, containerTypeKeyValuePair);
53
- return containerType.ContainerTypeId;
19
+ return containerType.id;
54
20
  }
55
- return containerTypes[0].ContainerTypeId;
21
+ return containerTypes[0].id;
56
22
  },
57
23
  /**
58
24
  * Get the ID of a container by its name.
@@ -31,7 +31,7 @@ m365 entra appregistration add [options]
31
31
  : Comma-separated list of redirect URIs. Requires `platform` to be specified.
32
32
 
33
33
  `-p, --platform [platform]`
34
- : Platform for which the `redirectUris` should be configured. Allowed values `spa`, `web`, `publicClient`. Requires `redirectUris` to be specified.
34
+ : Platform for which the app should be configured. Allowed values `spa`, `web`, `publicClient`, `apple`, `android`.
35
35
 
36
36
  `--implicitFlow`
37
37
  : Specify, to indicate that the authorization endpoint should return ID and access tokens.
@@ -75,6 +75,12 @@ m365 entra appregistration add [options]
75
75
  `--manifest [manifest]`
76
76
  : App manifest as retrieved from Entra ID to create the app registration from. Specify either `name` or `manifest` but not both.
77
77
 
78
+ `--bundleId [bundleId]`
79
+ : Specify a bundle Id to add the iOS / macOS or Android platform to the application. Required when platform is `apple` or `android`.
80
+
81
+ `--signatureHash [signatureHash]`
82
+ : A required hash when specifying a bundle Id and platform `android`.
83
+
78
84
  `--save`
79
85
  : Use to store the information about the created app in a local file.
80
86
 
@@ -14,28 +14,21 @@ m365 entra group member add [options]
14
14
 
15
15
  ```md definition-list
16
16
  `-i, --groupId [groupId]`
17
- : The ID of the Microsoft Entra group. Specify `groupId`, `groupDisplayName` or `groupName` but not multiple.
18
-
19
- `-n, --groupDisplayName [groupDisplayName]`
20
- : (deprecated. Use option `groupName` instead) The display name of the Microsoft Entra group. Specify `groupId`, `groupDisplayName` or `groupName` but not multiple.
21
-
22
- `--groupName [groupName]`
23
- : The display name of the Microsoft Entra group. Specify `groupId`, `groupDisplayName` or `groupName` but not multiple.
24
-
25
- `--ids [ids]`
26
- : (deprecated. Use option `userIds` instead) Microsoft Entra IDs of users. You can also pass a comma-separated list of IDs. Specify either `ids`, `userIds`,`userNames`, `subgroupIds`, or `subgroupNames` but not multiple.
17
+ : The ID of the Microsoft Entra group. Specify `groupId` or `groupName` but not both.
27
18
 
19
+ `-n, --groupName [groupName]`
20
+ : The display name of the Microsoft Entra group. Specify `groupId` or `groupName` but not both.
28
21
  `--userIds [userIds]`
29
- : Microsoft Entra IDs of users. You can also pass a comma-separated list of IDs. Specify either `ids`, `userIds`,`userNames`, `subgroupIds`, or `subgroupNames` but not multiple.
22
+ : Microsoft Entra IDs of users. You can also pass a comma-separated list of IDs. Specify either `userIds`,`userNames`, `subgroupIds`, or `subgroupNames` but not multiple.
30
23
 
31
24
  `--userNames [userNames]`
32
- : The user principal names of users. You can also pass a comma-separated list of UPNs. Specify either `ids`, `userIds`,`userNames`, `subgroupIds`, or `subgroupNames` but not multiple.
25
+ : The user principal names of users. You can also pass a comma-separated list of UPNs. Specify either `userIds`,`userNames`, `subgroupIds`, or `subgroupNames` but not multiple.
33
26
 
34
27
  `--subgroupIds [subgroupIds]`
35
- : Comma-separated list of Microsoft Entra group IDs to add. Specify either `ids`, `userIds`,`userNames`, `subgroupIds`, or `subgroupNames` but not multiple.
28
+ : Comma-separated list of Microsoft Entra group IDs to add. Specify either `userIds`,`userNames`, `subgroupIds`, or `subgroupNames` but not multiple.
36
29
 
37
30
  `--subgroupNames [subgroupNames]`
38
- : Comma-separated list of Microsoft Entra group titles to add. Specify either `ids`, `userIds`,`userNames`, `subgroupIds`, or `subgroupNames` but not multiple.
31
+ : Comma-separated list of Microsoft Entra group titles to add. Specify either `userIds`,`userNames`, `subgroupIds`, or `subgroupNames` but not multiple.
39
32
 
40
33
  `-r, --role <role>`
41
34
  : The role to be assigned to the new users. Valid values: `Owner`, `Member`.
@@ -45,12 +38,6 @@ m365 entra group member add [options]
45
38
 
46
39
  ## Examples
47
40
 
48
- Add a single member specified by ID as a member to a group specified by display name.
49
-
50
- ```sh
51
- m365 entra group member add --groupDisplayName Developers --userIds 098b9f52-f48c-4401-819f-29c33794c3f5 --role Member
52
- ```
53
-
54
41
  Add a single member specified by ID as a member to a group specified by group name.
55
42
 
56
43
  ```sh
@@ -63,12 +50,6 @@ Add multiple members specified by ID as members to a group specified by ID.
63
50
  m365 entra group member add --groupId a03c0c35-ef9a-419b-8cab-f89e0a8d2d2a --userIds "098b9f52-f48c-4401-819f-29c33794c3f5,f1e06e31-3abf-4746-83c2-1513d71f38b8" --role Member
64
51
  ```
65
52
 
66
- Add a single member specified by UPN as an owner to a group specified by display name.
67
-
68
- ```sh
69
- m365 entra group member add --groupDisplayName Developers --userNames john.doe@contoso.com --role Owner
70
- ```
71
-
72
53
  Add a single member specified by UPN as an owner to a group specified by group name.
73
54
 
74
55
  ```sh
@@ -14,22 +14,16 @@ m365 entra group member set [options]
14
14
 
15
15
  ```md definition-list
16
16
  `-i, --groupId [groupId]`
17
- : The ID of the Entra ID group. Specify `groupId`, `groupDisplayName` or `groupName` but not multiple.
17
+ : The ID of the Entra ID group. Specify `groupId`, or `groupName` but not both.
18
18
 
19
- `-n, --groupDisplayName [groupDisplayName]`
20
- : (deprecated. Use option `groupName` instead) The display name of the Entra ID group. Specify `groupId`, `groupDisplayName` or `groupName` but not multiple.
21
-
22
- `--groupName [groupName]`
23
- : The display name of the Microsoft Entra group. Specify `groupId`, `groupDisplayName` or `groupName` but not multiple.
24
-
25
- `--ids [ids]`
26
- : (deprecated. Use option `userIds` instead) Comma-separated list of user IDs. Specify either `ids`, `userIds` or `userNames` but not multiple.
19
+ `-n, --groupName [groupName]`
20
+ : The display name of the Microsoft Entra group. Specify `groupId`, `groupName` but not both.
27
21
 
28
22
  `--userIds [userIds]`
29
- : Comma-separated list of user IDs. Specify either `ids`, `userIds` or `userNames` but not multiple.
23
+ : Comma-separated list of user IDs. Specify either `userIds` or `userNames` but not multiple.
30
24
 
31
25
  `--userNames [userNames]`
32
- : The user principal names of users. You can also pass a comma-separated list of UPNs. Specify either `ids` or `userNames` but not both.
26
+ : The user principal names of users. You can also pass a comma-separated list of UPNs. Specify either `userIds` or `userNames` but not both.
33
27
 
34
28
  `-r, --role <role>`
35
29
  : The new role to be assigned to the members. Valid values: `Owner`, `Member`.
@@ -39,12 +33,6 @@ m365 entra group member set [options]
39
33
 
40
34
  ## Examples
41
35
 
42
- Update a single member specified by ID to a member of a group specified by display name
43
-
44
- ```sh
45
- m365 entra group member set --groupDisplayName Developers --userIds 098b9f52-f48c-4401-819f-29c33794c3f5 --role Member
46
- ```
47
-
48
36
  Update a single member specified by ID to a member of a group specified by group name
49
37
 
50
38
  ```sh
@@ -57,12 +45,6 @@ Update multiple members specified by ID to members of a group specified by ID
57
45
  m365 entra group member set --groupId a03c0c35-ef9a-419b-8cab-f89e0a8d2d2a --userIds "098b9f52-f48c-4401-819f-29c33794c3f5,f1e06e31-3abf-4746-83c2-1513d71f38b8" --role Member
58
46
  ```
59
47
 
60
- Update a single member specified by UPN to an owner of a group specified by display name
61
-
62
- ```sh
63
- m365 entra group member set --groupDisplayName Developers --userNames john.doe@contoso.com --role Owner
64
- ```
65
-
66
48
  Update a single member specified by UPN to an owner of a group specified by group name
67
49
 
68
50
  ```sh
@@ -21,9 +21,6 @@ m365 entra m365group get [options]
21
21
  `-n, --displayName [displayName]`
22
22
  : Display name of the Microsoft 365 Group or Microsoft Teams team to retrieve information for. Specify either `id` or `displayName`, but not both.
23
23
 
24
- `--includeSiteUrl`
25
- : (deprecated. Use option `withSiteUrl` instead) Set to retrieve the site URL for the group.
26
-
27
24
  `--withSiteUrl`
28
25
  : Set to retrieve the site URL for the group.
29
26
  ```
@@ -21,9 +21,6 @@ m365 entra m365group list [options]
21
21
  `-m, --mailNickname [displayName]`
22
22
  : Retrieve only groups with mailNickname starting with the specified value.
23
23
 
24
- `--includeSiteUrl`
25
- : (deprecated. Use option `withSiteUrl` instead) Set to retrieve the site URL for each group.
26
-
27
24
  `--withSiteUrl`
28
25
  : Set to retrieve the site URL for each group.
29
26
 
@@ -27,9 +27,6 @@ m365 entra pim role assignment eligibility list [options]
27
27
  `--groupName [groupName]`
28
28
  : Display name of the group for which to list eligible roles. Specify either `userId`, `userName`, `groupId` or `groupName`. If not specified, all eligible roles will be listed.
29
29
 
30
- `--includePrincipalDetails`
31
- : (deprecated. Use option `withPrincipalDetails` instead) An optional flag to include details of the principals that were eligible for a role.
32
-
33
30
  `--withPrincipalDetails`
34
31
  : An optional flag to include details of the principals that were eligible for a role.
35
32
  ```
@@ -30,9 +30,6 @@ m365 entra pim role assignment list [options]
30
30
  `-s, --startDateTime [startDateTime]`
31
31
  : An optional ISO 8601 formatted date filter to search from.
32
32
 
33
- `--includePrincipalDetails`
34
- : (deprecated. Use option `withPrincipalDetails` instead) An optional flag to include details of the principals that were assigned a role.
35
-
36
33
  `--withPrincipalDetails`
37
34
  : An optional flag to include details of the principals that were assigned a role.
38
35
  ```
@@ -33,9 +33,6 @@ m365 entra pim role request list [options]
33
33
  `-s, --status [status]`
34
34
  : An optional value to filter the list of requests. Allowed values are: `Canceled`, `Denied`, `Failed`, `Granted`, `PendingAdminDecision`, `PendingApproval`, `PendingProvisioning`, `PendingScheduleCreation`, `Provisioned`, `Revoked`, and `ScheduleCreated`.
35
35
 
36
- `--includePrincipalDetails`
37
- : (deprecated. Use option `withPrincipalDetails` instead) An optional flag to include details of the principals that were assigned a role.
38
-
39
36
  `--withPrincipalDetails`
40
37
  : An optional flag to include details of the principals that were assigned a role.
41
38
  ```
@@ -0,0 +1,163 @@
1
+ import Global from '/docs/cmd/_global.mdx';
2
+ import Tabs from '@theme/Tabs';
3
+ import TabItem from '@theme/TabItem';
4
+
5
+ # entra roleassignment add
6
+
7
+ Assign a Entra ID role to a user and specify the scope for which the user has been granted access
8
+
9
+ ## Usage
10
+
11
+ ```sh
12
+ m365 entra roleassignment add [options]
13
+ ```
14
+
15
+ ## Options
16
+
17
+ ```md definition-list
18
+ `--roleDefinitionId [roleDefinitionId]`
19
+ : Id of a role to be assigned. Specify either `roleDefinitionId` or `roleDefinitionName`, but not both.
20
+
21
+ `--roleDefinitionName [roleDefinitionName]`
22
+ : Name of a role to be assigned. Specify either `roleDefinitionId` or `roleDefinitionName`, but not both.
23
+
24
+ `--principal <principal>`
25
+ : Id of a user, group or service principal or user principal name or group mail nickname to which the assignment is granted.
26
+
27
+ `--userId [userId]`
28
+ : Id of a user to which the assignment is scoped.
29
+
30
+ `--userName [userName]`
31
+ : User principal name of a user to which the assignment is scoped.
32
+
33
+ `--administrativeUnitId [administrativeUnitId]`
34
+ : Id of an administrative unit to which the assignment is scoped.
35
+
36
+ `--administrativeUnitName [administrativeUnitName]`
37
+ : Name of an administrative unit to which the assignment is scoped.
38
+
39
+ `--applicationId [applicationId]`
40
+ : Id of an application to which the assignment is scoped.
41
+
42
+ `applicationObjectId [applicationObjectId]`
43
+ : Object Id of an application to which the assignment is scoped.
44
+
45
+ `--applicationName [applicationName]`
46
+ : Name of an application to which the assignment is scoped.
47
+
48
+ `--servicePrincipalId [servicePrincipalId]`
49
+ : Id of a service principal to which the assignment is scoped.
50
+
51
+ `--servicePrincipalName [servicePrincipalName]`
52
+ : Name of a service principal to which the assignment is scoped.
53
+
54
+ `--groupId [groupId]`
55
+ : Id of a group to which the assignment is scoped.
56
+
57
+ `--groupName [groupName]`
58
+ : Name of a group to which the assignment is scoped.
59
+ ```
60
+
61
+ <Global />
62
+
63
+ ## Permissions
64
+
65
+ <Tabs>
66
+ <TabItem value="Delegated">
67
+
68
+ | Resource | Permissions |
69
+ |-----------------|------------------------------------|
70
+ | Microsoft Graph | RoleManagement.ReadWrite.Directory |
71
+
72
+ </TabItem>
73
+ <TabItem value="Application">
74
+
75
+ | Resource | Permissions |
76
+ |-----------------|------------------------------------|
77
+ | Microsoft Graph | RoleManagement.ReadWrite.Directory |
78
+
79
+ </TabItem>
80
+ </Tabs>
81
+
82
+ ## Examples
83
+
84
+ Assign a role specified by name to a user specified by id and scope the assignment to the whole tenant
85
+
86
+ ```sh
87
+ m365 entra roleassignment add --roleDefinitionName 'SharePoint Administrator' --principal 7a2ca997-9461-402e-9882-58088a370889
88
+ ```
89
+
90
+ Assign a role specified by id to a user specified by UPN and scope the assignment to a service principal specified by id
91
+
92
+ ```sh
93
+ m365 entra roleassignment add --roleDefinitionId 777b752-f9b7-4205-a2b1-5db0d6a0ccfc --principal john.doe@contoso.com --servicePrincipalId a4738dd8-fc0f-4646-87fb-47539f5c651b
94
+ ```
95
+
96
+ Assign a role specified by name to a group specified by mail nickname and scope the assignment to an administrative unit specified by name
97
+
98
+ ```sh
99
+ m365 entra roleassignment add --roleDefinitionName 'User Administrator' --principal 'contoso-group' --administrativeUnitName 'Marketing'
100
+ ```
101
+
102
+ Assign a role specified by name to a service principal specified by id and scope the assignment to an application specified by id
103
+
104
+ ```sh
105
+ m365 entra roleassignment add --roleDefinitionName 'Application Administrator' --principal ab2ca997-9461-402e-9882-58088a370889 --applicationId 47539fd8-fc0f-4646-87fb-a4738d5c651b
106
+ ```
107
+
108
+ ## Response
109
+
110
+ <Tabs>
111
+ <TabItem value="JSON">
112
+
113
+ ```json
114
+ {
115
+ "id": "s4awkmfj8k64aR3hKPuYbhaRP4kk4MZLjphUwkUSlIU-1",
116
+ "principalId": "3844129d-f748-4c03-8165-4412ee9b4ceb",
117
+ "directoryScopeId": "/",
118
+ "roleDefinitionId": "92b086b3-e367-4ef2-b869-1de128fb986e"
119
+ }
120
+ ```
121
+
122
+ </TabItem>
123
+ <TabItem value="Text">
124
+
125
+ ```text
126
+ directoryScopeId: /
127
+ id : s4awkmfj8k64aR3hKPuYbhaRP4kk4MZLjphUwkUSlIU-1
128
+ principalId : 3844129d-f748-4c03-8165-4412ee9b4ceb
129
+ roleDefinitionId: 92b086b3-e367-4ef2-b869-1de128fb986e
130
+ ```
131
+
132
+ </TabItem>
133
+ <TabItem value="CSV">
134
+
135
+ ```csv
136
+ id,principalId,directoryScopeId,roleDefinitionId
137
+ s4awkmfj8k64aR3hKPuYbhaRP4kk4MZLjphUwkUSlIU-1,3844129d-f748-4c03-8165-4412ee9b4ceb,/,92b086b3-e367-4ef2-b869-1de128fb986e
138
+ ```
139
+
140
+ </TabItem>
141
+ <TabItem value="Markdown">
142
+
143
+ ```md
144
+ # entra roleassignment add --roleDefinitionId "92b086b3-e367-4ef2-b869-1de128fb986e" --principal "3844129d-f748-4c03-8165-4412ee9b4ceb"
145
+
146
+ Date: 7/3/2025
147
+
148
+ ## s4awkmfj8k64aR3hKPuYbhaRP4kk4MZLjphUwkUSlIU-1
149
+
150
+ Property | Value
151
+ ---------|-------
152
+ id | s4awkmfj8k64aR3hKPuYbhaRP4kk4MZLjphUwkUSlIU-1
153
+ principalId | 3844129d-f748-4c03-8165-4412ee9b4ceb
154
+ directoryScopeId | /
155
+ roleDefinitionId | 92b086b3-e367-4ef2-b869-1de128fb986e
156
+ ```
157
+
158
+ </TabItem>
159
+ </Tabs>
160
+
161
+ ## More information
162
+
163
+ - https://learn.microsoft.com/graph/api/rbacapplication-post-roleassignments
@@ -16,7 +16,10 @@ m365 flow environment get [options]
16
16
 
17
17
  ```md definition-list
18
18
  `-n, --name [name]`
19
- : The name of the environment to get information about. When not specified, the default environment is retrieved.
19
+ : The name of the environment to get information about. When not specified, the default environment is retrieved. Specify either `name` or `default`, but not both.
20
+
21
+ `--default`
22
+ : Indicates that the default environment should be retrieved. Specify either `name` or `default`, but not both.
20
23
  ```
21
24
 
22
25
  <Global />
@@ -42,13 +45,11 @@ m365 flow environment get --name Default-d87a7535-dd31-4437-bfe1-95340acd55c5
42
45
  Get information about the default Microsoft Flow environment.
43
46
 
44
47
  ```sh
45
- m365 flow environment get
48
+ m365 flow environment get --default
46
49
  ```
47
50
 
48
51
  ## Response
49
52
 
50
- ### Standard response
51
-
52
53
  <Tabs>
53
54
  <TabItem value="JSON">
54
55
 
@@ -153,7 +154,7 @@ m365 flow environment get
153
154
  <TabItem value="Markdown">
154
155
 
155
156
  ```md
156
- # flow environment get
157
+ # flow environment get --default
157
158
 
158
159
  Date: 8/2/2023
159
160
 
@@ -21,9 +21,6 @@ m365 flow list [options]
21
21
  `--sharingStatus [sharingStatus]`
22
22
  : List a specific type of flows. Valid values: `ownedByMe`, `personal`, `sharedWithMe`, `all`. Defaults to `ownedByMe`. Don't specify this option when using asAdmin.
23
23
 
24
- `--includeSolutions`
25
- : (deprecated. Use option `withSolutions` instead) Include flows from solutions.
26
-
27
24
  `--withSolutions`
28
25
  : Include flows from solutions.
29
26
 
@@ -24,9 +24,6 @@ m365 flow run get [options]
24
24
  `-e, --environmentName <environmentName>`
25
25
  : The name of the environment where the flow is located.
26
26
 
27
- `--includeTriggerInformation`
28
- : (deprecated. Use option `withTrigger` instead) If specified, include information about the trigger details.
29
-
30
27
  `--withTrigger`
31
28
  : If specified, include information about the trigger details.
32
29
 
@@ -39,9 +39,6 @@ m365 graph subscription add [options]
39
39
  `--latestTLSVersion [latestTLSVersion]`
40
40
  : The latest version of TLS that the notification endpoint supports. Allowed values are `v1_0`, `v1_1`, `v1_2`, `v1_3`. Default is `v1_2`.
41
41
 
42
- `--includeResourceData`
43
- : (deprecated. Use option `withResourceData` instead) When set, the change notifications will include the changed resource data.
44
-
45
42
  `--withResourceData`
46
43
  : When set, the change notifications will include the changed resource data.
47
44
 
@@ -0,0 +1,147 @@
1
+ import Global from '/docs/cmd/_global.mdx';
2
+ import Tabs from '@theme/Tabs';
3
+ import TabItem from '@theme/TabItem';
4
+
5
+ # outlook mail searchfolder add
6
+
7
+ Creates a new mail search folder in the user's mailbox
8
+
9
+ ## Usage
10
+
11
+ ```sh
12
+ m365 outlook mail searchfolder add [options]
13
+ ```
14
+
15
+ ## Options
16
+
17
+ ```md definition-list
18
+ `-i, --userId [userId]`
19
+ : The id of the user in whose mailbox the search folder should be created. Specify either `userId` or `userName`, but not both.
20
+
21
+ `-n, --userName [userName]`
22
+ : The UPN of the user in whose mailbox the search folder should be created. Specify either `userId` or `userName`, but not both.
23
+
24
+ `--folderName <folderName>`
25
+ : The name of the mail search folder.
26
+
27
+ `--sourceFolderIds <sourceFolderIds>`
28
+ : Comma-separated list of mail folders that should be searched.
29
+
30
+ `--includeNestedFolders`
31
+ : The nested mail folders will be searched if specified.
32
+
33
+ `--messageFilter <messageFilter>`
34
+ : The OData query to filter the messages.
35
+ ```
36
+
37
+ <Global />
38
+
39
+ ## Permissions
40
+
41
+ <Tabs>
42
+ <TabItem value="Delegated">
43
+
44
+ | Resource | Permissions |
45
+ |-----------------|----------------|
46
+ | Microsoft Graph | Mail.ReadWrite |
47
+
48
+ </TabItem>
49
+ <TabItem value="Application">
50
+
51
+ | Resource | Permissions |
52
+ |-----------------|----------------|
53
+ | Microsoft Graph | Mail.ReadWrite |
54
+
55
+ </TabItem>
56
+ </Tabs>
57
+
58
+ ## Examples
59
+
60
+ Create a mail search folder in the user's mailbox specified by id for messages from the inbox that contain specific subject
61
+
62
+ ```sh
63
+ m365 outlook mail searchfolder add --userId 1caf7dcd-7e83-4c3a-94f7-932a1299c844 --folderName 'CLI m365' --sourceFolderIds 'AQMkADYAAAIBDAAAAA==' --messageFilter "contains(subject, 'CLI for Microsoft 365')"
64
+ ```
65
+
66
+ Create a mail search folder in the user's mailbox specified by UPN for incoming and outgoing messages from a specific year that contain specific text in a message body, search for messages inside all subfolders
67
+
68
+ ```sh
69
+ m365 outlook mail searchfolder add --userName john.doe@contoso.com --folderName 'Power Platform Community' --sourceFolderIds 'AQMkADYAAAIBDAAAAA==,AQMkADYAAAIBDBBBBB==' --includeNestedFolders --messageFilter "contains(body/content,'Power Platform') AND receivedDateTime ge 2024-01-01 AND receivedDateTime le 2024-12-31"
70
+ ```
71
+
72
+ ## Response
73
+
74
+ <Tabs>
75
+ <TabItem value="JSON">
76
+
77
+ ```json
78
+ {
79
+ "id": "AQMkAGRlM2Y5YTkzLWI2NzAtNDczOS05YHqjbDnRgQABco84sgAAAA==",
80
+ "displayName": "Microsoft Entra",
81
+ "parentFolderId": "AQMkAGRlM2Y5YTkzLWI2NzAtNDczOS05YHqjbDnRgQAAAgEEAAAA",
82
+ "childFolderCount": 0,
83
+ "unreadItemCount": 27,
84
+ "totalItemCount": 41,
85
+ "sizeInBytes": null,
86
+ "isHidden": false,
87
+ "isSupported": true,
88
+ "includeNestedFolders": false,
89
+ "sourceFolderIds": [
90
+ "AQMkAGRlM2Y5YTkzLWI2NzAtNDczOS05YHqjbDnRgQAAAgEMAAAA"
91
+ ],
92
+ "filterQuery": "contains(subject,'Microsoft Entra ID')"
93
+ }
94
+ ```
95
+
96
+ </TabItem>
97
+ <TabItem value="Text">
98
+
99
+ ```text
100
+ childFolderCount : 0
101
+ displayName : Microsoft Entra
102
+ filterQuery : contains(subject,'Microsoft Entra ID')
103
+ id : AQMkAGRlM2Y5YTkzLWI2NzAtNDczOS05YHqjbDnRgQABco88nAAAAA==
104
+ includeNestedFolders: false
105
+ isHidden : false
106
+ isSupported : true
107
+ parentFolderId : AQMkAGRlM2Y5YTkzLWI2NzAtNDczOS05YHqjbDnRgQAAAgEEAAAA
108
+ sizeInBytes : null
109
+ sourceFolderIds : ["AQMkAGRlM2Y5YTkzLWI2NzAtNDczOS05YHqjbDnRgQAAAgEMAAAA"]
110
+ totalItemCount : 41
111
+ unreadItemCount : 27
112
+ ```
113
+
114
+ </TabItem>
115
+ <TabItem value="CSV">
116
+
117
+ ```csv
118
+ id,displayName,parentFolderId,childFolderCount,unreadItemCount,totalItemCount,sizeInBytes,isHidden,isSupported,includeNestedFolders,filterQuery
119
+ AQMkAGRlM2Y5YTkzLWI2NzAtNDczOS05YHqjbDnRgQABco88ngAAAA==,Microsoft Entra,AQMkAGRlM2Y5YTkzLWI2NzAtNDczOS05YHqjbDnRgQAAAgEEAAAA,0,27,41,,,1,,"contains(subject,'Microsoft Entra ID')"
120
+ ```
121
+
122
+ </TabItem>
123
+ <TabItem value="Markdown">
124
+
125
+ ```md
126
+ # outlook mail searchfolder add --debug "false" --verbose "false" --userName "john.doe@contoso.com" --folderName "Microsoft Entra4" --messageFilter "contains(subject,'Microsoft Entra ID')" --sourceFoldersIds "AQMkAGRlM2Y5YTkzLWI2NzAtNDczOS05YHqjbDnRgQAAAgEMAAAA"
127
+
128
+ Date: 9/6/2024
129
+
130
+ ## Microsoft Entra (AQMkAGRlM2Y5YTkzLWI2NzAtNDczOS05YHqjbDnRgQABco88oAAAAA==)
131
+
132
+ Property | Value
133
+ ---------|-------
134
+ id | AQMkAGRlM2Y5YTkzLWI2NzAtNDczOS05YHqjbDnRgQABco88oAAAAA==
135
+ displayName | Microsoft Entra
136
+ parentFolderId | AQMkAGRlM2Y5YTkzLWI2NzAtNDczOS05YHqjbDnRgQAAAgEEAAAA
137
+ childFolderCount | 0
138
+ unreadItemCount | 27
139
+ totalItemCount | 41
140
+ isHidden | false
141
+ isSupported | true
142
+ includeNestedFolders | false
143
+ filterQuery | contains(subject,'Microsoft Entra ID')
144
+ ```
145
+
146
+ </TabItem>
147
+ </Tabs>
@@ -16,7 +16,10 @@ m365 pa environment get [options]
16
16
 
17
17
  ```md definition-list
18
18
  `-n, --name [name]`
19
- : The name of the environment. When not specified, the default environment is retrieved.
19
+ : The name of the environment. When not specified, the default environment is retrieved. Specify either `name` or `default`, but not both.
20
+
21
+ `--default`
22
+ : Indicates that the default environment should be retrieved. Specify either `name` or `default`, but not both.
20
23
  ```
21
24
 
22
25
  <Global />
@@ -36,7 +39,7 @@ If the environment with the name you specified doesn't exist, you will get the `
36
39
  Get information about the default Power Apps environment.
37
40
 
38
41
  ```sh
39
- m365 pa environment get
42
+ m365 pa environment get --default
40
43
  ```
41
44
 
42
45
  Get information about the Power Apps environment with the specified name.
@@ -12,12 +12,6 @@ Get information about the specified copilot
12
12
  m365 pp copilot get [options]
13
13
  ```
14
14
 
15
- ## Alias
16
-
17
- ```sh
18
- m365 pp chatbot get [options]
19
- ```
20
-
21
15
  ## Options
22
16
 
23
17
  ```md definition-list