@pnp/cli-microsoft365 7.3.0-beta.e0b37b9 → 7.4.0-beta.2324d53

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 (241) hide show
  1. package/.eslintrc.cjs +1 -0
  2. package/README.md +1 -1
  3. package/allCommands.json +1 -1
  4. package/allCommandsFull.json +1 -1
  5. package/dist/Auth.js +3 -0
  6. package/dist/m365/app/commands/app-get.js +1 -1
  7. package/dist/m365/app/commands/permission/permission-list.js +1 -1
  8. package/dist/m365/base/PowerAutomateCommand.js +18 -0
  9. package/dist/m365/{aad/commands.js → entra/aadCommands.js} +2 -1
  10. package/dist/m365/{aad → entra}/commands/administrativeunit/administrativeunit-add.js +12 -8
  11. package/dist/m365/{aad → entra}/commands/administrativeunit/administrativeunit-get.js +18 -14
  12. package/dist/m365/{aad → entra}/commands/administrativeunit/administrativeunit-list.js +6 -2
  13. package/dist/m365/{aad → entra}/commands/administrativeunit/administrativeunit-member-add.js +16 -12
  14. package/dist/m365/entra/commands/administrativeunit/administrativeunit-member-get.js +116 -0
  15. package/dist/m365/{aad → entra}/commands/administrativeunit/administrativeunit-member-list.js +16 -12
  16. package/dist/m365/{aad → entra}/commands/administrativeunit/administrativeunit-remove.js +18 -14
  17. package/dist/m365/{aad → entra}/commands/app/app-add.js +25 -21
  18. package/dist/m365/{aad → entra}/commands/app/app-get.js +17 -13
  19. package/dist/m365/{aad → entra}/commands/app/app-list.js +7 -3
  20. package/dist/m365/{aad → entra}/commands/app/app-permission-add.js +16 -12
  21. package/dist/m365/{aad → entra}/commands/app/app-remove.js +17 -13
  22. package/dist/m365/{aad → entra}/commands/app/app-role-add.js +18 -14
  23. package/dist/m365/{aad → entra}/commands/app/app-role-list.js +15 -11
  24. package/dist/m365/{aad → entra}/commands/app/app-role-remove.js +17 -13
  25. package/dist/m365/{aad → entra}/commands/app/app-set.js +18 -14
  26. package/dist/m365/{aad → entra}/commands/approleassignment/approleassignment-add.js +17 -13
  27. package/dist/m365/{aad → entra}/commands/approleassignment/approleassignment-list.js +16 -12
  28. package/dist/m365/{aad → entra}/commands/approleassignment/approleassignment-remove.js +17 -13
  29. package/dist/m365/{aad → entra}/commands/group/group-get.js +17 -13
  30. package/dist/m365/{aad → entra}/commands/group/group-list.js +16 -12
  31. package/dist/m365/{aad → entra}/commands/group/group-remove.js +19 -15
  32. package/dist/m365/{aad → entra}/commands/group/group-user-list.js +17 -13
  33. package/dist/m365/{aad → entra}/commands/groupsetting/groupsetting-add.js +12 -8
  34. package/dist/m365/{aad → entra}/commands/groupsetting/groupsetting-get.js +12 -8
  35. package/dist/m365/{aad → entra}/commands/groupsetting/groupsetting-list.js +7 -3
  36. package/dist/m365/{aad → entra}/commands/groupsetting/groupsetting-remove.js +14 -10
  37. package/dist/m365/{aad → entra}/commands/groupsetting/groupsetting-set.js +12 -8
  38. package/dist/m365/{aad → entra}/commands/groupsettingtemplate/groupsettingtemplate-get.js +17 -13
  39. package/dist/m365/{aad → entra}/commands/groupsettingtemplate/groupsettingtemplate-list.js +7 -3
  40. package/dist/m365/{aad → entra}/commands/license/license-list.js +6 -2
  41. package/dist/m365/{aad → entra}/commands/m365group/m365group-add.js +19 -15
  42. package/dist/m365/{aad → entra}/commands/m365group/m365group-conversation-list.js +12 -8
  43. package/dist/m365/{aad → entra}/commands/m365group/m365group-conversation-post-list.js +16 -12
  44. package/dist/m365/{aad → entra}/commands/m365group/m365group-get.js +12 -8
  45. package/dist/m365/{aad → entra}/commands/m365group/m365group-list.js +12 -8
  46. package/dist/m365/{aad → entra}/commands/m365group/m365group-recyclebinitem-clear.js +12 -8
  47. package/dist/m365/{aad → entra}/commands/m365group/m365group-recyclebinitem-list.js +12 -8
  48. package/dist/m365/{aad → entra}/commands/m365group/m365group-recyclebinitem-remove.js +16 -12
  49. package/dist/m365/{aad → entra}/commands/m365group/m365group-recyclebinitem-restore.js +16 -12
  50. package/dist/m365/{aad → entra}/commands/m365group/m365group-remove.js +17 -13
  51. package/dist/m365/{aad → entra}/commands/m365group/m365group-renew.js +12 -8
  52. package/dist/m365/{aad → entra}/commands/m365group/m365group-report-activitycounts.js +4 -0
  53. package/dist/m365/{aad → entra}/commands/m365group/m365group-report-activitydetail.js +4 -0
  54. package/dist/m365/{aad → entra}/commands/m365group/m365group-report-activityfilecounts.js +4 -0
  55. package/dist/m365/{aad → entra}/commands/m365group/m365group-report-activitygroupcounts.js +4 -0
  56. package/dist/m365/{aad → entra}/commands/m365group/m365group-report-activitystorage.js +4 -0
  57. package/dist/m365/{aad → entra}/commands/m365group/m365group-set.js +19 -15
  58. package/dist/m365/{aad → entra}/commands/m365group/m365group-teamify.js +16 -12
  59. package/dist/m365/{aad → entra}/commands/m365group/m365group-user-add.js +14 -13
  60. package/dist/m365/entra/commands/m365group/m365group-user-list.js +154 -0
  61. package/dist/m365/{aad → entra}/commands/m365group/m365group-user-remove.js +14 -13
  62. package/dist/m365/{aad → entra}/commands/m365group/m365group-user-set.js +14 -13
  63. package/dist/m365/{aad → entra}/commands/oauth2grant/oauth2grant-add.js +12 -8
  64. package/dist/m365/{aad → entra}/commands/oauth2grant/oauth2grant-list.js +12 -8
  65. package/dist/m365/{aad → entra}/commands/oauth2grant/oauth2grant-remove.js +10 -6
  66. package/dist/m365/{aad → entra}/commands/oauth2grant/oauth2grant-set.js +10 -6
  67. package/dist/m365/{aad → entra}/commands/policy/policy-list.js +16 -12
  68. package/dist/m365/{aad → entra}/commands/siteclassification/siteclassification-disable.js +12 -8
  69. package/dist/m365/{aad → entra}/commands/siteclassification/siteclassification-enable.js +12 -8
  70. package/dist/m365/{aad → entra}/commands/siteclassification/siteclassification-get.js +6 -2
  71. package/dist/m365/{aad → entra}/commands/siteclassification/siteclassification-set.js +14 -10
  72. package/dist/m365/{aad → entra}/commands/sp/sp-add.js +17 -13
  73. package/dist/m365/{aad → entra}/commands/sp/sp-get.js +16 -12
  74. package/dist/m365/{aad → entra}/commands/sp/sp-list.js +12 -8
  75. package/dist/m365/{aad → entra}/commands/user/user-add.js +18 -14
  76. package/dist/m365/{aad → entra}/commands/user/user-get.js +16 -12
  77. package/dist/m365/{aad → entra}/commands/user/user-guest-add.js +12 -8
  78. package/dist/m365/{aad → entra}/commands/user/user-hibp.js +14 -10
  79. package/dist/m365/{aad → entra}/commands/user/user-license-add.js +16 -12
  80. package/dist/m365/{aad → entra}/commands/user/user-license-list.js +16 -12
  81. package/dist/m365/{aad → entra}/commands/user/user-license-remove.js +16 -12
  82. package/dist/m365/{aad → entra}/commands/user/user-list.js +12 -8
  83. package/dist/m365/{aad → entra}/commands/user/user-password-validate.js +10 -6
  84. package/dist/m365/{aad → entra}/commands/user/user-recyclebinitem-clear.js +12 -8
  85. package/dist/m365/{aad → entra}/commands/user/user-recyclebinitem-list.js +6 -2
  86. package/dist/m365/{aad → entra}/commands/user/user-recyclebinitem-remove.js +14 -10
  87. package/dist/m365/{aad → entra}/commands/user/user-recyclebinitem-restore.js +12 -8
  88. package/dist/m365/{aad → entra}/commands/user/user-remove.js +16 -12
  89. package/dist/m365/{aad → entra}/commands/user/user-set.js +18 -14
  90. package/dist/m365/{aad → entra}/commands/user/user-signin-list.js +15 -11
  91. package/dist/m365/entra/commands.js +85 -0
  92. package/dist/m365/external/commands/connection/connection-schema-add.js +36 -3
  93. package/dist/m365/flow/commands/environment/environment-get.js +3 -3
  94. package/dist/m365/flow/commands/environment/environment-list.js +3 -3
  95. package/dist/m365/flow/commands/flow-disable.js +3 -3
  96. package/dist/m365/flow/commands/flow-enable.js +3 -3
  97. package/dist/m365/flow/commands/flow-get.js +3 -3
  98. package/dist/m365/flow/commands/flow-list.js +14 -12
  99. package/dist/m365/flow/commands/flow-remove.js +3 -3
  100. package/dist/m365/flow/commands/owner/owner-ensure.js +3 -3
  101. package/dist/m365/flow/commands/owner/owner-list.js +3 -3
  102. package/dist/m365/flow/commands/owner/owner-remove.js +3 -3
  103. package/dist/m365/flow/commands/run/run-cancel.js +3 -3
  104. package/dist/m365/flow/commands/run/run-get.js +3 -3
  105. package/dist/m365/flow/commands/run/run-list.js +8 -7
  106. package/dist/m365/flow/commands/run/run-resubmit.js +4 -4
  107. package/dist/m365/pa/commands/app/app-get.js +26 -11
  108. package/dist/m365/pa/commands/app/app-remove.js +19 -2
  109. package/dist/m365/spo/commands/group/group-member-remove.js +1 -1
  110. package/dist/m365/spo/commands/group/group-set.js +1 -1
  111. package/dist/m365/spo/commands/listitem/listitem-batch-add.js +18 -7
  112. package/dist/m365/spo/commands/page/page-add.js +7 -28
  113. package/dist/m365/spo/commands/site/site-set.js +1 -1
  114. package/dist/m365/teams/commands/app/app-install.js +1 -1
  115. package/dist/m365/teams/commands/meeting/meeting-attendancereport-list.js +1 -1
  116. package/dist/utils/aadAdministrativeUnit.js +4 -4
  117. package/docs/docs/cmd/adaptivecard/adaptivecard-send.mdx +1 -1
  118. package/docs/docs/cmd/{aad → entra}/administrativeunit/administrativeunit-add.mdx +10 -4
  119. package/docs/docs/cmd/{aad → entra}/administrativeunit/administrativeunit-get.mdx +9 -3
  120. package/docs/docs/cmd/{aad → entra}/administrativeunit/administrativeunit-list.mdx +9 -3
  121. package/docs/docs/cmd/{aad → entra}/administrativeunit/administrativeunit-member-add.mdx +13 -7
  122. package/docs/docs/cmd/entra/administrativeunit/administrativeunit-member-get.mdx +136 -0
  123. package/docs/docs/cmd/{aad → entra}/administrativeunit/administrativeunit-member-list.mdx +16 -10
  124. package/docs/docs/cmd/{aad → entra}/administrativeunit/administrativeunit-remove.mdx +9 -3
  125. package/docs/docs/cmd/{aad → entra}/app/app-add.mdx +44 -38
  126. package/docs/docs/cmd/{aad → entra}/app/app-get.mdx +23 -17
  127. package/docs/docs/cmd/{aad → entra}/app/app-list.mdx +11 -5
  128. package/docs/docs/cmd/entra/app/app-permission-add.mdx +68 -0
  129. package/docs/docs/cmd/entra/app/app-remove.mdx +65 -0
  130. package/docs/docs/cmd/entra/app/app-role-add.mdx +74 -0
  131. package/docs/docs/cmd/{aad → entra}/app/app-role-list.mdx +20 -14
  132. package/docs/docs/cmd/entra/app/app-role-remove.mdx +84 -0
  133. package/docs/docs/cmd/entra/app/app-set.mdx +103 -0
  134. package/docs/docs/cmd/{aad → entra}/approleassignment/approleassignment-add.mdx +14 -8
  135. package/docs/docs/cmd/{aad → entra}/approleassignment/approleassignment-list.mdx +12 -6
  136. package/docs/docs/cmd/{aad → entra}/approleassignment/approleassignment-remove.mdx +13 -7
  137. package/docs/docs/cmd/{aad → entra}/group/group-get.mdx +15 -9
  138. package/docs/docs/cmd/{aad → entra}/group/group-list.mdx +13 -7
  139. package/docs/docs/cmd/entra/group/group-remove.mdx +50 -0
  140. package/docs/docs/cmd/{aad → entra}/group/group-user-list.mdx +17 -11
  141. package/docs/docs/cmd/{aad → entra}/groupsetting/groupsetting-add.mdx +11 -5
  142. package/docs/docs/cmd/{aad → entra}/groupsetting/groupsetting-get.mdx +9 -3
  143. package/docs/docs/cmd/{aad → entra}/groupsetting/groupsetting-list.mdx +10 -4
  144. package/docs/docs/cmd/{aad → entra}/groupsetting/groupsetting-remove.mdx +9 -3
  145. package/docs/docs/cmd/{aad → entra}/groupsetting/groupsetting-set.mdx +10 -4
  146. package/docs/docs/cmd/{aad → entra}/groupsettingtemplate/groupsettingtemplate-get.mdx +11 -5
  147. package/docs/docs/cmd/{aad → entra}/groupsettingtemplate/groupsettingtemplate-list.mdx +10 -4
  148. package/docs/docs/cmd/{aad → entra}/license/license-list.mdx +9 -3
  149. package/docs/docs/cmd/{aad → entra}/m365group/m365group-add.mdx +17 -11
  150. package/docs/docs/cmd/{aad → entra}/m365group/m365group-conversation-list.mdx +9 -3
  151. package/docs/docs/cmd/{aad → entra}/m365group/m365group-conversation-post-list.mdx +10 -4
  152. package/docs/docs/cmd/{aad → entra}/m365group/m365group-get.mdx +10 -4
  153. package/docs/docs/cmd/{aad → entra}/m365group/m365group-list.mdx +13 -7
  154. package/docs/docs/cmd/{aad → entra}/m365group/m365group-recyclebinitem-clear.mdx +9 -3
  155. package/docs/docs/cmd/{aad → entra}/m365group/m365group-recyclebinitem-list.mdx +12 -6
  156. package/docs/docs/cmd/{aad → entra}/m365group/m365group-recyclebinitem-remove.mdx +10 -4
  157. package/docs/docs/cmd/{aad → entra}/m365group/m365group-recyclebinitem-restore.mdx +10 -4
  158. package/docs/docs/cmd/{aad → entra}/m365group/m365group-remove.mdx +10 -4
  159. package/docs/docs/cmd/{aad → entra}/m365group/m365group-renew.mdx +8 -2
  160. package/docs/docs/cmd/{aad → entra}/m365group/m365group-report-activitycounts.mdx +10 -4
  161. package/docs/docs/cmd/{aad → entra}/m365group/m365group-report-activitydetail.mdx +11 -5
  162. package/docs/docs/cmd/{aad → entra}/m365group/m365group-report-activityfilecounts.mdx +10 -4
  163. package/docs/docs/cmd/{aad → entra}/m365group/m365group-report-activitygroupcounts.mdx +10 -4
  164. package/docs/docs/cmd/{aad → entra}/m365group/m365group-report-activitystorage.mdx +10 -4
  165. package/docs/docs/cmd/{aad → entra}/m365group/m365group-set.mdx +12 -6
  166. package/docs/docs/cmd/{aad → entra}/m365group/m365group-teamify.mdx +9 -3
  167. package/docs/docs/cmd/{aad → entra}/m365group/m365group-user-add.mdx +9 -3
  168. package/docs/docs/cmd/entra/m365group/m365group-user-list.mdx +131 -0
  169. package/docs/docs/cmd/{aad → entra}/m365group/m365group-user-remove.mdx +9 -5
  170. package/docs/docs/cmd/{aad → entra}/m365group/m365group-user-set.mdx +10 -6
  171. package/docs/docs/cmd/{aad → entra}/oauth2grant/oauth2grant-add.mdx +15 -9
  172. package/docs/docs/cmd/{aad → entra}/oauth2grant/oauth2grant-list.mdx +11 -5
  173. package/docs/docs/cmd/{aad → entra}/oauth2grant/oauth2grant-remove.mdx +13 -7
  174. package/docs/docs/cmd/{aad → entra}/oauth2grant/oauth2grant-set.mdx +12 -6
  175. package/docs/docs/cmd/{aad → entra}/policy/policy-list.mdx +14 -8
  176. package/docs/docs/cmd/{aad → entra}/siteclassification/siteclassification-disable.mdx +9 -3
  177. package/docs/docs/cmd/{aad → entra}/siteclassification/siteclassification-enable.mdx +10 -4
  178. package/docs/docs/cmd/{aad → entra}/siteclassification/siteclassification-get.mdx +9 -3
  179. package/docs/docs/cmd/{aad → entra}/siteclassification/siteclassification-set.mdx +11 -5
  180. package/docs/docs/cmd/{aad → entra}/sp/sp-add.mdx +25 -19
  181. package/docs/docs/cmd/{aad → entra}/sp/sp-get.mdx +12 -6
  182. package/docs/docs/cmd/{aad → entra}/sp/sp-list.mdx +10 -4
  183. package/docs/docs/cmd/{aad → entra}/user/user-add.mdx +12 -6
  184. package/docs/docs/cmd/{aad → entra}/user/user-get.mdx +16 -10
  185. package/docs/docs/cmd/{aad → entra}/user/user-guest-add.mdx +11 -5
  186. package/docs/docs/cmd/{aad → entra}/user/user-hibp.mdx +10 -4
  187. package/docs/docs/cmd/{aad → entra}/user/user-license-add.mdx +10 -4
  188. package/docs/docs/cmd/{aad → entra}/user/user-license-list.mdx +11 -5
  189. package/docs/docs/cmd/{aad → entra}/user/user-license-remove.mdx +9 -3
  190. package/docs/docs/cmd/{aad → entra}/user/user-list.mdx +12 -6
  191. package/docs/docs/cmd/{aad → entra}/user/user-password-validate.mdx +9 -3
  192. package/docs/docs/cmd/{aad → entra}/user/user-recyclebinitem-clear.mdx +9 -3
  193. package/docs/docs/cmd/{aad → entra}/user/user-recyclebinitem-list.mdx +9 -3
  194. package/docs/docs/cmd/{aad → entra}/user/user-recyclebinitem-remove.mdx +9 -3
  195. package/docs/docs/cmd/{aad → entra}/user/user-recyclebinitem-restore.mdx +8 -2
  196. package/docs/docs/cmd/{aad → entra}/user/user-remove.mdx +9 -3
  197. package/docs/docs/cmd/{aad → entra}/user/user-set.mdx +15 -9
  198. package/docs/docs/cmd/{aad → entra}/user/user-signin-list.mdx +19 -13
  199. package/docs/docs/cmd/external/connection/connection-schema-add.mdx +14 -1
  200. package/docs/docs/cmd/graph/schemaextension/schemaextension-add.mdx +1 -1
  201. package/docs/docs/cmd/graph/schemaextension/schemaextension-set.mdx +1 -1
  202. package/docs/docs/cmd/pa/app/app-get.mdx +15 -0
  203. package/docs/docs/cmd/pa/app/app-remove.mdx +14 -0
  204. package/docs/docs/cmd/planner/plan/plan-add.mdx +1 -1
  205. package/docs/docs/cmd/spo/applicationcustomizer/applicationcustomizer-add.mdx +1 -1
  206. package/docs/docs/cmd/spo/applicationcustomizer/applicationcustomizer-set.mdx +1 -1
  207. package/docs/docs/cmd/spo/commandset/commandset-add.mdx +1 -1
  208. package/docs/docs/cmd/spo/commandset/commandset-set.mdx +1 -1
  209. package/docs/docs/cmd/spo/contenttype/contenttype-set.mdx +1 -1
  210. package/docs/docs/cmd/spo/customaction/customaction-add.mdx +1 -1
  211. package/docs/docs/cmd/spo/customaction/customaction-set.mdx +1 -1
  212. package/docs/docs/cmd/spo/field/field-set.mdx +1 -1
  213. package/docs/docs/cmd/spo/list/list-view-set.mdx +1 -1
  214. package/docs/docs/cmd/spo/listitem/listitem-add.mdx +1 -1
  215. package/docs/docs/cmd/spo/listitem/listitem-batch-add.mdx +26 -4
  216. package/docs/docs/cmd/spo/listitem/listitem-set.mdx +1 -1
  217. package/docs/docs/cmd/spo/page/page-clientsidewebpart-add.mdx +1 -1
  218. package/docs/docs/cmd/spo/page/page-control-set.mdx +1 -1
  219. package/docs/docs/cmd/spo/page/page-set.mdx +2 -2
  220. package/docs/docs/cmd/spo/site/site-add.mdx +1 -1
  221. package/docs/docs/cmd/spo/tenant/tenant-applicationcustomizer-add.mdx +1 -1
  222. package/docs/docs/cmd/spo/tenant/tenant-applicationcustomizer-set.mdx +1 -1
  223. package/docs/docs/cmd/spo/tenant/tenant-commandset-add.mdx +1 -1
  224. package/docs/docs/cmd/spo/tenant/tenant-commandset-set.mdx +1 -1
  225. package/docs/docs/cmd/spo/term/term-add.mdx +1 -1
  226. package/docs/docs/cmd/spo/term/term-group-add.mdx +1 -1
  227. package/docs/docs/cmd/spo/term/term-set-add.mdx +1 -1
  228. package/docs/docs/cmd/teams/team/team-add.mdx +1 -1
  229. package/npm-shrinkwrap.json +186 -432
  230. package/package.json +9 -9
  231. package/dist/m365/aad/commands/m365group/m365group-user-list.js +0 -94
  232. package/docs/docs/cmd/aad/app/app-permission-add.mdx +0 -62
  233. package/docs/docs/cmd/aad/app/app-remove.mdx +0 -59
  234. package/docs/docs/cmd/aad/app/app-role-add.mdx +0 -68
  235. package/docs/docs/cmd/aad/app/app-role-remove.mdx +0 -78
  236. package/docs/docs/cmd/aad/app/app-set.mdx +0 -97
  237. package/docs/docs/cmd/aad/group/group-remove.mdx +0 -44
  238. package/docs/docs/cmd/aad/m365group/m365group-user-list.mdx +0 -99
  239. /package/dist/m365/{aad → entra}/commands/approleassignment/ServicePrincipal.js +0 -0
  240. /package/dist/m365/{aad → entra}/commands/m365group/GroupExtended.js +0 -0
  241. /package/dist/m365/{aad → entra}/commands/siteclassification/SiteClassificationSettings.js +0 -0
@@ -3,7 +3,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
3
3
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
4
4
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
5
5
  };
6
- var _AadM365GroupSetCommand_instances, _AadM365GroupSetCommand_initTelemetry, _AadM365GroupSetCommand_initOptions, _AadM365GroupSetCommand_initTypes, _AadM365GroupSetCommand_initValidators;
6
+ var _EntraM365GroupSetCommand_instances, _EntraM365GroupSetCommand_initTelemetry, _EntraM365GroupSetCommand_initOptions, _EntraM365GroupSetCommand_initTypes, _EntraM365GroupSetCommand_initValidators;
7
7
  import { setTimeout } from 'timers/promises';
8
8
  import fs from 'fs';
9
9
  import path from 'path';
@@ -12,21 +12,25 @@ import { validation } from '../../../../utils/validation.js';
12
12
  import GraphCommand from '../../../base/GraphCommand.js';
13
13
  import commands from '../../commands.js';
14
14
  import { aadGroup } from '../../../../utils/aadGroup.js';
15
- class AadM365GroupSetCommand extends GraphCommand {
15
+ import aadCommands from '../../aadCommands.js';
16
+ class EntraM365GroupSetCommand extends GraphCommand {
16
17
  get name() {
17
18
  return commands.M365GROUP_SET;
18
19
  }
19
20
  get description() {
20
21
  return 'Updates Microsoft 365 Group properties';
21
22
  }
23
+ alias() {
24
+ return [aadCommands.M365GROUP_SET];
25
+ }
22
26
  constructor() {
23
27
  super();
24
- _AadM365GroupSetCommand_instances.add(this);
28
+ _EntraM365GroupSetCommand_instances.add(this);
25
29
  this.pollingInterval = 500;
26
- __classPrivateFieldGet(this, _AadM365GroupSetCommand_instances, "m", _AadM365GroupSetCommand_initTelemetry).call(this);
27
- __classPrivateFieldGet(this, _AadM365GroupSetCommand_instances, "m", _AadM365GroupSetCommand_initOptions).call(this);
28
- __classPrivateFieldGet(this, _AadM365GroupSetCommand_instances, "m", _AadM365GroupSetCommand_initTypes).call(this);
29
- __classPrivateFieldGet(this, _AadM365GroupSetCommand_instances, "m", _AadM365GroupSetCommand_initValidators).call(this);
30
+ __classPrivateFieldGet(this, _EntraM365GroupSetCommand_instances, "m", _EntraM365GroupSetCommand_initTelemetry).call(this);
31
+ __classPrivateFieldGet(this, _EntraM365GroupSetCommand_instances, "m", _EntraM365GroupSetCommand_initOptions).call(this);
32
+ __classPrivateFieldGet(this, _EntraM365GroupSetCommand_instances, "m", _EntraM365GroupSetCommand_initTypes).call(this);
33
+ __classPrivateFieldGet(this, _EntraM365GroupSetCommand_instances, "m", _EntraM365GroupSetCommand_initValidators).call(this);
30
34
  }
31
35
  async commandAction(logger, args) {
32
36
  try {
@@ -70,7 +74,7 @@ class AadM365GroupSetCommand extends GraphCommand {
70
74
  },
71
75
  data: fs.readFileSync(fullPath)
72
76
  };
73
- await this.setGroupLogo(requestOptions, AadM365GroupSetCommand.numRepeat, logger);
77
+ await this.setGroupLogo(requestOptions, EntraM365GroupSetCommand.numRepeat, logger);
74
78
  }
75
79
  else if (this.debug) {
76
80
  await logger.logToStderr('logoPath not set. Skipping');
@@ -140,7 +144,7 @@ class AadM365GroupSetCommand extends GraphCommand {
140
144
  }
141
145
  catch (err) {
142
146
  if (--retryLeft > 0) {
143
- await setTimeout(this.pollingInterval * (AadM365GroupSetCommand.numRepeat - retryLeft));
147
+ await setTimeout(this.pollingInterval * (EntraM365GroupSetCommand.numRepeat - retryLeft));
144
148
  await this.setGroupLogo(requestOptions, retryLeft, logger);
145
149
  }
146
150
  else {
@@ -160,7 +164,7 @@ class AadM365GroupSetCommand extends GraphCommand {
160
164
  }
161
165
  }
162
166
  }
163
- _AadM365GroupSetCommand_instances = new WeakSet(), _AadM365GroupSetCommand_initTelemetry = function _AadM365GroupSetCommand_initTelemetry() {
167
+ _EntraM365GroupSetCommand_instances = new WeakSet(), _EntraM365GroupSetCommand_initTelemetry = function _EntraM365GroupSetCommand_initTelemetry() {
164
168
  this.telemetry.push((args) => {
165
169
  Object.assign(this.telemetryProperties, {
166
170
  displayName: typeof args.options.displayName !== 'undefined',
@@ -171,7 +175,7 @@ _AadM365GroupSetCommand_instances = new WeakSet(), _AadM365GroupSetCommand_initT
171
175
  logoPath: typeof args.options.logoPath !== 'undefined'
172
176
  });
173
177
  });
174
- }, _AadM365GroupSetCommand_initOptions = function _AadM365GroupSetCommand_initOptions() {
178
+ }, _EntraM365GroupSetCommand_initOptions = function _EntraM365GroupSetCommand_initOptions() {
175
179
  this.options.unshift({
176
180
  option: '-i, --id <id>'
177
181
  }, {
@@ -188,9 +192,9 @@ _AadM365GroupSetCommand_instances = new WeakSet(), _AadM365GroupSetCommand_initT
188
192
  }, {
189
193
  option: '-l, --logoPath [logoPath]'
190
194
  });
191
- }, _AadM365GroupSetCommand_initTypes = function _AadM365GroupSetCommand_initTypes() {
195
+ }, _EntraM365GroupSetCommand_initTypes = function _EntraM365GroupSetCommand_initTypes() {
192
196
  this.types.boolean.push('isPrivate');
193
- }, _AadM365GroupSetCommand_initValidators = function _AadM365GroupSetCommand_initValidators() {
197
+ }, _EntraM365GroupSetCommand_initValidators = function _EntraM365GroupSetCommand_initValidators() {
194
198
  this.validators.push(async (args) => {
195
199
  if (!args.options.displayName &&
196
200
  !args.options.description &&
@@ -231,6 +235,6 @@ _AadM365GroupSetCommand_instances = new WeakSet(), _AadM365GroupSetCommand_initT
231
235
  return true;
232
236
  });
233
237
  };
234
- AadM365GroupSetCommand.numRepeat = 15;
235
- export default new AadM365GroupSetCommand();
238
+ EntraM365GroupSetCommand.numRepeat = 15;
239
+ export default new EntraM365GroupSetCommand();
236
240
  //# sourceMappingURL=m365group-set.js.map
@@ -3,28 +3,32 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
3
3
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
4
4
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
5
5
  };
6
- var _AadM365GroupTeamifyCommand_instances, _AadM365GroupTeamifyCommand_initTelemetry, _AadM365GroupTeamifyCommand_initOptions, _AadM365GroupTeamifyCommand_initValidators, _AadM365GroupTeamifyCommand_initOptionSets;
6
+ var _EntraM365GroupTeamifyCommand_instances, _EntraM365GroupTeamifyCommand_initTelemetry, _EntraM365GroupTeamifyCommand_initOptions, _EntraM365GroupTeamifyCommand_initValidators, _EntraM365GroupTeamifyCommand_initOptionSets;
7
7
  import { cli } from '../../../../cli/cli.js';
8
8
  import request from '../../../../request.js';
9
9
  import { aadGroup } from '../../../../utils/aadGroup.js';
10
10
  import { formatting } from '../../../../utils/formatting.js';
11
11
  import { validation } from '../../../../utils/validation.js';
12
12
  import GraphCommand from '../../../base/GraphCommand.js';
13
+ import aadCommands from '../../aadCommands.js';
13
14
  import commands from '../../commands.js';
14
- class AadM365GroupTeamifyCommand extends GraphCommand {
15
+ class EntraM365GroupTeamifyCommand extends GraphCommand {
15
16
  get name() {
16
17
  return commands.M365GROUP_TEAMIFY;
17
18
  }
18
19
  get description() {
19
20
  return 'Creates a new Microsoft Teams team under existing Microsoft 365 group';
20
21
  }
22
+ alias() {
23
+ return [aadCommands.M365GROUP_TEAMIFY];
24
+ }
21
25
  constructor() {
22
26
  super();
23
- _AadM365GroupTeamifyCommand_instances.add(this);
24
- __classPrivateFieldGet(this, _AadM365GroupTeamifyCommand_instances, "m", _AadM365GroupTeamifyCommand_initTelemetry).call(this);
25
- __classPrivateFieldGet(this, _AadM365GroupTeamifyCommand_instances, "m", _AadM365GroupTeamifyCommand_initOptions).call(this);
26
- __classPrivateFieldGet(this, _AadM365GroupTeamifyCommand_instances, "m", _AadM365GroupTeamifyCommand_initValidators).call(this);
27
- __classPrivateFieldGet(this, _AadM365GroupTeamifyCommand_instances, "m", _AadM365GroupTeamifyCommand_initOptionSets).call(this);
27
+ _EntraM365GroupTeamifyCommand_instances.add(this);
28
+ __classPrivateFieldGet(this, _EntraM365GroupTeamifyCommand_instances, "m", _EntraM365GroupTeamifyCommand_initTelemetry).call(this);
29
+ __classPrivateFieldGet(this, _EntraM365GroupTeamifyCommand_instances, "m", _EntraM365GroupTeamifyCommand_initOptions).call(this);
30
+ __classPrivateFieldGet(this, _EntraM365GroupTeamifyCommand_instances, "m", _EntraM365GroupTeamifyCommand_initValidators).call(this);
31
+ __classPrivateFieldGet(this, _EntraM365GroupTeamifyCommand_instances, "m", _EntraM365GroupTeamifyCommand_initOptionSets).call(this);
28
32
  }
29
33
  async getGroupId(options) {
30
34
  if (options.id) {
@@ -85,28 +89,28 @@ class AadM365GroupTeamifyCommand extends GraphCommand {
85
89
  }
86
90
  }
87
91
  }
88
- _AadM365GroupTeamifyCommand_instances = new WeakSet(), _AadM365GroupTeamifyCommand_initTelemetry = function _AadM365GroupTeamifyCommand_initTelemetry() {
92
+ _EntraM365GroupTeamifyCommand_instances = new WeakSet(), _EntraM365GroupTeamifyCommand_initTelemetry = function _EntraM365GroupTeamifyCommand_initTelemetry() {
89
93
  this.telemetry.push((args) => {
90
94
  Object.assign(this.telemetryProperties, {
91
95
  id: typeof args.options.id !== 'undefined',
92
96
  mailNickname: typeof args.options.mailNickname !== 'undefined'
93
97
  });
94
98
  });
95
- }, _AadM365GroupTeamifyCommand_initOptions = function _AadM365GroupTeamifyCommand_initOptions() {
99
+ }, _EntraM365GroupTeamifyCommand_initOptions = function _EntraM365GroupTeamifyCommand_initOptions() {
96
100
  this.options.unshift({
97
101
  option: '-i, --id [id]'
98
102
  }, {
99
103
  option: '--mailNickname [mailNickname]'
100
104
  });
101
- }, _AadM365GroupTeamifyCommand_initValidators = function _AadM365GroupTeamifyCommand_initValidators() {
105
+ }, _EntraM365GroupTeamifyCommand_initValidators = function _EntraM365GroupTeamifyCommand_initValidators() {
102
106
  this.validators.push(async (args) => {
103
107
  if (args.options.id && !validation.isValidGuid(args.options.id)) {
104
108
  return `${args.options.id} is not a valid GUID`;
105
109
  }
106
110
  return true;
107
111
  });
108
- }, _AadM365GroupTeamifyCommand_initOptionSets = function _AadM365GroupTeamifyCommand_initOptionSets() {
112
+ }, _EntraM365GroupTeamifyCommand_initOptionSets = function _EntraM365GroupTeamifyCommand_initOptionSets() {
109
113
  this.optionSets.push({ options: ['id', 'mailNickname'] });
110
114
  };
111
- export default new AadM365GroupTeamifyCommand();
115
+ export default new EntraM365GroupTeamifyCommand();
112
116
  //# sourceMappingURL=m365group-teamify.js.map
@@ -3,15 +3,16 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
3
3
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
4
4
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
5
5
  };
6
- var _AadM365GroupUserAddCommand_instances, _AadM365GroupUserAddCommand_initTelemetry, _AadM365GroupUserAddCommand_initOptions, _AadM365GroupUserAddCommand_initValidators, _AadM365GroupUserAddCommand_initOptionSets;
6
+ var _EntraM365GroupUserAddCommand_instances, _EntraM365GroupUserAddCommand_initTelemetry, _EntraM365GroupUserAddCommand_initOptions, _EntraM365GroupUserAddCommand_initValidators, _EntraM365GroupUserAddCommand_initOptionSets;
7
7
  import request from '../../../../request.js';
8
8
  import { aadGroup } from '../../../../utils/aadGroup.js';
9
9
  import { formatting } from '../../../../utils/formatting.js';
10
10
  import { validation } from '../../../../utils/validation.js';
11
11
  import GraphCommand from '../../../base/GraphCommand.js';
12
12
  import teamsCommands from '../../../teams/commands.js';
13
+ import aadCommands from '../../aadCommands.js';
13
14
  import commands from '../../commands.js';
14
- class AadM365GroupUserAddCommand extends GraphCommand {
15
+ class EntraM365GroupUserAddCommand extends GraphCommand {
15
16
  get name() {
16
17
  return commands.M365GROUP_USER_ADD;
17
18
  }
@@ -19,15 +20,15 @@ class AadM365GroupUserAddCommand extends GraphCommand {
19
20
  return 'Adds user to specified Microsoft 365 Group or Microsoft Teams team';
20
21
  }
21
22
  alias() {
22
- return [teamsCommands.USER_ADD];
23
+ return [teamsCommands.USER_ADD, aadCommands.M365GROUP_USER_ADD];
23
24
  }
24
25
  constructor() {
25
26
  super();
26
- _AadM365GroupUserAddCommand_instances.add(this);
27
- __classPrivateFieldGet(this, _AadM365GroupUserAddCommand_instances, "m", _AadM365GroupUserAddCommand_initTelemetry).call(this);
28
- __classPrivateFieldGet(this, _AadM365GroupUserAddCommand_instances, "m", _AadM365GroupUserAddCommand_initOptions).call(this);
29
- __classPrivateFieldGet(this, _AadM365GroupUserAddCommand_instances, "m", _AadM365GroupUserAddCommand_initValidators).call(this);
30
- __classPrivateFieldGet(this, _AadM365GroupUserAddCommand_instances, "m", _AadM365GroupUserAddCommand_initOptionSets).call(this);
27
+ _EntraM365GroupUserAddCommand_instances.add(this);
28
+ __classPrivateFieldGet(this, _EntraM365GroupUserAddCommand_instances, "m", _EntraM365GroupUserAddCommand_initTelemetry).call(this);
29
+ __classPrivateFieldGet(this, _EntraM365GroupUserAddCommand_instances, "m", _EntraM365GroupUserAddCommand_initOptions).call(this);
30
+ __classPrivateFieldGet(this, _EntraM365GroupUserAddCommand_instances, "m", _EntraM365GroupUserAddCommand_initValidators).call(this);
31
+ __classPrivateFieldGet(this, _EntraM365GroupUserAddCommand_instances, "m", _EntraM365GroupUserAddCommand_initOptionSets).call(this);
31
32
  }
32
33
  async commandAction(logger, args) {
33
34
  try {
@@ -60,7 +61,7 @@ class AadM365GroupUserAddCommand extends GraphCommand {
60
61
  }
61
62
  }
62
63
  }
63
- _AadM365GroupUserAddCommand_instances = new WeakSet(), _AadM365GroupUserAddCommand_initTelemetry = function _AadM365GroupUserAddCommand_initTelemetry() {
64
+ _EntraM365GroupUserAddCommand_instances = new WeakSet(), _EntraM365GroupUserAddCommand_initTelemetry = function _EntraM365GroupUserAddCommand_initTelemetry() {
64
65
  this.telemetry.push((args) => {
65
66
  Object.assign(this.telemetryProperties, {
66
67
  role: args.options.role,
@@ -68,7 +69,7 @@ _AadM365GroupUserAddCommand_instances = new WeakSet(), _AadM365GroupUserAddComma
68
69
  groupId: typeof args.options.groupId !== 'undefined'
69
70
  });
70
71
  });
71
- }, _AadM365GroupUserAddCommand_initOptions = function _AadM365GroupUserAddCommand_initOptions() {
72
+ }, _EntraM365GroupUserAddCommand_initOptions = function _EntraM365GroupUserAddCommand_initOptions() {
72
73
  this.options.unshift({
73
74
  option: '-n, --userName <userName>'
74
75
  }, {
@@ -79,7 +80,7 @@ _AadM365GroupUserAddCommand_instances = new WeakSet(), _AadM365GroupUserAddComma
79
80
  option: '-r, --role [role]',
80
81
  autocomplete: ['Owner', 'Member']
81
82
  });
82
- }, _AadM365GroupUserAddCommand_initValidators = function _AadM365GroupUserAddCommand_initValidators() {
83
+ }, _EntraM365GroupUserAddCommand_initValidators = function _EntraM365GroupUserAddCommand_initValidators() {
83
84
  this.validators.push(async (args) => {
84
85
  if (args.options.teamId && !validation.isValidGuid(args.options.teamId)) {
85
86
  return `${args.options.teamId} is not a valid GUID`;
@@ -94,8 +95,8 @@ _AadM365GroupUserAddCommand_instances = new WeakSet(), _AadM365GroupUserAddComma
94
95
  }
95
96
  return true;
96
97
  });
97
- }, _AadM365GroupUserAddCommand_initOptionSets = function _AadM365GroupUserAddCommand_initOptionSets() {
98
+ }, _EntraM365GroupUserAddCommand_initOptionSets = function _EntraM365GroupUserAddCommand_initOptionSets() {
98
99
  this.optionSets.push({ options: ['groupId', 'teamId'] });
99
100
  };
100
- export default new AadM365GroupUserAddCommand();
101
+ export default new EntraM365GroupUserAddCommand();
101
102
  //# sourceMappingURL=m365group-user-add.js.map
@@ -0,0 +1,154 @@
1
+ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
2
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
3
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
4
+ return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
5
+ };
6
+ var _EntraM365GroupUserListCommand_instances, _EntraM365GroupUserListCommand_initTelemetry, _EntraM365GroupUserListCommand_initOptions, _EntraM365GroupUserListCommand_initOptionSets, _EntraM365GroupUserListCommand_initValidators;
7
+ import { odata } from '../../../../utils/odata.js';
8
+ import { validation } from '../../../../utils/validation.js';
9
+ import GraphCommand from '../../../base/GraphCommand.js';
10
+ import commands from '../../commands.js';
11
+ import { aadGroup } from '../../../../utils/aadGroup.js';
12
+ import aadCommands from '../../aadCommands.js';
13
+ class EntraM365GroupUserListCommand extends GraphCommand {
14
+ get name() {
15
+ return commands.M365GROUP_USER_LIST;
16
+ }
17
+ get description() {
18
+ return "Lists users for the specified Microsoft 365 group";
19
+ }
20
+ alias() {
21
+ return [aadCommands.M365GROUP_USER_LIST];
22
+ }
23
+ constructor() {
24
+ super();
25
+ _EntraM365GroupUserListCommand_instances.add(this);
26
+ __classPrivateFieldGet(this, _EntraM365GroupUserListCommand_instances, "m", _EntraM365GroupUserListCommand_initTelemetry).call(this);
27
+ __classPrivateFieldGet(this, _EntraM365GroupUserListCommand_instances, "m", _EntraM365GroupUserListCommand_initOptions).call(this);
28
+ __classPrivateFieldGet(this, _EntraM365GroupUserListCommand_instances, "m", _EntraM365GroupUserListCommand_initOptionSets).call(this);
29
+ __classPrivateFieldGet(this, _EntraM365GroupUserListCommand_instances, "m", _EntraM365GroupUserListCommand_initValidators).call(this);
30
+ }
31
+ async commandAction(logger, args) {
32
+ try {
33
+ if (args.options.role === 'Guest') {
34
+ this.warn(logger, `Value 'Guest' for the option role is deprecated. Use --filter "userType eq 'Guest'" instead.`);
35
+ }
36
+ const groupId = await this.getGroupId(args.options, logger);
37
+ const isUnifiedGroup = await aadGroup.isUnifiedGroup(groupId);
38
+ if (!isUnifiedGroup) {
39
+ throw Error(`Specified group '${args.options.groupId || args.options.groupDisplayName}' is not a Microsoft 365 group.`);
40
+ }
41
+ let users = [];
42
+ if (!args.options.role || args.options.role === 'Owner') {
43
+ const owners = await this.getUsers(args.options, 'Owners', groupId, logger);
44
+ owners.forEach(owner => users.push({ ...owner, roles: ['Owner'], userType: 'Owner' }));
45
+ }
46
+ if (!args.options.role || args.options.role === 'Member' || args.options.role === 'Guest') {
47
+ const members = await this.getUsers(args.options, 'Members', groupId, logger);
48
+ members.forEach((member) => {
49
+ const user = users.find((u) => u.id === member.id);
50
+ if (user !== undefined) {
51
+ user.roles.push('Member');
52
+ }
53
+ else {
54
+ users.push({ ...member, roles: ['Member'] });
55
+ }
56
+ });
57
+ }
58
+ if (args.options.role) {
59
+ users = users.filter(i => i.userType === args.options.role);
60
+ }
61
+ await logger.log(users);
62
+ }
63
+ catch (err) {
64
+ this.handleRejectedODataJsonPromise(err);
65
+ }
66
+ }
67
+ async getGroupId(options, logger) {
68
+ if (options.groupId) {
69
+ return options.groupId;
70
+ }
71
+ if (this.verbose) {
72
+ await logger.logToStderr('Retrieving Group Id...');
73
+ }
74
+ return await aadGroup.getGroupIdByDisplayName(options.groupDisplayName);
75
+ }
76
+ async getUsers(options, role, groupId, logger) {
77
+ const { properties, filter } = options;
78
+ if (this.verbose) {
79
+ await logger.logToStderr(`Retrieving ${role} of the group with id ${groupId}`);
80
+ }
81
+ const selectProperties = properties ?
82
+ `${properties.split(',').filter(f => f.toLowerCase() !== 'id').concat('id').map(p => p.trim()).join(',')}` :
83
+ 'id,displayName,userPrincipalName,givenName,surname,userType';
84
+ const allSelectProperties = selectProperties.split(',');
85
+ const propertiesWithSlash = allSelectProperties.filter(item => item.includes('/'));
86
+ const fieldsToExpand = [];
87
+ propertiesWithSlash.forEach(p => {
88
+ const propertiesSplit = p.split('/');
89
+ fieldsToExpand.push(`${propertiesSplit[0]}($select=${propertiesSplit[1]})`);
90
+ });
91
+ const fieldExpand = fieldsToExpand.join(',');
92
+ const expandParam = fieldExpand.length > 0 ? `&$expand=${fieldExpand}` : '';
93
+ const selectParam = allSelectProperties.filter(item => !item.includes('/'));
94
+ const endpoint = `${this.resource}/v1.0/groups/${groupId}/${role}/microsoft.graph.user?$select=${selectParam}${expandParam}`;
95
+ if (filter) {
96
+ // While using the filter, we need to specify the ConsistencyLevel header.
97
+ // Can be refactored when the header is no longer necessary.
98
+ const requestOptions = {
99
+ url: `${endpoint}&$filter=${encodeURIComponent(filter)}&$count=true`,
100
+ headers: {
101
+ accept: 'application/json;odata.metadata=none',
102
+ ConsistencyLevel: 'eventual'
103
+ },
104
+ responseType: 'json'
105
+ };
106
+ return await odata.getAllItems(requestOptions);
107
+ }
108
+ else {
109
+ return await odata.getAllItems(endpoint);
110
+ }
111
+ }
112
+ }
113
+ _EntraM365GroupUserListCommand_instances = new WeakSet(), _EntraM365GroupUserListCommand_initTelemetry = function _EntraM365GroupUserListCommand_initTelemetry() {
114
+ this.telemetry.push((args) => {
115
+ Object.assign(this.telemetryProperties, {
116
+ groupId: typeof args.options.groupId !== 'undefined',
117
+ groupDisplayName: typeof args.options.groupDisplayName !== 'undefined',
118
+ role: typeof args.options.role !== 'undefined',
119
+ properties: typeof args.options.properties !== 'undefined',
120
+ filter: typeof args.options.filter !== 'undefined'
121
+ });
122
+ });
123
+ }, _EntraM365GroupUserListCommand_initOptions = function _EntraM365GroupUserListCommand_initOptions() {
124
+ this.options.unshift({
125
+ option: "-i, --groupId [groupId]"
126
+ }, {
127
+ option: "-n, --groupDisplayName [groupDisplayName]"
128
+ }, {
129
+ option: "-r, --role [type]",
130
+ autocomplete: ["Owner", "Member", "Guest"]
131
+ }, {
132
+ option: "-p, --properties [properties]"
133
+ }, {
134
+ option: "-f, --filter [filter]"
135
+ });
136
+ }, _EntraM365GroupUserListCommand_initOptionSets = function _EntraM365GroupUserListCommand_initOptionSets() {
137
+ this.optionSets.push({
138
+ options: ['groupId', 'groupDisplayName']
139
+ });
140
+ }, _EntraM365GroupUserListCommand_initValidators = function _EntraM365GroupUserListCommand_initValidators() {
141
+ this.validators.push(async (args) => {
142
+ if (args.options.groupId && !validation.isValidGuid(args.options.groupId)) {
143
+ return `${args.options.groupId} is not a valid GUID`;
144
+ }
145
+ if (args.options.role) {
146
+ if (['Owner', 'Member', 'Guest'].indexOf(args.options.role) === -1) {
147
+ return `${args.options.role} is not a valid role value. Allowed values Owner|Member|Guest`;
148
+ }
149
+ }
150
+ return true;
151
+ });
152
+ };
153
+ export default new EntraM365GroupUserListCommand();
154
+ //# sourceMappingURL=m365group-user-list.js.map
@@ -3,7 +3,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
3
3
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
4
4
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
5
5
  };
6
- var _AadM365GroupUserRemoveCommand_instances, _AadM365GroupUserRemoveCommand_initTelemetry, _AadM365GroupUserRemoveCommand_initOptions, _AadM365GroupUserRemoveCommand_initValidators, _AadM365GroupUserRemoveCommand_initOptionSets;
6
+ var _EntraM365GroupUserRemoveCommand_instances, _EntraM365GroupUserRemoveCommand_initTelemetry, _EntraM365GroupUserRemoveCommand_initOptions, _EntraM365GroupUserRemoveCommand_initValidators, _EntraM365GroupUserRemoveCommand_initOptionSets;
7
7
  import { cli } from '../../../../cli/cli.js';
8
8
  import request from '../../../../request.js';
9
9
  import { aadGroup } from '../../../../utils/aadGroup.js';
@@ -11,8 +11,9 @@ import { formatting } from '../../../../utils/formatting.js';
11
11
  import { validation } from '../../../../utils/validation.js';
12
12
  import GraphCommand from '../../../base/GraphCommand.js';
13
13
  import teamsCommands from '../../../teams/commands.js';
14
+ import aadCommands from '../../aadCommands.js';
14
15
  import commands from '../../commands.js';
15
- class AadM365GroupUserRemoveCommand extends GraphCommand {
16
+ class EntraM365GroupUserRemoveCommand extends GraphCommand {
16
17
  get name() {
17
18
  return commands.M365GROUP_USER_REMOVE;
18
19
  }
@@ -20,15 +21,15 @@ class AadM365GroupUserRemoveCommand extends GraphCommand {
20
21
  return 'Removes the specified user from specified Microsoft 365 Group or Microsoft Teams team';
21
22
  }
22
23
  alias() {
23
- return [teamsCommands.USER_REMOVE];
24
+ return [teamsCommands.USER_REMOVE, aadCommands.M365GROUP_USER_REMOVE];
24
25
  }
25
26
  constructor() {
26
27
  super();
27
- _AadM365GroupUserRemoveCommand_instances.add(this);
28
- __classPrivateFieldGet(this, _AadM365GroupUserRemoveCommand_instances, "m", _AadM365GroupUserRemoveCommand_initTelemetry).call(this);
29
- __classPrivateFieldGet(this, _AadM365GroupUserRemoveCommand_instances, "m", _AadM365GroupUserRemoveCommand_initOptions).call(this);
30
- __classPrivateFieldGet(this, _AadM365GroupUserRemoveCommand_instances, "m", _AadM365GroupUserRemoveCommand_initValidators).call(this);
31
- __classPrivateFieldGet(this, _AadM365GroupUserRemoveCommand_instances, "m", _AadM365GroupUserRemoveCommand_initOptionSets).call(this);
28
+ _EntraM365GroupUserRemoveCommand_instances.add(this);
29
+ __classPrivateFieldGet(this, _EntraM365GroupUserRemoveCommand_instances, "m", _EntraM365GroupUserRemoveCommand_initTelemetry).call(this);
30
+ __classPrivateFieldGet(this, _EntraM365GroupUserRemoveCommand_instances, "m", _EntraM365GroupUserRemoveCommand_initOptions).call(this);
31
+ __classPrivateFieldGet(this, _EntraM365GroupUserRemoveCommand_instances, "m", _EntraM365GroupUserRemoveCommand_initValidators).call(this);
32
+ __classPrivateFieldGet(this, _EntraM365GroupUserRemoveCommand_instances, "m", _EntraM365GroupUserRemoveCommand_initOptionSets).call(this);
32
33
  }
33
34
  async commandAction(logger, args) {
34
35
  const groupId = (typeof args.options.groupId !== 'undefined') ? args.options.groupId : args.options.teamId;
@@ -99,7 +100,7 @@ class AadM365GroupUserRemoveCommand extends GraphCommand {
99
100
  }
100
101
  }
101
102
  }
102
- _AadM365GroupUserRemoveCommand_instances = new WeakSet(), _AadM365GroupUserRemoveCommand_initTelemetry = function _AadM365GroupUserRemoveCommand_initTelemetry() {
103
+ _EntraM365GroupUserRemoveCommand_instances = new WeakSet(), _EntraM365GroupUserRemoveCommand_initTelemetry = function _EntraM365GroupUserRemoveCommand_initTelemetry() {
103
104
  this.telemetry.push((args) => {
104
105
  Object.assign(this.telemetryProperties, {
105
106
  force: (!(!args.options.force)).toString(),
@@ -107,7 +108,7 @@ _AadM365GroupUserRemoveCommand_instances = new WeakSet(), _AadM365GroupUserRemov
107
108
  groupId: typeof args.options.groupId !== 'undefined'
108
109
  });
109
110
  });
110
- }, _AadM365GroupUserRemoveCommand_initOptions = function _AadM365GroupUserRemoveCommand_initOptions() {
111
+ }, _EntraM365GroupUserRemoveCommand_initOptions = function _EntraM365GroupUserRemoveCommand_initOptions() {
111
112
  this.options.unshift({
112
113
  option: "-i, --groupId [groupId]"
113
114
  }, {
@@ -117,7 +118,7 @@ _AadM365GroupUserRemoveCommand_instances = new WeakSet(), _AadM365GroupUserRemov
117
118
  }, {
118
119
  option: '-f, --force'
119
120
  });
120
- }, _AadM365GroupUserRemoveCommand_initValidators = function _AadM365GroupUserRemoveCommand_initValidators() {
121
+ }, _EntraM365GroupUserRemoveCommand_initValidators = function _EntraM365GroupUserRemoveCommand_initValidators() {
121
122
  this.validators.push(async (args) => {
122
123
  if (args.options.teamId && !validation.isValidGuid(args.options.teamId)) {
123
124
  return `${args.options.teamId} is not a valid GUID`;
@@ -127,8 +128,8 @@ _AadM365GroupUserRemoveCommand_instances = new WeakSet(), _AadM365GroupUserRemov
127
128
  }
128
129
  return true;
129
130
  });
130
- }, _AadM365GroupUserRemoveCommand_initOptionSets = function _AadM365GroupUserRemoveCommand_initOptionSets() {
131
+ }, _EntraM365GroupUserRemoveCommand_initOptionSets = function _EntraM365GroupUserRemoveCommand_initOptionSets() {
131
132
  this.optionSets.push({ options: ['groupId', 'teamId'] });
132
133
  };
133
- export default new AadM365GroupUserRemoveCommand();
134
+ export default new EntraM365GroupUserRemoveCommand();
134
135
  //# sourceMappingURL=m365group-user-remove.js.map
@@ -3,7 +3,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
3
3
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
4
4
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
5
5
  };
6
- var _AadM365GroupUserSetCommand_instances, _AadM365GroupUserSetCommand_initTelemetry, _AadM365GroupUserSetCommand_initOptions, _AadM365GroupUserSetCommand_initValidators, _AadM365GroupUserSetCommand_initOptionSets;
6
+ var _EntraM365GroupUserSetCommand_instances, _EntraM365GroupUserSetCommand_initTelemetry, _EntraM365GroupUserSetCommand_initOptions, _EntraM365GroupUserSetCommand_initValidators, _EntraM365GroupUserSetCommand_initOptionSets;
7
7
  import request from '../../../../request.js';
8
8
  import { odata } from '../../../../utils/odata.js';
9
9
  import { validation } from '../../../../utils/validation.js';
@@ -11,7 +11,8 @@ import GraphCommand from '../../../base/GraphCommand.js';
11
11
  import teamsCommands from '../../../teams/commands.js';
12
12
  import commands from '../../commands.js';
13
13
  import { aadGroup } from '../../../../utils/aadGroup.js';
14
- class AadM365GroupUserSetCommand extends GraphCommand {
14
+ import aadCommands from '../../aadCommands.js';
15
+ class EntraM365GroupUserSetCommand extends GraphCommand {
15
16
  get name() {
16
17
  return commands.M365GROUP_USER_SET;
17
18
  }
@@ -19,15 +20,15 @@ class AadM365GroupUserSetCommand extends GraphCommand {
19
20
  return 'Updates role of the specified user in the specified Microsoft 365 Group or Microsoft Teams team';
20
21
  }
21
22
  alias() {
22
- return [teamsCommands.USER_SET];
23
+ return [teamsCommands.USER_SET, aadCommands.M365GROUP_USER_SET];
23
24
  }
24
25
  constructor() {
25
26
  super();
26
- _AadM365GroupUserSetCommand_instances.add(this);
27
- __classPrivateFieldGet(this, _AadM365GroupUserSetCommand_instances, "m", _AadM365GroupUserSetCommand_initTelemetry).call(this);
28
- __classPrivateFieldGet(this, _AadM365GroupUserSetCommand_instances, "m", _AadM365GroupUserSetCommand_initOptions).call(this);
29
- __classPrivateFieldGet(this, _AadM365GroupUserSetCommand_instances, "m", _AadM365GroupUserSetCommand_initValidators).call(this);
30
- __classPrivateFieldGet(this, _AadM365GroupUserSetCommand_instances, "m", _AadM365GroupUserSetCommand_initOptionSets).call(this);
27
+ _EntraM365GroupUserSetCommand_instances.add(this);
28
+ __classPrivateFieldGet(this, _EntraM365GroupUserSetCommand_instances, "m", _EntraM365GroupUserSetCommand_initTelemetry).call(this);
29
+ __classPrivateFieldGet(this, _EntraM365GroupUserSetCommand_instances, "m", _EntraM365GroupUserSetCommand_initOptions).call(this);
30
+ __classPrivateFieldGet(this, _EntraM365GroupUserSetCommand_instances, "m", _EntraM365GroupUserSetCommand_initValidators).call(this);
31
+ __classPrivateFieldGet(this, _EntraM365GroupUserSetCommand_instances, "m", _EntraM365GroupUserSetCommand_initOptionSets).call(this);
31
32
  }
32
33
  async commandAction(logger, args) {
33
34
  try {
@@ -118,7 +119,7 @@ class AadM365GroupUserSetCommand extends GraphCommand {
118
119
  return await odata.getAllItems(endpoint);
119
120
  }
120
121
  }
121
- _AadM365GroupUserSetCommand_instances = new WeakSet(), _AadM365GroupUserSetCommand_initTelemetry = function _AadM365GroupUserSetCommand_initTelemetry() {
122
+ _EntraM365GroupUserSetCommand_instances = new WeakSet(), _EntraM365GroupUserSetCommand_initTelemetry = function _EntraM365GroupUserSetCommand_initTelemetry() {
122
123
  this.telemetry.push((args) => {
123
124
  Object.assign(this.telemetryProperties, {
124
125
  teamId: typeof args.options.teamId !== 'undefined',
@@ -126,7 +127,7 @@ _AadM365GroupUserSetCommand_instances = new WeakSet(), _AadM365GroupUserSetComma
126
127
  role: args.options.role
127
128
  });
128
129
  });
129
- }, _AadM365GroupUserSetCommand_initOptions = function _AadM365GroupUserSetCommand_initOptions() {
130
+ }, _EntraM365GroupUserSetCommand_initOptions = function _EntraM365GroupUserSetCommand_initOptions() {
130
131
  this.options.unshift({
131
132
  option: "-i, --groupId [groupId]"
132
133
  }, {
@@ -137,7 +138,7 @@ _AadM365GroupUserSetCommand_instances = new WeakSet(), _AadM365GroupUserSetComma
137
138
  option: '-r, --role <role>',
138
139
  autocomplete: ['Owner', 'Member']
139
140
  });
140
- }, _AadM365GroupUserSetCommand_initValidators = function _AadM365GroupUserSetCommand_initValidators() {
141
+ }, _EntraM365GroupUserSetCommand_initValidators = function _EntraM365GroupUserSetCommand_initValidators() {
141
142
  this.validators.push(async (args) => {
142
143
  if (args.options.teamId && !validation.isValidGuid(args.options.teamId)) {
143
144
  return `${args.options.teamId} is not a valid GUID`;
@@ -150,8 +151,8 @@ _AadM365GroupUserSetCommand_instances = new WeakSet(), _AadM365GroupUserSetComma
150
151
  }
151
152
  return true;
152
153
  });
153
- }, _AadM365GroupUserSetCommand_initOptionSets = function _AadM365GroupUserSetCommand_initOptionSets() {
154
+ }, _EntraM365GroupUserSetCommand_initOptionSets = function _EntraM365GroupUserSetCommand_initOptionSets() {
154
155
  this.optionSets.push({ options: ['groupId', 'teamId'] });
155
156
  };
156
- export default new AadM365GroupUserSetCommand();
157
+ export default new EntraM365GroupUserSetCommand();
157
158
  //# sourceMappingURL=m365group-user-set.js.map
@@ -3,23 +3,27 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
3
3
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
4
4
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
5
5
  };
6
- var _AadOAuth2GrantAddCommand_instances, _AadOAuth2GrantAddCommand_initOptions, _AadOAuth2GrantAddCommand_initValidators;
6
+ var _EntraOAuth2GrantAddCommand_instances, _EntraOAuth2GrantAddCommand_initOptions, _EntraOAuth2GrantAddCommand_initValidators;
7
7
  import request from '../../../../request.js';
8
8
  import { validation } from '../../../../utils/validation.js';
9
9
  import GraphCommand from '../../../base/GraphCommand.js';
10
+ import aadCommands from '../../aadCommands.js';
10
11
  import commands from '../../commands.js';
11
- class AadOAuth2GrantAddCommand extends GraphCommand {
12
+ class EntraOAuth2GrantAddCommand extends GraphCommand {
12
13
  get name() {
13
14
  return commands.OAUTH2GRANT_ADD;
14
15
  }
15
16
  get description() {
16
17
  return 'Grant the specified service principal OAuth2 permissions to the specified resource';
17
18
  }
19
+ alias() {
20
+ return [aadCommands.OAUTH2GRANT_ADD];
21
+ }
18
22
  constructor() {
19
23
  super();
20
- _AadOAuth2GrantAddCommand_instances.add(this);
21
- __classPrivateFieldGet(this, _AadOAuth2GrantAddCommand_instances, "m", _AadOAuth2GrantAddCommand_initOptions).call(this);
22
- __classPrivateFieldGet(this, _AadOAuth2GrantAddCommand_instances, "m", _AadOAuth2GrantAddCommand_initValidators).call(this);
24
+ _EntraOAuth2GrantAddCommand_instances.add(this);
25
+ __classPrivateFieldGet(this, _EntraOAuth2GrantAddCommand_instances, "m", _EntraOAuth2GrantAddCommand_initOptions).call(this);
26
+ __classPrivateFieldGet(this, _EntraOAuth2GrantAddCommand_instances, "m", _EntraOAuth2GrantAddCommand_initValidators).call(this);
23
27
  }
24
28
  async commandAction(logger, args) {
25
29
  if (this.verbose) {
@@ -47,7 +51,7 @@ class AadOAuth2GrantAddCommand extends GraphCommand {
47
51
  }
48
52
  }
49
53
  }
50
- _AadOAuth2GrantAddCommand_instances = new WeakSet(), _AadOAuth2GrantAddCommand_initOptions = function _AadOAuth2GrantAddCommand_initOptions() {
54
+ _EntraOAuth2GrantAddCommand_instances = new WeakSet(), _EntraOAuth2GrantAddCommand_initOptions = function _EntraOAuth2GrantAddCommand_initOptions() {
51
55
  this.options.unshift({
52
56
  option: '-i, --clientId <clientId>'
53
57
  }, {
@@ -55,7 +59,7 @@ _AadOAuth2GrantAddCommand_instances = new WeakSet(), _AadOAuth2GrantAddCommand_i
55
59
  }, {
56
60
  option: '-s, --scope <scope>'
57
61
  });
58
- }, _AadOAuth2GrantAddCommand_initValidators = function _AadOAuth2GrantAddCommand_initValidators() {
62
+ }, _EntraOAuth2GrantAddCommand_initValidators = function _EntraOAuth2GrantAddCommand_initValidators() {
59
63
  this.validators.push(async (args) => {
60
64
  if (!validation.isValidGuid(args.options.clientId)) {
61
65
  return `${args.options.clientId} is not a valid GUID`;
@@ -66,5 +70,5 @@ _AadOAuth2GrantAddCommand_instances = new WeakSet(), _AadOAuth2GrantAddCommand_i
66
70
  return true;
67
71
  });
68
72
  };
69
- export default new AadOAuth2GrantAddCommand();
73
+ export default new EntraOAuth2GrantAddCommand();
70
74
  //# sourceMappingURL=oauth2grant-add.js.map