@pnp/cli-microsoft365 7.4.0-beta.fce7b64 → 7.5.0-beta.494c631

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 (282) hide show
  1. package/.eslintrc.cjs +7 -0
  2. package/README.md +1 -1
  3. package/allCommands.json +1 -1
  4. package/allCommandsFull.json +1 -1
  5. package/dist/Auth.js +2 -1
  6. package/dist/appInsights.js +2 -0
  7. package/dist/cli/cli.js +1 -0
  8. package/dist/m365/app/commands/app-get.js +1 -1
  9. package/dist/m365/app/commands/permission/permission-list.js +1 -1
  10. package/dist/m365/{aad/commands.js → entra/aadCommands.js} +2 -1
  11. package/dist/m365/{aad → entra}/commands/administrativeunit/administrativeunit-add.js +12 -8
  12. package/dist/m365/{aad → entra}/commands/administrativeunit/administrativeunit-get.js +18 -14
  13. package/dist/m365/{aad → entra}/commands/administrativeunit/administrativeunit-list.js +6 -2
  14. package/dist/m365/{aad → entra}/commands/administrativeunit/administrativeunit-member-add.js +16 -12
  15. package/dist/m365/{aad → entra}/commands/administrativeunit/administrativeunit-member-get.js +16 -12
  16. package/dist/m365/{aad → entra}/commands/administrativeunit/administrativeunit-member-list.js +16 -12
  17. package/dist/m365/{aad → entra}/commands/administrativeunit/administrativeunit-remove.js +18 -14
  18. package/dist/m365/entra/commands/administrativeunit/administrativeunit-roleassignment-add.js +102 -0
  19. package/dist/m365/{aad → entra}/commands/app/app-add.js +25 -21
  20. package/dist/m365/{aad → entra}/commands/app/app-get.js +17 -13
  21. package/dist/m365/{aad → entra}/commands/app/app-list.js +7 -3
  22. package/dist/m365/{aad → entra}/commands/app/app-permission-add.js +16 -12
  23. package/dist/m365/{aad → entra}/commands/app/app-remove.js +17 -13
  24. package/dist/m365/{aad → entra}/commands/app/app-role-add.js +18 -14
  25. package/dist/m365/{aad → entra}/commands/app/app-role-list.js +15 -11
  26. package/dist/m365/{aad → entra}/commands/app/app-role-remove.js +17 -13
  27. package/dist/m365/{aad → entra}/commands/app/app-set.js +18 -14
  28. package/dist/m365/{aad → entra}/commands/approleassignment/approleassignment-add.js +17 -13
  29. package/dist/m365/{aad → entra}/commands/approleassignment/approleassignment-list.js +16 -12
  30. package/dist/m365/{aad → entra}/commands/approleassignment/approleassignment-remove.js +17 -13
  31. package/dist/m365/{aad → entra}/commands/group/group-get.js +17 -13
  32. package/dist/m365/{aad → entra}/commands/group/group-list.js +16 -12
  33. package/dist/m365/{aad → entra}/commands/group/group-remove.js +19 -15
  34. package/dist/m365/{aad → entra}/commands/group/group-user-list.js +17 -13
  35. package/dist/m365/{aad → entra}/commands/groupsetting/groupsetting-add.js +12 -8
  36. package/dist/m365/{aad → entra}/commands/groupsetting/groupsetting-get.js +12 -8
  37. package/dist/m365/{aad → entra}/commands/groupsetting/groupsetting-list.js +7 -3
  38. package/dist/m365/{aad → entra}/commands/groupsetting/groupsetting-remove.js +14 -10
  39. package/dist/m365/{aad → entra}/commands/groupsetting/groupsetting-set.js +12 -8
  40. package/dist/m365/{aad → entra}/commands/groupsettingtemplate/groupsettingtemplate-get.js +17 -13
  41. package/dist/m365/{aad → entra}/commands/groupsettingtemplate/groupsettingtemplate-list.js +7 -3
  42. package/dist/m365/{aad → entra}/commands/license/license-list.js +6 -2
  43. package/dist/m365/{aad → entra}/commands/m365group/m365group-add.js +19 -15
  44. package/dist/m365/{aad → entra}/commands/m365group/m365group-conversation-list.js +12 -8
  45. package/dist/m365/{aad → entra}/commands/m365group/m365group-conversation-post-list.js +16 -12
  46. package/dist/m365/{aad → entra}/commands/m365group/m365group-get.js +12 -8
  47. package/dist/m365/{aad → entra}/commands/m365group/m365group-list.js +12 -8
  48. package/dist/m365/{aad → entra}/commands/m365group/m365group-recyclebinitem-clear.js +12 -8
  49. package/dist/m365/{aad → entra}/commands/m365group/m365group-recyclebinitem-list.js +12 -8
  50. package/dist/m365/{aad → entra}/commands/m365group/m365group-recyclebinitem-remove.js +16 -12
  51. package/dist/m365/{aad → entra}/commands/m365group/m365group-recyclebinitem-restore.js +16 -12
  52. package/dist/m365/{aad → entra}/commands/m365group/m365group-remove.js +17 -13
  53. package/dist/m365/{aad → entra}/commands/m365group/m365group-renew.js +12 -8
  54. package/dist/m365/{aad → entra}/commands/m365group/m365group-report-activitycounts.js +4 -0
  55. package/dist/m365/{aad → entra}/commands/m365group/m365group-report-activitydetail.js +4 -0
  56. package/dist/m365/{aad → entra}/commands/m365group/m365group-report-activityfilecounts.js +4 -0
  57. package/dist/m365/{aad → entra}/commands/m365group/m365group-report-activitygroupcounts.js +4 -0
  58. package/dist/m365/{aad → entra}/commands/m365group/m365group-report-activitystorage.js +4 -0
  59. package/dist/m365/{aad → entra}/commands/m365group/m365group-set.js +19 -15
  60. package/dist/m365/{aad → entra}/commands/m365group/m365group-teamify.js +16 -12
  61. package/dist/m365/{aad → entra}/commands/m365group/m365group-user-add.js +14 -13
  62. package/dist/m365/entra/commands/m365group/m365group-user-list.js +154 -0
  63. package/dist/m365/{aad → entra}/commands/m365group/m365group-user-remove.js +14 -13
  64. package/dist/m365/{aad → entra}/commands/m365group/m365group-user-set.js +14 -13
  65. package/dist/m365/{aad → entra}/commands/oauth2grant/oauth2grant-add.js +12 -8
  66. package/dist/m365/{aad → entra}/commands/oauth2grant/oauth2grant-list.js +12 -8
  67. package/dist/m365/{aad → entra}/commands/oauth2grant/oauth2grant-remove.js +10 -6
  68. package/dist/m365/{aad → entra}/commands/oauth2grant/oauth2grant-set.js +10 -6
  69. package/dist/m365/{aad → entra}/commands/policy/policy-list.js +16 -12
  70. package/dist/m365/{aad → entra}/commands/siteclassification/siteclassification-disable.js +12 -8
  71. package/dist/m365/{aad → entra}/commands/siteclassification/siteclassification-enable.js +12 -8
  72. package/dist/m365/{aad → entra}/commands/siteclassification/siteclassification-get.js +6 -2
  73. package/dist/m365/{aad → entra}/commands/siteclassification/siteclassification-set.js +14 -10
  74. package/dist/m365/{aad → entra}/commands/sp/sp-add.js +17 -13
  75. package/dist/m365/{aad → entra}/commands/sp/sp-get.js +16 -12
  76. package/dist/m365/{aad → entra}/commands/sp/sp-list.js +12 -8
  77. package/dist/m365/{aad → entra}/commands/user/user-add.js +18 -14
  78. package/dist/m365/{aad → entra}/commands/user/user-get.js +16 -12
  79. package/dist/m365/{aad → entra}/commands/user/user-guest-add.js +12 -8
  80. package/dist/m365/{aad → entra}/commands/user/user-hibp.js +14 -10
  81. package/dist/m365/{aad → entra}/commands/user/user-license-add.js +16 -12
  82. package/dist/m365/{aad → entra}/commands/user/user-license-list.js +16 -12
  83. package/dist/m365/{aad → entra}/commands/user/user-license-remove.js +16 -12
  84. package/dist/m365/{aad → entra}/commands/user/user-list.js +12 -8
  85. package/dist/m365/{aad → entra}/commands/user/user-password-validate.js +10 -6
  86. package/dist/m365/{aad → entra}/commands/user/user-recyclebinitem-clear.js +12 -8
  87. package/dist/m365/{aad → entra}/commands/user/user-recyclebinitem-list.js +6 -2
  88. package/dist/m365/{aad → entra}/commands/user/user-recyclebinitem-remove.js +14 -10
  89. package/dist/m365/{aad → entra}/commands/user/user-recyclebinitem-restore.js +12 -8
  90. package/dist/m365/{aad → entra}/commands/user/user-remove.js +16 -12
  91. package/dist/m365/{aad → entra}/commands/user/user-set.js +18 -14
  92. package/dist/m365/{aad → entra}/commands/user/user-signin-list.js +15 -11
  93. package/dist/m365/entra/commands.js +86 -0
  94. package/dist/m365/external/commands/connection/connection-urltoitemresolver-add.js +69 -0
  95. package/dist/m365/external/commands.js +1 -0
  96. package/dist/m365/flow/commands/run/run-get.js +52 -13
  97. package/dist/m365/pa/commands/app/app-get.js +26 -11
  98. package/dist/m365/pa/commands/app/app-remove.js +19 -2
  99. package/dist/m365/spo/commands/file/file-add.js +12 -8
  100. package/dist/m365/spo/commands/file/file-checkin.js +4 -1
  101. package/dist/m365/spo/commands/file/file-checkout-undo.js +5 -1
  102. package/dist/m365/spo/commands/file/file-checkout.js +4 -1
  103. package/dist/m365/spo/commands/file/file-copy.js +5 -1
  104. package/dist/m365/spo/commands/file/file-get.js +5 -1
  105. package/dist/m365/spo/commands/file/file-list.js +5 -1
  106. package/dist/m365/spo/commands/file/file-move.js +5 -1
  107. package/dist/m365/spo/commands/file/file-remove.js +5 -1
  108. package/dist/m365/spo/commands/file/file-rename.js +5 -1
  109. package/dist/m365/spo/commands/file/file-retentionlabel-ensure.js +4 -1
  110. package/dist/m365/spo/commands/file/file-retentionlabel-remove.js +5 -1
  111. package/dist/m365/spo/commands/file/file-roleassignment-add.js +4 -1
  112. package/dist/m365/spo/commands/file/file-roleassignment-remove.js +5 -1
  113. package/dist/m365/spo/commands/file/file-roleinheritance-break.js +5 -1
  114. package/dist/m365/spo/commands/file/file-roleinheritance-reset.js +5 -1
  115. package/dist/m365/spo/commands/file/file-sharinginfo-get.js +6 -3
  116. package/dist/m365/spo/commands/file/file-sharinglink-add.js +4 -1
  117. package/dist/m365/spo/commands/file/file-sharinglink-clear.js +5 -1
  118. package/dist/m365/spo/commands/file/file-sharinglink-get.js +4 -1
  119. package/dist/m365/spo/commands/file/file-sharinglink-list.js +4 -1
  120. package/dist/m365/spo/commands/file/file-sharinglink-remove.js +5 -1
  121. package/dist/m365/spo/commands/file/file-sharinglink-set.js +4 -1
  122. package/dist/m365/spo/commands/file/file-version-clear.js +6 -2
  123. package/dist/m365/spo/commands/file/file-version-get.js +1 -1
  124. package/dist/m365/spo/commands/file/file-version-list.js +4 -1
  125. package/dist/m365/spo/commands/file/file-version-remove.js +2 -1
  126. package/dist/m365/spo/commands/file/file-version-restore.js +2 -1
  127. package/dist/m365/spo/commands/folder/folder-add.js +4 -1
  128. package/dist/m365/spo/commands/folder/folder-copy.js +5 -1
  129. package/dist/m365/spo/commands/folder/folder-get.js +4 -1
  130. package/dist/m365/spo/commands/folder/folder-list.js +6 -2
  131. package/dist/m365/spo/commands/folder/folder-move.js +5 -1
  132. package/dist/m365/spo/commands/folder/folder-remove.js +5 -1
  133. package/dist/m365/spo/commands/folder/folder-rename.js +4 -1
  134. package/dist/m365/spo/commands/folder/folder-retentionlabel-ensure.js +4 -1
  135. package/dist/m365/spo/commands/folder/folder-retentionlabel-remove.js +5 -1
  136. package/dist/m365/spo/commands/folder/folder-roleassignment-add.js +4 -1
  137. package/dist/m365/spo/commands/folder/folder-roleassignment-remove.js +6 -2
  138. package/dist/m365/spo/commands/folder/folder-roleinheritance-break.js +5 -1
  139. package/dist/m365/spo/commands/folder/folder-roleinheritance-reset.js +5 -1
  140. package/dist/m365/spo/commands/group/group-member-add.js +21 -4
  141. package/dist/m365/spo/commands/group/group-member-remove.js +28 -11
  142. package/dist/m365/spo/commands/group/group-set.js +1 -1
  143. package/dist/m365/spo/commands/site/site-set.js +1 -1
  144. package/dist/m365/spo/commands/user/user-ensure.js +16 -6
  145. package/dist/m365/teams/commands/app/app-install.js +1 -1
  146. package/dist/m365/teams/commands/meeting/meeting-attendancereport-list.js +1 -1
  147. package/dist/m365/teams/commands/user/user-app-add.js +35 -3
  148. package/dist/request.js +16 -0
  149. package/dist/utils/md.js +2 -2
  150. package/dist/utils/roleAssignment.js +42 -0
  151. package/dist/utils/roleDefinition.js +24 -0
  152. package/docs/docs/cmd/adaptivecard/adaptivecard-send.mdx +1 -1
  153. package/docs/docs/cmd/{aad → entra}/administrativeunit/administrativeunit-add.mdx +10 -4
  154. package/docs/docs/cmd/{aad → entra}/administrativeunit/administrativeunit-get.mdx +9 -3
  155. package/docs/docs/cmd/{aad → entra}/administrativeunit/administrativeunit-list.mdx +9 -3
  156. package/docs/docs/cmd/{aad → entra}/administrativeunit/administrativeunit-member-add.mdx +13 -7
  157. package/docs/docs/cmd/{aad → entra}/administrativeunit/administrativeunit-member-get.mdx +9 -3
  158. package/docs/docs/cmd/{aad → entra}/administrativeunit/administrativeunit-member-list.mdx +16 -10
  159. package/docs/docs/cmd/{aad → entra}/administrativeunit/administrativeunit-remove.mdx +9 -3
  160. package/docs/docs/cmd/entra/administrativeunit/administrativeunit-roleassignment-add.mdx +116 -0
  161. package/docs/docs/cmd/{aad → entra}/app/app-add.mdx +44 -38
  162. package/docs/docs/cmd/{aad → entra}/app/app-get.mdx +23 -17
  163. package/docs/docs/cmd/{aad → entra}/app/app-list.mdx +11 -5
  164. package/docs/docs/cmd/entra/app/app-permission-add.mdx +68 -0
  165. package/docs/docs/cmd/entra/app/app-remove.mdx +65 -0
  166. package/docs/docs/cmd/entra/app/app-role-add.mdx +74 -0
  167. package/docs/docs/cmd/{aad → entra}/app/app-role-list.mdx +20 -14
  168. package/docs/docs/cmd/entra/app/app-role-remove.mdx +84 -0
  169. package/docs/docs/cmd/entra/app/app-set.mdx +103 -0
  170. package/docs/docs/cmd/{aad → entra}/approleassignment/approleassignment-add.mdx +14 -8
  171. package/docs/docs/cmd/{aad → entra}/approleassignment/approleassignment-list.mdx +12 -6
  172. package/docs/docs/cmd/{aad → entra}/approleassignment/approleassignment-remove.mdx +13 -7
  173. package/docs/docs/cmd/{aad → entra}/group/group-get.mdx +15 -9
  174. package/docs/docs/cmd/{aad → entra}/group/group-list.mdx +13 -7
  175. package/docs/docs/cmd/entra/group/group-remove.mdx +50 -0
  176. package/docs/docs/cmd/{aad → entra}/group/group-user-list.mdx +17 -11
  177. package/docs/docs/cmd/{aad → entra}/groupsetting/groupsetting-add.mdx +11 -5
  178. package/docs/docs/cmd/{aad → entra}/groupsetting/groupsetting-get.mdx +9 -3
  179. package/docs/docs/cmd/{aad → entra}/groupsetting/groupsetting-list.mdx +10 -4
  180. package/docs/docs/cmd/{aad → entra}/groupsetting/groupsetting-remove.mdx +9 -3
  181. package/docs/docs/cmd/{aad → entra}/groupsetting/groupsetting-set.mdx +10 -4
  182. package/docs/docs/cmd/{aad → entra}/groupsettingtemplate/groupsettingtemplate-get.mdx +11 -5
  183. package/docs/docs/cmd/{aad → entra}/groupsettingtemplate/groupsettingtemplate-list.mdx +10 -4
  184. package/docs/docs/cmd/{aad → entra}/license/license-list.mdx +9 -3
  185. package/docs/docs/cmd/{aad → entra}/m365group/m365group-add.mdx +17 -11
  186. package/docs/docs/cmd/{aad → entra}/m365group/m365group-conversation-list.mdx +9 -3
  187. package/docs/docs/cmd/{aad → entra}/m365group/m365group-conversation-post-list.mdx +10 -4
  188. package/docs/docs/cmd/{aad → entra}/m365group/m365group-get.mdx +10 -4
  189. package/docs/docs/cmd/{aad → entra}/m365group/m365group-list.mdx +13 -7
  190. package/docs/docs/cmd/{aad → entra}/m365group/m365group-recyclebinitem-clear.mdx +9 -3
  191. package/docs/docs/cmd/{aad → entra}/m365group/m365group-recyclebinitem-list.mdx +12 -6
  192. package/docs/docs/cmd/{aad → entra}/m365group/m365group-recyclebinitem-remove.mdx +10 -4
  193. package/docs/docs/cmd/{aad → entra}/m365group/m365group-recyclebinitem-restore.mdx +10 -4
  194. package/docs/docs/cmd/{aad → entra}/m365group/m365group-remove.mdx +10 -4
  195. package/docs/docs/cmd/{aad → entra}/m365group/m365group-renew.mdx +8 -2
  196. package/docs/docs/cmd/{aad → entra}/m365group/m365group-report-activitycounts.mdx +10 -4
  197. package/docs/docs/cmd/{aad → entra}/m365group/m365group-report-activitydetail.mdx +11 -5
  198. package/docs/docs/cmd/{aad → entra}/m365group/m365group-report-activityfilecounts.mdx +10 -4
  199. package/docs/docs/cmd/{aad → entra}/m365group/m365group-report-activitygroupcounts.mdx +10 -4
  200. package/docs/docs/cmd/{aad → entra}/m365group/m365group-report-activitystorage.mdx +10 -4
  201. package/docs/docs/cmd/{aad → entra}/m365group/m365group-set.mdx +12 -6
  202. package/docs/docs/cmd/{aad → entra}/m365group/m365group-teamify.mdx +9 -3
  203. package/docs/docs/cmd/{aad → entra}/m365group/m365group-user-add.mdx +9 -3
  204. package/docs/docs/cmd/entra/m365group/m365group-user-list.mdx +131 -0
  205. package/docs/docs/cmd/{aad → entra}/m365group/m365group-user-remove.mdx +9 -5
  206. package/docs/docs/cmd/{aad → entra}/m365group/m365group-user-set.mdx +10 -6
  207. package/docs/docs/cmd/{aad → entra}/oauth2grant/oauth2grant-add.mdx +15 -9
  208. package/docs/docs/cmd/{aad → entra}/oauth2grant/oauth2grant-list.mdx +11 -5
  209. package/docs/docs/cmd/{aad → entra}/oauth2grant/oauth2grant-remove.mdx +13 -7
  210. package/docs/docs/cmd/{aad → entra}/oauth2grant/oauth2grant-set.mdx +12 -6
  211. package/docs/docs/cmd/{aad → entra}/policy/policy-list.mdx +14 -8
  212. package/docs/docs/cmd/{aad → entra}/siteclassification/siteclassification-disable.mdx +9 -3
  213. package/docs/docs/cmd/{aad → entra}/siteclassification/siteclassification-enable.mdx +10 -4
  214. package/docs/docs/cmd/{aad → entra}/siteclassification/siteclassification-get.mdx +9 -3
  215. package/docs/docs/cmd/{aad → entra}/siteclassification/siteclassification-set.mdx +11 -5
  216. package/docs/docs/cmd/{aad → entra}/sp/sp-add.mdx +25 -19
  217. package/docs/docs/cmd/{aad → entra}/sp/sp-get.mdx +12 -6
  218. package/docs/docs/cmd/{aad → entra}/sp/sp-list.mdx +10 -4
  219. package/docs/docs/cmd/{aad → entra}/user/user-add.mdx +12 -6
  220. package/docs/docs/cmd/{aad → entra}/user/user-get.mdx +16 -10
  221. package/docs/docs/cmd/{aad → entra}/user/user-guest-add.mdx +11 -5
  222. package/docs/docs/cmd/{aad → entra}/user/user-hibp.mdx +10 -4
  223. package/docs/docs/cmd/{aad → entra}/user/user-license-add.mdx +10 -4
  224. package/docs/docs/cmd/{aad → entra}/user/user-license-list.mdx +11 -5
  225. package/docs/docs/cmd/{aad → entra}/user/user-license-remove.mdx +9 -3
  226. package/docs/docs/cmd/{aad → entra}/user/user-list.mdx +12 -6
  227. package/docs/docs/cmd/{aad → entra}/user/user-password-validate.mdx +9 -3
  228. package/docs/docs/cmd/{aad → entra}/user/user-recyclebinitem-clear.mdx +9 -3
  229. package/docs/docs/cmd/{aad → entra}/user/user-recyclebinitem-list.mdx +9 -3
  230. package/docs/docs/cmd/{aad → entra}/user/user-recyclebinitem-remove.mdx +9 -3
  231. package/docs/docs/cmd/{aad → entra}/user/user-recyclebinitem-restore.mdx +8 -2
  232. package/docs/docs/cmd/{aad → entra}/user/user-remove.mdx +9 -3
  233. package/docs/docs/cmd/{aad → entra}/user/user-set.mdx +15 -9
  234. package/docs/docs/cmd/{aad → entra}/user/user-signin-list.mdx +19 -13
  235. package/docs/docs/cmd/external/connection/connection-urltoitemresolver-add.mdx +47 -0
  236. package/docs/docs/cmd/flow/run/run-get.mdx +167 -4
  237. package/docs/docs/cmd/graph/schemaextension/schemaextension-add.mdx +1 -1
  238. package/docs/docs/cmd/graph/schemaextension/schemaextension-set.mdx +1 -1
  239. package/docs/docs/cmd/pa/app/app-get.mdx +15 -0
  240. package/docs/docs/cmd/pa/app/app-remove.mdx +14 -0
  241. package/docs/docs/cmd/planner/plan/plan-add.mdx +1 -1
  242. package/docs/docs/cmd/spo/applicationcustomizer/applicationcustomizer-add.mdx +1 -1
  243. package/docs/docs/cmd/spo/applicationcustomizer/applicationcustomizer-set.mdx +1 -1
  244. package/docs/docs/cmd/spo/commandset/commandset-add.mdx +1 -1
  245. package/docs/docs/cmd/spo/commandset/commandset-set.mdx +1 -1
  246. package/docs/docs/cmd/spo/contenttype/contenttype-set.mdx +1 -1
  247. package/docs/docs/cmd/spo/customaction/customaction-add.mdx +1 -1
  248. package/docs/docs/cmd/spo/customaction/customaction-set.mdx +1 -1
  249. package/docs/docs/cmd/spo/field/field-set.mdx +1 -1
  250. package/docs/docs/cmd/spo/group/group-member-add.mdx +19 -7
  251. package/docs/docs/cmd/spo/group/group-member-remove.mdx +12 -6
  252. package/docs/docs/cmd/spo/list/list-view-set.mdx +1 -1
  253. package/docs/docs/cmd/spo/listitem/listitem-add.mdx +1 -1
  254. package/docs/docs/cmd/spo/listitem/listitem-batch-add.mdx +1 -1
  255. package/docs/docs/cmd/spo/listitem/listitem-set.mdx +1 -1
  256. package/docs/docs/cmd/spo/page/page-clientsidewebpart-add.mdx +1 -1
  257. package/docs/docs/cmd/spo/page/page-control-set.mdx +1 -1
  258. package/docs/docs/cmd/spo/page/page-set.mdx +2 -2
  259. package/docs/docs/cmd/spo/site/site-add.mdx +1 -1
  260. package/docs/docs/cmd/spo/tenant/tenant-applicationcustomizer-add.mdx +1 -1
  261. package/docs/docs/cmd/spo/tenant/tenant-applicationcustomizer-set.mdx +1 -1
  262. package/docs/docs/cmd/spo/tenant/tenant-commandset-add.mdx +1 -1
  263. package/docs/docs/cmd/spo/tenant/tenant-commandset-set.mdx +1 -1
  264. package/docs/docs/cmd/spo/term/term-add.mdx +1 -1
  265. package/docs/docs/cmd/spo/term/term-group-add.mdx +1 -1
  266. package/docs/docs/cmd/spo/term/term-set-add.mdx +1 -1
  267. package/docs/docs/cmd/spo/user/user-ensure.mdx +8 -5
  268. package/docs/docs/cmd/teams/team/team-add.mdx +1 -1
  269. package/docs/docs/cmd/teams/user/user-app-add.mdx +8 -5
  270. package/npm-shrinkwrap.json +186 -432
  271. package/package.json +9 -9
  272. package/dist/m365/aad/commands/m365group/m365group-user-list.js +0 -94
  273. package/docs/docs/cmd/aad/app/app-permission-add.mdx +0 -62
  274. package/docs/docs/cmd/aad/app/app-remove.mdx +0 -59
  275. package/docs/docs/cmd/aad/app/app-role-add.mdx +0 -68
  276. package/docs/docs/cmd/aad/app/app-role-remove.mdx +0 -78
  277. package/docs/docs/cmd/aad/app/app-set.mdx +0 -97
  278. package/docs/docs/cmd/aad/group/group-remove.mdx +0 -44
  279. package/docs/docs/cmd/aad/m365group/m365group-user-list.mdx +0 -99
  280. /package/dist/m365/{aad → entra}/commands/approleassignment/ServicePrincipal.js +0 -0
  281. /package/dist/m365/{aad → entra}/commands/m365group/GroupExtended.js +0 -0
  282. /package/dist/m365/{aad → entra}/commands/siteclassification/SiteClassificationSettings.js +0 -0
@@ -4,6 +4,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
4
4
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
5
5
  };
6
6
  var _TeamsUserAppAddCommand_instances, _TeamsUserAppAddCommand_initTelemetry, _TeamsUserAppAddCommand_initOptions, _TeamsUserAppAddCommand_initValidators, _TeamsUserAppAddCommand_initOptionSets;
7
+ import { cli } from '../../../../cli/cli.js';
7
8
  import request from '../../../../request.js';
8
9
  import { formatting } from '../../../../utils/formatting.js';
9
10
  import { validation } from '../../../../utils/validation.js';
@@ -25,8 +26,12 @@ class TeamsUserAppAddCommand extends GraphCommand {
25
26
  __classPrivateFieldGet(this, _TeamsUserAppAddCommand_instances, "m", _TeamsUserAppAddCommand_initOptionSets).call(this);
26
27
  }
27
28
  async commandAction(logger, args) {
29
+ const appId = await this.getAppId(args);
28
30
  const userId = (args.options.userId ?? args.options.userName);
29
31
  const endpoint = `${this.resource}/v1.0`;
32
+ if (this.verbose) {
33
+ await logger.logToStderr(`Removing app with ID ${appId} for user ${args.options.userId}`);
34
+ }
30
35
  const requestOptions = {
31
36
  url: `${endpoint}/users/${formatting.encodeQueryParameter(userId)}/teamwork/installedApps`,
32
37
  headers: {
@@ -35,7 +40,7 @@ class TeamsUserAppAddCommand extends GraphCommand {
35
40
  },
36
41
  responseType: 'json',
37
42
  data: {
38
- 'teamsApp@odata.bind': `${endpoint}/appCatalogs/teamsApps/${args.options.id}`
43
+ 'teamsApp@odata.bind': `${endpoint}/appCatalogs/teamsApps/${appId}`
39
44
  }
40
45
  };
41
46
  try {
@@ -45,17 +50,43 @@ class TeamsUserAppAddCommand extends GraphCommand {
45
50
  this.handleRejectedODataJsonPromise(err);
46
51
  }
47
52
  }
53
+ async getAppId(args) {
54
+ if (args.options.id) {
55
+ return args.options.id;
56
+ }
57
+ const requestOptions = {
58
+ url: `${this.resource}/v1.0/appCatalogs/teamsApps?$filter=displayName eq '${formatting.encodeQueryParameter(args.options.name)}'`,
59
+ headers: {
60
+ accept: 'application/json;odata.metadata=none'
61
+ },
62
+ responseType: 'json'
63
+ };
64
+ const response = await request.get(requestOptions);
65
+ if (response.value.length === 1) {
66
+ return response.value[0].id;
67
+ }
68
+ if (response.value.length === 0) {
69
+ throw `The specified Teams app does not exist`;
70
+ }
71
+ const resultAsKeyValuePair = formatting.convertArrayToHashTable('id', response.value);
72
+ const result = (await cli.handleMultipleResultsFound(`Multiple Teams apps with name '${args.options.name}' found.`, resultAsKeyValuePair));
73
+ return result.id;
74
+ }
48
75
  }
49
76
  _TeamsUserAppAddCommand_instances = new WeakSet(), _TeamsUserAppAddCommand_initTelemetry = function _TeamsUserAppAddCommand_initTelemetry() {
50
77
  this.telemetry.push((args) => {
51
78
  Object.assign(this.telemetryProperties, {
79
+ id: typeof args.options.id !== 'undefined',
80
+ name: typeof args.options.name !== 'undefined',
52
81
  userId: typeof args.options.userId !== 'undefined',
53
82
  userName: typeof args.options.userName !== 'undefined'
54
83
  });
55
84
  });
56
85
  }, _TeamsUserAppAddCommand_initOptions = function _TeamsUserAppAddCommand_initOptions() {
57
86
  this.options.unshift({
58
- option: '--id <id>'
87
+ option: '--id [id]'
88
+ }, {
89
+ option: '--name [name]'
59
90
  }, {
60
91
  option: '--userId [userId]'
61
92
  }, {
@@ -63,7 +94,7 @@ _TeamsUserAppAddCommand_instances = new WeakSet(), _TeamsUserAppAddCommand_initT
63
94
  });
64
95
  }, _TeamsUserAppAddCommand_initValidators = function _TeamsUserAppAddCommand_initValidators() {
65
96
  this.validators.push(async (args) => {
66
- if (!validation.isValidGuid(args.options.id)) {
97
+ if (args.options.id && !validation.isValidGuid(args.options.id)) {
67
98
  return `${args.options.id} is not a valid GUID`;
68
99
  }
69
100
  if (args.options.userId && !validation.isValidGuid(args.options.userId)) {
@@ -75,6 +106,7 @@ _TeamsUserAppAddCommand_instances = new WeakSet(), _TeamsUserAppAddCommand_initT
75
106
  return true;
76
107
  });
77
108
  }, _TeamsUserAppAddCommand_initOptionSets = function _TeamsUserAppAddCommand_initOptionSets() {
109
+ this.optionSets.push({ options: ['id', 'name'] });
78
110
  this.optionSets.push({ options: ['userId', 'userName'] });
79
111
  };
80
112
  export default new TeamsUserAppAddCommand();
package/dist/request.js CHANGED
@@ -154,6 +154,10 @@ class Request {
154
154
  options.headers.authorization = `Bearer ${accessToken}`;
155
155
  }
156
156
  }
157
+ const proxyUrl = process.env.HTTP_PROXY || process.env.HTTPS_PROXY;
158
+ if (proxyUrl) {
159
+ options.proxy = this.createProxyConfigFromUrl(proxyUrl);
160
+ }
157
161
  return this.req(options);
158
162
  })
159
163
  .then((res) => {
@@ -199,6 +203,18 @@ class Request {
199
203
  const cloudUrl = Auth.getEndpointForResource(hostname, cloudType);
200
204
  options.url = options.url.replace(hostname, cloudUrl);
201
205
  }
206
+ createProxyConfigFromUrl(url) {
207
+ const parsedUrl = new URL(url);
208
+ const port = parsedUrl.port || (url.toLowerCase().startsWith('https') ? 443 : 80);
209
+ let authObject = null;
210
+ if (parsedUrl.username && parsedUrl.password) {
211
+ authObject = {
212
+ username: parsedUrl.username,
213
+ password: parsedUrl.password
214
+ };
215
+ }
216
+ return { host: parsedUrl.hostname, port: Number(port), protocol: 'http', ...(authObject && { auth: authObject }) };
217
+ }
202
218
  }
203
219
  export default new Request();
204
220
  //# sourceMappingURL=request.js.map
package/dist/utils/md.js CHANGED
@@ -13,8 +13,8 @@ function convertHeadings(md) {
13
13
  });
14
14
  }
15
15
  function convertAdmonitions(md) {
16
- const regex = new RegExp(/^:::(\w+)([\s\S]*?):::$/, 'gm');
17
- return md.replace(regex, (_, label, content) => label.toLocaleUpperCase() + EOL + EOL + content.trim());
16
+ const regex = new RegExp(/^:::(\w+)(?:\[([^\]]+)\])?([\s\S]*?):::$/, 'gm');
17
+ return md.replace(regex, (_, label, title, content) => label.toLocaleUpperCase() + (title ? EOL + EOL + title : '') + EOL + EOL + content.trim());
18
18
  }
19
19
  function includeContent(md, rootFolder) {
20
20
  const mdxImports = [
@@ -0,0 +1,42 @@
1
+ import request from '../request.js';
2
+ const getRequestOptions = (roleDefinitionId, principalId, directoryScopeId) => ({
3
+ url: `https://graph.microsoft.com/v1.0/roleManagement/directory/roleAssignments`,
4
+ headers: {
5
+ accept: 'application/json;odata.metadata=none'
6
+ },
7
+ responseType: 'json',
8
+ data: {
9
+ roleDefinitionId: roleDefinitionId,
10
+ principalId: principalId,
11
+ directoryScopeId: directoryScopeId
12
+ }
13
+ });
14
+ /**
15
+ * Utils for RBAC.
16
+ * Supported RBAC providers:
17
+ * - Directory (Entra ID)
18
+ */
19
+ export const roleAssignment = {
20
+ /**
21
+ * Assigns a specific role to a principal with scope to an administrative unit
22
+ * @param roleDefinitionId Role which lists the actions that can be performed
23
+ * @param principalId Object that represents a user, group, service principal, or managed identity that is requesting access to resources
24
+ * @param administrativeUnitId Administrative unit which represents a current scope for a role assignment
25
+ * @returns Returns unified role assignment object that represents a role definition assigned to a principal with scope to an administrative unit
26
+ */
27
+ async createRoleAssignmentWithAdministrativeUnitScope(roleDefinitionId, principalId, administrativeUnitId) {
28
+ const requestOptions = getRequestOptions(roleDefinitionId, principalId, `/administrativeUnits/${administrativeUnitId}`);
29
+ return await request.post(requestOptions);
30
+ },
31
+ /**
32
+ * Assigns a specific role to a principal with scope to the whole tenant
33
+ * @param roleDefinitionId Role which lists the actions that can be performed
34
+ * @param principalId Object that represents a user, group, service principal, or managed identity that is requesting access to resources
35
+ * @returns Returns unified role assignment object that represents a role definition assigned to a principal with scope to the whole tenant
36
+ */
37
+ async createRoleAssignmentWithTenantScope(roleDefinitionId, principalId) {
38
+ const requestOptions = getRequestOptions(roleDefinitionId, principalId, '/');
39
+ return await request.post(requestOptions);
40
+ }
41
+ };
42
+ //# sourceMappingURL=roleAssignment.js.map
@@ -0,0 +1,24 @@
1
+ import { cli } from '../cli/cli.js';
2
+ import { formatting } from './formatting.js';
3
+ import { odata } from './odata.js';
4
+ export const roleDefinition = {
5
+ /**
6
+ * Get a directory (Microsoft Entra) role
7
+ * @param displayName Role definition display name.
8
+ * @returns The role definition.
9
+ * @throws Error when role definition was not found.
10
+ */
11
+ async getRoleDefinitionByDisplayName(displayName) {
12
+ const roleDefinitions = await odata.getAllItems(`https://graph.microsoft.com/v1.0/roleManagement/directory/roleDefinitions?$filter=displayName eq '${formatting.encodeQueryParameter(displayName)}'`);
13
+ if (roleDefinitions.length === 0) {
14
+ throw `The specified role definition '${displayName}' does not exist.`;
15
+ }
16
+ if (roleDefinitions.length > 1) {
17
+ const resultAsKeyValuePair = formatting.convertArrayToHashTable('id', roleDefinitions);
18
+ const selectedRoleDefinition = await cli.handleMultipleResultsFound(`Multiple role definitions with name '${displayName}' found.`, resultAsKeyValuePair);
19
+ return selectedRoleDefinition;
20
+ }
21
+ return roleDefinitions[0];
22
+ }
23
+ };
24
+ //# sourceMappingURL=roleDefinition.js.map
@@ -47,7 +47,7 @@ The predefined card is automatically adjusted based on which options have been s
47
47
 
48
48
  If your custom card is a card template (card with placeholders like `${title}`), you can fill it with data either by specifying the complete data object using the `cardData` option, or by passing any number of arbitrary options that will be mapped onto the card. The arbitrary properties should not match any of the global options like `output`, `query`, `debug`, etc. Data options like `title`, `description`, `imageUrl` and `actionUrl` will be mapped onto the card as well.
49
49
 
50
- :::warning Escaping JSON in PowerShell
50
+ :::warning[Escaping JSON in PowerShell]
51
51
 
52
52
  When using the `--card` and `--cardData` options it's possible to enter a JSON string. In PowerShell 5 to 7.2 [specific escaping rules](./../../user-guide/using-cli.mdx#escaping-double-quotes-in-powershell) apply due to an issue. Remember that you can also use [file tokens](./../../user-guide/using-cli.mdx#passing-complex-content-into-cli-options) instead.
53
53
 
@@ -2,12 +2,18 @@ import Global from '/docs/cmd/_global.mdx';
2
2
  import Tabs from '@theme/Tabs';
3
3
  import TabItem from '@theme/TabItem';
4
4
 
5
- # aad administrativeunit add
5
+ # entra administrativeunit add
6
6
 
7
7
  Creates a new administrative unit
8
8
 
9
9
  ## Usage
10
10
 
11
+ ```sh
12
+ m365 entra administrativeunit add [options]
13
+ ```
14
+
15
+ ## Alias
16
+
11
17
  ```sh
12
18
  m365 aad administrativeunit add [options]
13
19
  ```
@@ -40,19 +46,19 @@ To use this command you must be either **Global Administrator** or **Privileged
40
46
  Create an administrative unit with a specific display name
41
47
 
42
48
  ```sh
43
- m365 aad administrativeunit add --displayName 'Marketing Division'
49
+ m365 entra administrativeunit add --displayName 'Marketing Division'
44
50
  ```
45
51
 
46
52
  Create an administrative unit with a specific display name and description
47
53
 
48
54
  ```sh
49
- m365 aad administrativeunit add --displayName 'Marketing Division' --description 'Marketing department administration'
55
+ m365 entra administrativeunit add --displayName 'Marketing Division' --description 'Marketing department administration'
50
56
  ```
51
57
 
52
58
  Create a hidden administrative unit with a specific display name
53
59
 
54
60
  ```sh
55
- m365 aad administrativeunit add --displayName 'Marketing Division' --hiddenMembership
61
+ m365 entra administrativeunit add --displayName 'Marketing Division' --hiddenMembership
56
62
  ```
57
63
 
58
64
  ## Response
@@ -2,12 +2,18 @@ import Global from '/docs/cmd/_global.mdx';
2
2
  import Tabs from '@theme/Tabs';
3
3
  import TabItem from '@theme/TabItem';
4
4
 
5
- # aad administrativeunit get
5
+ # entra administrativeunit get
6
6
 
7
7
  Gets information about a specific administrative unit
8
8
 
9
9
  ## Usage
10
10
 
11
+ ```sh
12
+ m365 entra administrativeunit get [options]
13
+ ```
14
+
15
+ ## Alias
16
+
11
17
  ```sh
12
18
  m365 aad administrativeunit get [options]
13
19
  ```
@@ -29,13 +35,13 @@ m365 aad administrativeunit get [options]
29
35
  Get information about the administrative unit by its id
30
36
 
31
37
  ```sh
32
- m365 aad administrativeunit get --id 03c4c9dc-6f0c-4c4f-a4e6-0c9ed80f54c7
38
+ m365 entra administrativeunit get --id 03c4c9dc-6f0c-4c4f-a4e6-0c9ed80f54c7
33
39
  ```
34
40
 
35
41
  Get information about the administrative unit by its display name
36
42
 
37
43
  ```sh
38
- m365 aad administrativeunit get --displayName 'Marketing Division'
44
+ m365 entra administrativeunit get --displayName 'Marketing Division'
39
45
  ```
40
46
 
41
47
  ## Response
@@ -2,12 +2,18 @@ import Global from '/docs/cmd/_global.mdx';
2
2
  import Tabs from '@theme/Tabs';
3
3
  import TabItem from '@theme/TabItem';
4
4
 
5
- # aad administrativeunit list
5
+ # entra administrativeunit list
6
6
 
7
7
  Retrieves a list of administrative units
8
8
 
9
9
  ## Usage
10
10
 
11
+ ```sh
12
+ m365 entra administrativeunit list [options]
13
+ ```
14
+
15
+ ## Alias
16
+
11
17
  ```sh
12
18
  m365 aad administrativeunit list [options]
13
19
  ```
@@ -21,7 +27,7 @@ m365 aad administrativeunit list [options]
21
27
  Retrieve a list of administrative units
22
28
 
23
29
  ```sh
24
- m365 aad administrativeunit list
30
+ m365 entra administrativeunit list
25
31
  ```
26
32
 
27
33
  ## Response
@@ -65,7 +71,7 @@ m365 aad administrativeunit list
65
71
  <TabItem value="Markdown">
66
72
 
67
73
  ```md
68
- # aad administrativeunit list
74
+ # entra administrativeunit list
69
75
 
70
76
  Date: 2023-10-16
71
77
 
@@ -2,12 +2,18 @@ import Global from '/docs/cmd/_global.mdx';
2
2
  import Tabs from '@theme/Tabs';
3
3
  import TabItem from '@theme/TabItem';
4
4
 
5
- # aad administrativeunit member add
5
+ # entra administrativeunit member add
6
6
 
7
7
  Add a member (user, group, or device) to an administrative unit
8
8
 
9
9
  ## Usage
10
10
 
11
+ ```sh
12
+ m365 entra administrativeunit member add [options]
13
+ ```
14
+
15
+ ## Alias
16
+
11
17
  ```sh
12
18
  m365 aad administrativeunit member add [options]
13
19
  ```
@@ -55,37 +61,37 @@ To use this command you must be either **Global Administrator** or **Privileged
55
61
  Add a single user specified by id to an administrative unit specified by id
56
62
 
57
63
  ```sh
58
- m365 aad administrativeunit member add --administrativeUnitId 03c4c9dc-6f0c-4c4f-a4e6-0c9ed80f54c7 --userId 1caf7dcd-7e83-4c3a-94f7-932a1299c844
64
+ m365 entra administrativeunit member add --administrativeUnitId 03c4c9dc-6f0c-4c4f-a4e6-0c9ed80f54c7 --userId 1caf7dcd-7e83-4c3a-94f7-932a1299c844
59
65
  ```
60
66
 
61
67
  Add a single user specified by user principal name to an administrative unit specified by name
62
68
 
63
69
  ```sh
64
- m365 aad administrativeunit member add --administrativeUnitName 'Marketing Division' --userName john.doe@contoso.com
70
+ m365 entra administrativeunit member add --administrativeUnitName 'Marketing Division' --userName john.doe@contoso.com
65
71
  ```
66
72
 
67
73
  Add a single group specified by id to an administrative unit specified by id
68
74
 
69
75
  ```sh
70
- m365 aad administrativeunit member add --administrativeUnitId 03c4c9dc-6f0c-4c4f-a4e6-0c9ed80f54c7 --groupId b2307a39-e878-458b-bc90-03bc578531d6
76
+ m365 entra administrativeunit member add --administrativeUnitId 03c4c9dc-6f0c-4c4f-a4e6-0c9ed80f54c7 --groupId b2307a39-e878-458b-bc90-03bc578531d6
71
77
  ```
72
78
 
73
79
  Add a single group specified by name to an administrative unit specified by name
74
80
 
75
81
  ```sh
76
- m365 aad administrativeunit member add --administrativeUnitName 'Marketing Division' --groupName 'Marketing Group'
82
+ m365 entra administrativeunit member add --administrativeUnitName 'Marketing Division' --groupName 'Marketing Group'
77
83
  ```
78
84
 
79
85
  Add a single device specified by id to an administrative unit specified by id
80
86
 
81
87
  ```sh
82
- m365 aad administrativeunit member add --administrativeUnitId 03c4c9dc-6f0c-4c4f-a4e6-0c9ed80f54c7 --deviceId 810c84a8-4a9e-49e6-bf7d-12d183f40d01
88
+ m365 entra administrativeunit member add --administrativeUnitId 03c4c9dc-6f0c-4c4f-a4e6-0c9ed80f54c7 --deviceId 810c84a8-4a9e-49e6-bf7d-12d183f40d01
83
89
  ```
84
90
 
85
91
  Add a single device specified by name to an administrative unit specified by name
86
92
 
87
93
  ```sh
88
- m365 aad administrativeunit member add --administrativeUnitName 'Marketing Division' --deviceName 'JohnDoe-PC'
94
+ m365 entra administrativeunit member add --administrativeUnitName 'Marketing Division' --deviceName 'JohnDoe-PC'
89
95
  ```
90
96
 
91
97
  ## More information
@@ -2,12 +2,18 @@ import Global from '/docs/cmd/_global.mdx';
2
2
  import Tabs from '@theme/Tabs';
3
3
  import TabItem from '@theme/TabItem';
4
4
 
5
- # aad administrativeunit member get
5
+ # entra administrativeunit member get
6
6
 
7
7
  Retrieves info about a specific member of an administrative unit
8
8
 
9
9
  ## Usage
10
10
 
11
+ ```sh
12
+ m365 entra administrativeunit member get [options]
13
+ ```
14
+
15
+ ## Alias
16
+
11
17
  ```sh
12
18
  m365 aad administrativeunit member get [options]
13
19
  ```
@@ -41,13 +47,13 @@ When the `properties` option includes values with a `/`, for example: `manager/d
41
47
  Get information about a member specified by id from an administrative unit specified by id
42
48
 
43
49
  ```sh
44
- m365 aad administrativeunit member get --id 64131a70-beb9-4ccb-b590-4401e58446ec --administrativeUnitId 03c4c9dc-6f0c-4c4f-a4e6-0c9ed80f54c7
50
+ m365 entra administrativeunit member get --id 64131a70-beb9-4ccb-b590-4401e58446ec --administrativeUnitId 03c4c9dc-6f0c-4c4f-a4e6-0c9ed80f54c7
45
51
  ```
46
52
 
47
53
  Get information about a member specified by id from an administrative unit specified by name
48
54
 
49
55
  ```sh
50
- m365 aad administrativeunit member get --id 64131a70-beb9-4ccb-b590-4401e58446ec --administrativeUnitName 'Marketing Division'
56
+ m365 entra administrativeunit member get --id 64131a70-beb9-4ccb-b590-4401e58446ec --administrativeUnitName 'Marketing Division'
51
57
  ```
52
58
 
53
59
  ## Response
@@ -2,12 +2,18 @@ import Global from '/docs/cmd/_global.mdx';
2
2
  import Tabs from '@theme/Tabs';
3
3
  import TabItem from '@theme/TabItem';
4
4
 
5
- # aad administrativeunit member list
5
+ # entra administrativeunit member list
6
6
 
7
7
  Retrieves members (users, groups, or devices) of an administrative unit
8
8
 
9
9
  ## Usage
10
10
 
11
+ ```sh
12
+ m365 entra administrativeunit member list [options]
13
+ ```
14
+
15
+ ## Alias
16
+
11
17
  ```sh
12
18
  m365 aad administrativeunit member list [options]
13
19
  ```
@@ -44,55 +50,55 @@ When the `properties` option includes values with a `/`, for example: `manager/d
44
50
  List members of an administrative unit specified by id
45
51
 
46
52
  ```sh
47
- m365 aad administrativeunit member list --administrativeUnitId 03c4c9dc-6f0c-4c4f-a4e6-0c9ed80f54c7
53
+ m365 entra administrativeunit member list --administrativeUnitId 03c4c9dc-6f0c-4c4f-a4e6-0c9ed80f54c7
48
54
  ```
49
55
 
50
56
  List members of an administrative unit specified by id. For each one return the `id` and the `displayName`
51
57
 
52
58
  ```sh
53
- m365 aad administrativeunit member list --administrativeUnitId 03c4c9dc-6f0c-4c4f-a4e6-0c9ed80f54c7 --properties 'id,displayName'
59
+ m365 entra administrativeunit member list --administrativeUnitId 03c4c9dc-6f0c-4c4f-a4e6-0c9ed80f54c7 --properties 'id,displayName'
54
60
  ```
55
61
 
56
62
  List members of an administrative unit specified by name
57
63
 
58
64
  ```sh
59
- m365 aad administrativeunit member list --administrativeUnitName 'Marketing Division'
65
+ m365 entra administrativeunit member list --administrativeUnitName 'Marketing Division'
60
66
  ```
61
67
 
62
68
  List users of an administrative unit specified by id
63
69
 
64
70
  ```sh
65
- m365 aad administrativeunit member list --administrativeUnitId 03c4c9dc-6f0c-4c4f-a4e6-0c9ed80f54c7 --type user
71
+ m365 entra administrativeunit member list --administrativeUnitId 03c4c9dc-6f0c-4c4f-a4e6-0c9ed80f54c7 --type user
66
72
  ```
67
73
 
68
74
  List users of an administrative unit specified by id that are guest users
69
75
 
70
76
  ```sh
71
- m365 aad administrativeunit member list --administrativeUnitId 03c4c9dc-6f0c-4c4f-a4e6-0c9ed80f54c7 --type user --filter "userType eq 'Guest'"
77
+ m365 entra administrativeunit member list --administrativeUnitId 03c4c9dc-6f0c-4c4f-a4e6-0c9ed80f54c7 --type user --filter "userType eq 'Guest'"
72
78
  ```
73
79
 
74
80
  List groups of an administrative unit specified by id
75
81
 
76
82
  ```sh
77
- m365 aad administrativeunit member list --administrativeUnitId 03c4c9dc-6f0c-4c4f-a4e6-0c9ed80f54c7 --type group
83
+ m365 entra administrativeunit member list --administrativeUnitId 03c4c9dc-6f0c-4c4f-a4e6-0c9ed80f54c7 --type group
78
84
  ```
79
85
 
80
86
  List groups of an administrative unit specified by id and include owners names, for each member return the `id` and the `displayName`
81
87
 
82
88
  ```sh
83
- m365 aad administrativeunit member list --administrativeUnitId 03c4c9dc-6f0c-4c4f-a4e6-0c9ed80f54c7 --type group --properties 'id,displayName,owners/displayName'
89
+ m365 entra administrativeunit member list --administrativeUnitId 03c4c9dc-6f0c-4c4f-a4e6-0c9ed80f54c7 --type group --properties 'id,displayName,owners/displayName'
84
90
  ```
85
91
 
86
92
  List devices of an administrative unit specified by id
87
93
 
88
94
  ```sh
89
- m365 aad administrativeunit member list --administrativeUnitId 03c4c9dc-6f0c-4c4f-a4e6-0c9ed80f54c7 --type device
95
+ m365 entra administrativeunit member list --administrativeUnitId 03c4c9dc-6f0c-4c4f-a4e6-0c9ed80f54c7 --type device
90
96
  ```
91
97
 
92
98
  List devices with linux operating system of an administrative unit specified by id
93
99
 
94
100
  ```sh
95
- m365 aad administrativeunit member list --administrativeUnitId 03c4c9dc-6f0c-4c4f-a4e6-0c9ed80f54c7 --type device --filter "operatingSystem eq 'linux'"
101
+ m365 entra administrativeunit member list --administrativeUnitId 03c4c9dc-6f0c-4c4f-a4e6-0c9ed80f54c7 --type device --filter "operatingSystem eq 'linux'"
96
102
  ```
97
103
 
98
104
  ## Response
@@ -1,11 +1,17 @@
1
1
  import Global from '/docs/cmd/_global.mdx';
2
2
 
3
- # aad administrativeunit remove
3
+ # entra administrativeunit remove
4
4
 
5
5
  Removes an administrative unit
6
6
 
7
7
  ## Usage
8
8
 
9
+ ```sh
10
+ m365 entra administrativeunit remove [options]
11
+ ```
12
+
13
+ ## Alias
14
+
9
15
  ```sh
10
16
  m365 aad administrativeunit remove [options]
11
17
  ```
@@ -38,13 +44,13 @@ To use this command you must be either **Global Administrator** or **Privileged
38
44
  Remove an administrative unit by its id
39
45
 
40
46
  ```sh
41
- m365 aad administrativeunit remove --id 03c4c9dc-6f0c-4c4f-a4e6-0c9ed80f54c7
47
+ m365 entra administrativeunit remove --id 03c4c9dc-6f0c-4c4f-a4e6-0c9ed80f54c7
42
48
  ```
43
49
 
44
50
  Remove an administrative unit by it displayName
45
51
 
46
52
  ```sh
47
- m365 aad administrativeunit remove --displayName 'Marketing Division'
53
+ m365 entra administrativeunit remove --displayName 'Marketing Division'
48
54
  ```
49
55
 
50
56
  ## Response
@@ -0,0 +1,116 @@
1
+ import Global from '/docs/cmd/_global.mdx';
2
+ import Tabs from '@theme/Tabs';
3
+ import TabItem from '@theme/TabItem';
4
+
5
+ # entra administrativeunit roleassignment add
6
+
7
+ Assigns a Microsoft Entra role with administrative unit scope to a user
8
+
9
+ ## Usage
10
+
11
+ ```sh
12
+ m365 entra administrativeunit roleassignment add [options]
13
+ ```
14
+
15
+ ## Options
16
+
17
+ ```md definition-list
18
+ `-i, --administrativeUnitId [administrativeUnitId]`
19
+ : The id of the administrative unit. Specify either `administrativeUnitId` or `administrativeUnitName`.
20
+
21
+ `-n, --administrativeUnitName [administrativeUnitName]`
22
+ : The name of the administrative unit. Specify either `administrativeUnitId` or `administrativeUnitName`.
23
+
24
+ `--roleDefinitionId [roleDefinitionId]`
25
+ : The id of the role definition that the member is in. Specify either `roleDefinitionId` or `roleDefinitionName`.
26
+
27
+ `--roleDefinitionName [roleDefinitionName]`
28
+ : The name of the role definition that the member is in. Specify either `roleDefinitionId` or `roleDefinitionName`.
29
+
30
+ `--userId [userId]`
31
+ : The id of the user that is a member of the scoped role. Specify either `userId` or `userName`.
32
+
33
+ `--userName [userName]`
34
+ : The name of the user that is a member of the scoped role. Specify either `userId` or `userName`.
35
+ ```
36
+
37
+ <Global />
38
+
39
+ ## Remarks
40
+
41
+ :::info
42
+
43
+ To use this command you must be either **Global Administrator** or **Privileged Role Administrator**.
44
+
45
+ :::
46
+
47
+ ## Examples
48
+
49
+ Assign a role definition specified by id to a user specified by id for an administrative unit specified by id
50
+
51
+ ```sh
52
+ m365 entra administrativeunit roleassignment add --administrativeUnitId 81bb36e4-f4c6-4984-8e56-d4f8feae9e09 --roleDefinitionId 4d6ac14f-3453-41d0-bef9-a3e0c569773a --userId 5f91f951-7305-4a27-9b63-7b00906de09f
53
+ ```
54
+
55
+ Assign a role definition specified by name to a user specified by name for an administrative unit specified by name
56
+
57
+ ```sh
58
+ m365 entra administrativeunit roleassignment add --administrativeUnitName 'Marketing Division' --roleDefinitionName 'License Administrator' --userName 'john.doe@contoso.com'
59
+ ```
60
+
61
+ ## Response
62
+
63
+ <Tabs>
64
+ <TabItem value="JSON">
65
+
66
+ ```json
67
+ {
68
+ "id": "5wuT_mJe20eRr5jDpJo4sVH5kV8FcydKm2N7AJBt4J_kNruBxvSESY5W1Pj-rp4J-2",
69
+ "principalId": "5f91f951-7305-4a27-9b63-7b00906de09f",
70
+ "directoryScopeId": "/administrativeUnits/81bb36e4-f4c6-4984-8e56-d4f8feae9e09",
71
+ "roleDefinitionId": "4d6ac14f-3453-41d0-bef9-a3e0c569773a"
72
+ }
73
+ ```
74
+
75
+ </TabItem>
76
+ <TabItem value="Text">
77
+
78
+ ```text
79
+ directoryScopeId: /administrativeUnits/81bb36e4-f4c6-4984-8e56-d4f8feae9e09
80
+ id : 4yeYchSc90m7G5YI8Va7uFH5kV8FcydKm2N7AJBt4J_kNruBxvSESY5W1Pj-rp4J-2
81
+ principalId : 5f91f951-7305-4a27-9b63-7b00906de09f
82
+ roleDefinitionId: 4d6ac14f-3453-41d0-bef9-a3e0c569773a
83
+ ```
84
+
85
+ </TabItem>
86
+ <TabItem value="CSV">
87
+
88
+ ```csv
89
+ id,principalId,directoryScopeId,roleDefinitionId
90
+ UB-K8uf2cUWBi2oS8q9rbFH5kV8FcydKm2N7AJBt4J_kNruBxvSESY5W1Pj-rp4J-2,5f91f951-7305-4a27-9b63-7b00906de09f,/administrativeUnits/81bb36e4-f4c6-4984-8e56-d4f8feae9e09,4d6ac14f-3453-41d0-bef9-a3e0c569773a
91
+ ```
92
+
93
+ </TabItem>
94
+ <TabItem value="Markdown">
95
+
96
+ ```md
97
+ # entra administrativeunit roleassignment add --administrativeUnitId "81bb36e4-f4c6-4984-8e56-d4f8feae9e09" --roleDefinitionId "4d6ac14f-3453-41d0-bef9-a3e0c569773a" --userId "5f91f951-7305-4a27-9b63-7b00906de09f"
98
+
99
+ Date: 11/16/2023
100
+
101
+ ## T8FqTVM00EG--aPgxWl3OlH5kV8FcydKm2N7AJBt4J_kNruBxvSESY5W1Pj-rp4J-2
102
+
103
+ Property | Value
104
+ ---------|-------
105
+ id | T8FqTVM00EG--aPgxWl3OlH5kV8FcydKm2N7AJBt4J\_kNruBxvSESY5W1Pj-rp4J-2
106
+ principalId | 5f91f951-7305-4a27-9b63-7b00906de09f
107
+ directoryScopeId | /administrativeUnits/81bb36e4-f4c6-4984-8e56-d4f8feae9e09
108
+ roleDefinitionId | 4d6ac14f-3453-41d0-bef9-a3e0c569773a
109
+ ```
110
+
111
+ </TabItem>
112
+ </Tabs>
113
+
114
+ ## More information
115
+
116
+ - [Roles with administrative unit scope](https://learn.microsoft.com/entra/identity/role-based-access-control/admin-units-assign-roles#roles-that-can-be-assigned-with-administrative-unit-scope)