@pnp/cli-microsoft365 7.6.0-beta.682272b → 7.6.0-beta.c1fa99c

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 (275) hide show
  1. package/.eslintrc.cjs +3 -0
  2. package/README.md +1 -1
  3. package/allCommands.json +1 -1
  4. package/allCommandsFull.json +1 -1
  5. package/dist/Auth.js +12 -10
  6. package/dist/AuthServer.js +1 -1
  7. package/dist/cli/cli.js +1 -1
  8. package/dist/config.js +2 -2
  9. package/dist/m365/app/commands/app-get.js +1 -1
  10. package/dist/m365/app/commands/app-open.js +1 -1
  11. package/dist/m365/app/commands/permission/permission-add.js +2 -2
  12. package/dist/m365/app/commands/permission/permission-list.js +2 -2
  13. package/dist/m365/base/PeriodBasedReport.js +3 -0
  14. package/dist/m365/cli/commands/cli-consent.js +2 -2
  15. package/dist/m365/cli/commands/cli-reconsent.js +3 -3
  16. package/dist/m365/commands/login.js +1 -1
  17. package/dist/m365/entra/commands/administrativeunit/administrativeunit-add.js +1 -0
  18. package/dist/m365/entra/commands/administrativeunit/administrativeunit-get.js +1 -0
  19. package/dist/m365/entra/commands/administrativeunit/administrativeunit-list.js +1 -0
  20. package/dist/m365/entra/commands/administrativeunit/administrativeunit-member-add.js +1 -0
  21. package/dist/m365/entra/commands/administrativeunit/administrativeunit-member-get.js +1 -0
  22. package/dist/m365/entra/commands/administrativeunit/administrativeunit-member-list.js +1 -0
  23. package/dist/m365/entra/commands/administrativeunit/administrativeunit-remove.js +1 -0
  24. package/dist/m365/entra/commands/app/app-add.js +7 -6
  25. package/dist/m365/entra/commands/app/app-get.js +4 -3
  26. package/dist/m365/entra/commands/app/app-list.js +1 -0
  27. package/dist/m365/entra/commands/app/app-permission-add.js +3 -2
  28. package/dist/m365/entra/commands/app/app-permission-list.js +1 -1
  29. package/dist/m365/entra/commands/app/app-remove.js +5 -4
  30. package/dist/m365/entra/commands/app/app-role-add.js +6 -5
  31. package/dist/m365/entra/commands/app/app-role-list.js +4 -3
  32. package/dist/m365/entra/commands/app/app-role-remove.js +6 -5
  33. package/dist/m365/entra/commands/app/app-set.js +8 -7
  34. package/dist/m365/entra/commands/approleassignment/approleassignment-add.js +2 -1
  35. package/dist/m365/entra/commands/approleassignment/approleassignment-list.js +1 -0
  36. package/dist/m365/entra/commands/approleassignment/approleassignment-remove.js +1 -0
  37. package/dist/m365/entra/commands/enterpriseapp/enterpriseapp-add.js +1 -0
  38. package/dist/m365/entra/commands/enterpriseapp/enterpriseapp-get.js +1 -0
  39. package/dist/m365/entra/commands/enterpriseapp/enterpriseapp-list.js +1 -0
  40. package/dist/m365/entra/commands/group/group-get.js +1 -0
  41. package/dist/m365/entra/commands/group/group-list.js +1 -0
  42. package/dist/m365/entra/commands/group/group-remove.js +1 -0
  43. package/dist/m365/entra/commands/group/group-user-list.js +1 -0
  44. package/dist/m365/entra/commands/groupsetting/groupsetting-add.js +1 -0
  45. package/dist/m365/entra/commands/groupsetting/groupsetting-get.js +1 -0
  46. package/dist/m365/entra/commands/groupsetting/groupsetting-list.js +1 -0
  47. package/dist/m365/entra/commands/groupsetting/groupsetting-remove.js +1 -0
  48. package/dist/m365/entra/commands/groupsetting/groupsetting-set.js +1 -0
  49. package/dist/m365/entra/commands/groupsettingtemplate/groupsettingtemplate-get.js +1 -0
  50. package/dist/m365/entra/commands/groupsettingtemplate/groupsettingtemplate-list.js +1 -0
  51. package/dist/m365/entra/commands/license/license-list.js +1 -0
  52. package/dist/m365/entra/commands/m365group/m365group-add.js +1 -0
  53. package/dist/m365/entra/commands/m365group/m365group-conversation-list.js +1 -0
  54. package/dist/m365/entra/commands/m365group/m365group-conversation-post-list.js +1 -0
  55. package/dist/m365/entra/commands/m365group/m365group-get.js +1 -0
  56. package/dist/m365/entra/commands/m365group/m365group-list.js +1 -0
  57. package/dist/m365/entra/commands/m365group/m365group-recyclebinitem-clear.js +1 -0
  58. package/dist/m365/entra/commands/m365group/m365group-recyclebinitem-list.js +1 -0
  59. package/dist/m365/entra/commands/m365group/m365group-recyclebinitem-remove.js +1 -0
  60. package/dist/m365/entra/commands/m365group/m365group-recyclebinitem-restore.js +1 -0
  61. package/dist/m365/entra/commands/m365group/m365group-remove.js +1 -0
  62. package/dist/m365/entra/commands/m365group/m365group-renew.js +1 -0
  63. package/dist/m365/entra/commands/m365group/m365group-set.js +1 -0
  64. package/dist/m365/entra/commands/m365group/m365group-teamify.js +1 -0
  65. package/dist/m365/entra/commands/m365group/m365group-user-add.js +1 -0
  66. package/dist/m365/entra/commands/m365group/m365group-user-list.js +1 -0
  67. package/dist/m365/entra/commands/m365group/m365group-user-remove.js +1 -0
  68. package/dist/m365/entra/commands/m365group/m365group-user-set.js +1 -0
  69. package/dist/m365/entra/commands/oauth2grant/oauth2grant-add.js +1 -0
  70. package/dist/m365/entra/commands/oauth2grant/oauth2grant-list.js +1 -0
  71. package/dist/m365/entra/commands/oauth2grant/oauth2grant-remove.js +1 -0
  72. package/dist/m365/entra/commands/oauth2grant/oauth2grant-set.js +1 -0
  73. package/dist/m365/entra/commands/policy/policy-list.js +1 -0
  74. package/dist/m365/entra/commands/siteclassification/siteclassification-disable.js +1 -0
  75. package/dist/m365/entra/commands/siteclassification/siteclassification-enable.js +1 -0
  76. package/dist/m365/entra/commands/siteclassification/siteclassification-get.js +1 -0
  77. package/dist/m365/entra/commands/siteclassification/siteclassification-set.js +1 -0
  78. package/dist/m365/entra/commands/user/user-add.js +1 -0
  79. package/dist/m365/entra/commands/user/user-get.js +1 -0
  80. package/dist/m365/entra/commands/user/user-guest-add.js +1 -0
  81. package/dist/m365/entra/commands/user/user-hibp.js +1 -0
  82. package/dist/m365/entra/commands/user/user-license-add.js +1 -0
  83. package/dist/m365/entra/commands/user/user-license-list.js +1 -0
  84. package/dist/m365/entra/commands/user/user-license-remove.js +1 -0
  85. package/dist/m365/entra/commands/user/user-list.js +1 -0
  86. package/dist/m365/entra/commands/user/user-password-validate.js +1 -0
  87. package/dist/m365/entra/commands/user/user-recyclebinitem-clear.js +1 -0
  88. package/dist/m365/entra/commands/user/user-recyclebinitem-list.js +1 -0
  89. package/dist/m365/entra/commands/user/user-recyclebinitem-remove.js +2 -1
  90. package/dist/m365/entra/commands/user/user-recyclebinitem-restore.js +1 -0
  91. package/dist/m365/entra/commands/user/user-remove.js +1 -0
  92. package/dist/m365/entra/commands/user/user-set.js +1 -0
  93. package/dist/m365/entra/commands/user/user-signin-list.js +1 -0
  94. package/dist/m365/outlook/commands/message/message-remove.js +113 -0
  95. package/dist/m365/outlook/commands.js +1 -0
  96. package/dist/m365/pp/commands/managementapp/managementapp-add.js +7 -7
  97. package/dist/m365/purview/commands/threatassessment/threatassessment-add.js +123 -0
  98. package/dist/m365/purview/commands/threatassessment/threatassessment-list.js +104 -0
  99. package/dist/m365/purview/commands.js +3 -1
  100. package/dist/m365/spfx/commands/project/DeployWorkflow.js +111 -0
  101. package/dist/m365/spfx/commands/project/project-azuredevops-pipeline-add.js +183 -0
  102. package/dist/m365/spfx/commands/project/project-azuredevops-pipeline-model.js +2 -0
  103. package/dist/m365/spfx/commands/project/project-github-workflow-add.js +6 -4
  104. package/dist/m365/spfx/commands.js +1 -0
  105. package/dist/m365/spo/commands/folder/FolderColor.js +19 -0
  106. package/dist/m365/spo/commands/folder/folder-add.js +46 -17
  107. package/dist/m365/spo/commands/folder/folder-set.js +118 -0
  108. package/dist/m365/spo/commands/group/group-member-add.js +2 -2
  109. package/dist/m365/spo/commands/group/group-member-remove.js +1 -1
  110. package/dist/m365/spo/commands/site/site-apppermission-add.js +2 -2
  111. package/dist/m365/spo/commands/site/site-recyclebinitem-restore.js +66 -27
  112. package/dist/m365/spo/commands/tenant/tenant-settings-set.js +1 -1
  113. package/dist/m365/spo/commands/user/user-remove.js +93 -16
  114. package/dist/m365/spo/commands.js +1 -0
  115. package/dist/m365/teams/commands/report/report-directroutingcalls.js +3 -0
  116. package/dist/m365/teams/commands/report/report-pstncalls.js +3 -0
  117. package/dist/m365/teams/commands/tab/tab-get.js +1 -1
  118. package/dist/m365/teams/commands/team/team-add.js +132 -3
  119. package/dist/m365/tenant/commands/report/report-office365activationcounts.js +3 -0
  120. package/dist/m365/tenant/commands/report/report-office365activationsusercounts.js +3 -0
  121. package/dist/m365/tenant/commands/report/report-office365activationsuserdetail.js +3 -0
  122. package/dist/utils/entraUser.js +36 -0
  123. package/dist/utils/spo.js +1 -1
  124. package/docs/docs/cmd/app/app-get.mdx +10 -10
  125. package/docs/docs/cmd/app/app-open.mdx +6 -6
  126. package/docs/docs/cmd/app/permission/permission-add.mdx +2 -2
  127. package/docs/docs/cmd/app/permission/permission-list.mdx +5 -5
  128. package/docs/docs/cmd/cli/cli-consent.mdx +2 -2
  129. package/docs/docs/cmd/cli/cli-reconsent.mdx +6 -6
  130. package/docs/docs/cmd/entra/app/app-permission-add.mdx +6 -6
  131. package/docs/docs/cmd/entra/approleassignment/approleassignment-add.mdx +1 -1
  132. package/docs/docs/cmd/entra/approleassignment/approleassignment-list.mdx +4 -4
  133. package/docs/docs/cmd/entra/enterpriseapp/enterpriseapp-add.mdx +1 -1
  134. package/docs/docs/cmd/entra/enterpriseapp/enterpriseapp-get.mdx +1 -1
  135. package/docs/docs/cmd/entra/group/group-user-add.mdx +7 -7
  136. package/docs/docs/cmd/entra/m365group/m365group-report-activitycounts.mdx +8 -0
  137. package/docs/docs/cmd/entra/m365group/m365group-report-activitydetail.mdx +8 -0
  138. package/docs/docs/cmd/entra/m365group/m365group-report-activityfilecounts.mdx +8 -0
  139. package/docs/docs/cmd/entra/m365group/m365group-report-activitygroupcounts.mdx +8 -0
  140. package/docs/docs/cmd/entra/m365group/m365group-report-activitystorage.mdx +8 -0
  141. package/docs/docs/cmd/entra/oauth2grant/oauth2grant-add.mdx +1 -1
  142. package/docs/docs/cmd/entra/oauth2grant/oauth2grant-list.mdx +1 -1
  143. package/docs/docs/cmd/entra/oauth2grant/oauth2grant-remove.mdx +1 -1
  144. package/docs/docs/cmd/entra/oauth2grant/oauth2grant-set.mdx +1 -1
  145. package/docs/docs/cmd/external/connection/connection-add.mdx +2 -2
  146. package/docs/docs/cmd/file/file-add.mdx +1 -1
  147. package/docs/docs/cmd/graph/schemaextension/schemaextension-add.mdx +2 -2
  148. package/docs/docs/cmd/graph/schemaextension/schemaextension-set.mdx +1 -1
  149. package/docs/docs/cmd/login.mdx +18 -18
  150. package/docs/docs/cmd/onedrive/report/report-activityfilecounts.mdx +8 -0
  151. package/docs/docs/cmd/onedrive/report/report-activityusercounts.mdx +8 -0
  152. package/docs/docs/cmd/onedrive/report/report-activityuserdetail.mdx +8 -0
  153. package/docs/docs/cmd/onedrive/report/report-usageaccountcounts.mdx +8 -0
  154. package/docs/docs/cmd/onedrive/report/report-usageaccountdetail.mdx +8 -0
  155. package/docs/docs/cmd/onedrive/report/report-usagefilecounts.mdx +6 -0
  156. package/docs/docs/cmd/onedrive/report/report-usagestorage.mdx +8 -0
  157. package/docs/docs/cmd/outlook/message/message-remove.mdx +67 -0
  158. package/docs/docs/cmd/outlook/report/report-mailactivitycounts.mdx +8 -0
  159. package/docs/docs/cmd/outlook/report/report-mailactivityusercounts.mdx +8 -0
  160. package/docs/docs/cmd/outlook/report/report-mailactivityuserdetail.mdx +8 -0
  161. package/docs/docs/cmd/outlook/report/report-mailappusageappsusercounts.mdx +7 -0
  162. package/docs/docs/cmd/outlook/report/report-mailappusageusercounts.mdx +8 -0
  163. package/docs/docs/cmd/outlook/report/report-mailappusageuserdetail.mdx +8 -0
  164. package/docs/docs/cmd/outlook/report/report-mailappusageversionsusercounts.mdx +8 -0
  165. package/docs/docs/cmd/outlook/report/report-mailboxusagedetail.mdx +8 -0
  166. package/docs/docs/cmd/outlook/report/report-mailboxusagemailboxcount.mdx +6 -0
  167. package/docs/docs/cmd/outlook/report/report-mailboxusagequotastatusmailboxcounts.mdx +8 -0
  168. package/docs/docs/cmd/outlook/report/report-mailboxusagestorage.mdx +8 -0
  169. package/docs/docs/cmd/pa/app/app-owner-set.mdx +1 -1
  170. package/docs/docs/cmd/pa/app/app-permission-ensure.mdx +3 -3
  171. package/docs/docs/cmd/pa/app/app-permission-remove.mdx +3 -3
  172. package/docs/docs/cmd/planner/plan/plan-add.mdx +1 -1
  173. package/docs/docs/cmd/planner/roster/roster-add.mdx +5 -5
  174. package/docs/docs/cmd/planner/roster/roster-get.mdx +7 -7
  175. package/docs/docs/cmd/planner/roster/roster-member-add.mdx +4 -4
  176. package/docs/docs/cmd/planner/roster/roster-member-get.mdx +4 -4
  177. package/docs/docs/cmd/planner/roster/roster-member-list.mdx +2 -2
  178. package/docs/docs/cmd/planner/roster/roster-member-remove.mdx +5 -5
  179. package/docs/docs/cmd/planner/roster/roster-plan-list.mdx +1 -1
  180. package/docs/docs/cmd/planner/roster/roster-remove.mdx +2 -2
  181. package/docs/docs/cmd/planner/task/task-add.mdx +1 -1
  182. package/docs/docs/cmd/planner/task/task-get.mdx +1 -1
  183. package/docs/docs/cmd/planner/task/task-list.mdx +1 -1
  184. package/docs/docs/cmd/planner/task/task-remove.mdx +1 -1
  185. package/docs/docs/cmd/planner/task/task-set.mdx +1 -1
  186. package/docs/docs/cmd/pp/environment/environment-get.mdx +1 -1
  187. package/docs/docs/cmd/pp/environment/environment-list.mdx +1 -1
  188. package/docs/docs/cmd/pp/managementapp/managementapp-add.mdx +9 -9
  189. package/docs/docs/cmd/purview/auditlog/auditlog-list.mdx +1 -1
  190. package/docs/docs/cmd/purview/sensitivitylabel/sensitivitylabel-get.mdx +1 -1
  191. package/docs/docs/cmd/purview/sensitivitylabel/sensitivitylabel-list.mdx +1 -1
  192. package/docs/docs/cmd/purview/sensitivitylabel/sensitivitylabel-policysettings-list.mdx +1 -1
  193. package/docs/docs/cmd/purview/threatassessment/threatassessment-add.mdx +131 -0
  194. package/docs/docs/cmd/purview/threatassessment/threatassessment-list.mdx +110 -0
  195. package/docs/docs/cmd/request.mdx +1 -1
  196. package/docs/docs/cmd/setup.mdx +2 -4
  197. package/docs/docs/cmd/skype/report/report-activitycounts.mdx +8 -0
  198. package/docs/docs/cmd/skype/report/report-activityusercounts.mdx +8 -0
  199. package/docs/docs/cmd/skype/report/report-activityuserdetail.mdx +8 -0
  200. package/docs/docs/cmd/spfx/project/project-azuredevops-pipeline-add.mdx +87 -0
  201. package/docs/docs/cmd/spfx/project/project-github-workflow-add.mdx +2 -2
  202. package/docs/docs/cmd/spo/file/file-roleassignment-add.mdx +3 -3
  203. package/docs/docs/cmd/spo/file/file-roleassignment-remove.mdx +2 -2
  204. package/docs/docs/cmd/spo/folder/folder-add.mdx +38 -0
  205. package/docs/docs/cmd/spo/folder/folder-roleassignment-add.mdx +1 -1
  206. package/docs/docs/cmd/spo/folder/folder-roleassignment-remove.mdx +1 -1
  207. package/docs/docs/cmd/spo/folder/folder-set.mdx +88 -0
  208. package/docs/docs/cmd/spo/group/group-member-add.mdx +2 -2
  209. package/docs/docs/cmd/spo/group/group-member-remove.mdx +3 -3
  210. package/docs/docs/cmd/spo/list/list-roleassignment-add.mdx +3 -3
  211. package/docs/docs/cmd/spo/list/list-roleassignment-remove.mdx +2 -2
  212. package/docs/docs/cmd/spo/listitem/listitem-roleassignment-add.mdx +8 -8
  213. package/docs/docs/cmd/spo/listitem/listitem-roleassignment-remove.mdx +2 -2
  214. package/docs/docs/cmd/spo/report/report-activityfilecounts.mdx +8 -0
  215. package/docs/docs/cmd/spo/report/report-activitypages.mdx +8 -0
  216. package/docs/docs/cmd/spo/report/report-activityusercounts.mdx +6 -0
  217. package/docs/docs/cmd/spo/report/report-activityuserdetail.mdx +6 -0
  218. package/docs/docs/cmd/spo/report/report-siteusagedetail.mdx +6 -0
  219. package/docs/docs/cmd/spo/report/report-siteusagefilecounts.mdx +6 -0
  220. package/docs/docs/cmd/spo/report/report-siteusagepages.mdx +8 -0
  221. package/docs/docs/cmd/spo/report/report-siteusagesitecounts.mdx +6 -0
  222. package/docs/docs/cmd/spo/report/report-siteusagestorage.mdx +8 -0
  223. package/docs/docs/cmd/spo/site/site-apppermission-add.mdx +2 -2
  224. package/docs/docs/cmd/spo/site/site-apppermission-set.mdx +2 -2
  225. package/docs/docs/cmd/spo/site/site-recyclebinitem-restore.mdx +29 -5
  226. package/docs/docs/cmd/spo/tenant/tenant-settings-set.mdx +89 -89
  227. package/docs/docs/cmd/spo/user/user-ensure.mdx +1 -1
  228. package/docs/docs/cmd/spo/user/user-remove.mdx +40 -9
  229. package/docs/docs/cmd/spo/web/web-roleassignment-add.mdx +3 -3
  230. package/docs/docs/cmd/spo/web/web-roleassignment-remove.mdx +2 -2
  231. package/docs/docs/cmd/teams/channel/channel-member-remove.mdx +1 -1
  232. package/docs/docs/cmd/teams/channel/channel-member-set.mdx +1 -1
  233. package/docs/docs/cmd/teams/chat/chat-member-remove.mdx +3 -3
  234. package/docs/docs/cmd/teams/report/report-deviceusagedistributionusercounts.mdx +8 -0
  235. package/docs/docs/cmd/teams/report/report-deviceusageusercounts.mdx +8 -0
  236. package/docs/docs/cmd/teams/report/report-deviceusageuserdetail.mdx +6 -0
  237. package/docs/docs/cmd/teams/report/report-directroutingcalls.mdx +7 -1
  238. package/docs/docs/cmd/teams/report/report-pstncalls.mdx +7 -1
  239. package/docs/docs/cmd/teams/report/report-useractivitycounts.mdx +8 -0
  240. package/docs/docs/cmd/teams/report/report-useractivityusercounts.mdx +8 -0
  241. package/docs/docs/cmd/teams/report/report-useractivityuserdetail.mdx +8 -0
  242. package/docs/docs/cmd/teams/tab/tab-get.mdx +19 -12
  243. package/docs/docs/cmd/teams/team/team-add.mdx +28 -4
  244. package/docs/docs/cmd/tenant/report/report-activeusercounts.mdx +8 -0
  245. package/docs/docs/cmd/tenant/report/report-activeuserdetail.mdx +6 -0
  246. package/docs/docs/cmd/tenant/report/report-office365activationcounts.mdx +8 -0
  247. package/docs/docs/cmd/tenant/report/report-office365activationsusercounts.mdx +8 -0
  248. package/docs/docs/cmd/tenant/report/report-office365activationsuserdetail.mdx +8 -0
  249. package/docs/docs/cmd/tenant/report/report-servicesusercounts.mdx +8 -0
  250. package/docs/docs/cmd/tenant/security/security-alerts-list.mdx +1 -1
  251. package/docs/docs/cmd/viva/engage/engage-group-list.mdx +1 -1
  252. package/docs/docs/cmd/viva/engage/engage-group-user-add.mdx +1 -1
  253. package/docs/docs/cmd/viva/engage/engage-group-user-remove.mdx +1 -1
  254. package/docs/docs/cmd/viva/engage/engage-message-add.mdx +1 -1
  255. package/docs/docs/cmd/viva/engage/engage-message-get.mdx +1 -1
  256. package/docs/docs/cmd/viva/engage/engage-message-like-set.mdx +1 -1
  257. package/docs/docs/cmd/viva/engage/engage-message-list.mdx +1 -1
  258. package/docs/docs/cmd/viva/engage/engage-message-remove.mdx +1 -1
  259. package/docs/docs/cmd/viva/engage/engage-network-list.mdx +1 -1
  260. package/docs/docs/cmd/viva/engage/engage-report-activitycounts.mdx +8 -0
  261. package/docs/docs/cmd/viva/engage/engage-report-activityusercounts.mdx +8 -0
  262. package/docs/docs/cmd/viva/engage/engage-report-activityuserdetail.mdx +6 -0
  263. package/docs/docs/cmd/viva/engage/engage-report-deviceusagedistributionusercounts.mdx +8 -0
  264. package/docs/docs/cmd/viva/engage/engage-report-deviceusageusercounts.mdx +8 -0
  265. package/docs/docs/cmd/viva/engage/engage-report-deviceusageuserdetail.mdx +6 -0
  266. package/docs/docs/cmd/viva/engage/engage-report-groupsactivitycounts.mdx +8 -0
  267. package/docs/docs/cmd/viva/engage/engage-report-groupsactivitydetail.mdx +6 -0
  268. package/docs/docs/cmd/viva/engage/engage-report-groupsactivitygroupcounts.mdx +8 -0
  269. package/docs/docs/cmd/viva/engage/engage-search.mdx +1 -1
  270. package/docs/docs/cmd/viva/engage/engage-user-get.mdx +1 -1
  271. package/docs/docs/cmd/viva/engage/engage-user-list.mdx +1 -1
  272. package/npm-shrinkwrap.json +62 -58
  273. package/package.json +11 -11
  274. package/dist/m365/spo/commands/folder/folder-rename.js +0 -72
  275. package/docs/docs/cmd/spo/folder/folder-rename.mdx +0 -44
@@ -89,7 +89,7 @@ class SpoTenantSettingsSetCommand extends SpoCommand {
89
89
  throw response.ErrorInfo.ErrorMessage;
90
90
  }
91
91
  if (args.options.EnableAzureADB2BIntegration === true) {
92
- await this.warn(logger, 'WARNING: Make sure to also enable the Azure AD one-time passcode authentication preview. If it is not enabled then SharePoint will not use Azure AD B2B even if EnableAzureADB2BIntegration is set to true. Learn more at http://aka.ms/spo-b2b-integration.');
92
+ await this.warn(logger, 'WARNING: Make sure to also enable the Microsoft Entra one-time passcode authentication preview. If it is not enabled then SharePoint will not use Microsoft Entra B2B even if EnableAzureADB2BIntegration is set to true. Learn more at http://aka.ms/spo-b2b-integration.');
93
93
  }
94
94
  }
95
95
  catch (err) {
@@ -5,11 +5,14 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
5
5
  };
6
6
  var _SpoUserRemoveCommand_instances, _SpoUserRemoveCommand_initTelemetry, _SpoUserRemoveCommand_initOptions, _SpoUserRemoveCommand_initValidators, _SpoUserRemoveCommand_initOptionSets;
7
7
  import { cli } from '../../../../cli/cli.js';
8
+ import { spo } from '../../../../utils/spo.js';
8
9
  import request from '../../../../request.js';
10
+ import { entraGroup } from '../../../../utils/entraGroup.js';
9
11
  import { formatting } from '../../../../utils/formatting.js';
10
12
  import { validation } from '../../../../utils/validation.js';
11
13
  import SpoCommand from '../../../base/SpoCommand.js';
12
14
  import commands from '../../commands.js';
15
+ ;
13
16
  class SpoUserRemoveCommand extends SpoCommand {
14
17
  get name() {
15
18
  return commands.USER_REMOVE;
@@ -40,13 +43,58 @@ class SpoUserRemoveCommand extends SpoCommand {
40
43
  if (this.verbose) {
41
44
  await logger.logToStderr(`Removing user from subsite ${options.webUrl} ...`);
42
45
  }
43
- let requestUrl = `${encodeURI(options.webUrl)}/_api/web/siteusers/`;
44
- if (options.id) {
45
- requestUrl += `removebyid(${options.id})`;
46
+ try {
47
+ let requestUrl = `${encodeURI(options.webUrl)}/_api/web/siteusers/`;
48
+ if (options.id) {
49
+ requestUrl += `removebyid(${options.id})`;
50
+ }
51
+ else if (options.loginName) {
52
+ requestUrl += `removeByLoginName('${formatting.encodeQueryParameter(options.loginName)}')`;
53
+ }
54
+ else if (options.email) {
55
+ const user = await spo.getUserByEmail(options.webUrl, options.email, logger, this.verbose);
56
+ requestUrl += `removebyid(${user.Id})`;
57
+ }
58
+ else if (options.userName) {
59
+ const user = await this.getUser(options);
60
+ if (!user) {
61
+ throw new Error(`User not found: ${options.userName}`);
62
+ }
63
+ if (this.verbose) {
64
+ await logger.logToStderr(`Removing user ${user.Title} ...`);
65
+ }
66
+ requestUrl += `removebyid(${user.Id})`;
67
+ }
68
+ else if (options.entraGroupId || options.entraGroupName) {
69
+ const entraGroup = await this.getEntraGroup(options);
70
+ if (this.verbose) {
71
+ await logger.logToStderr(`Removing entra group ${entraGroup?.displayName} ...`);
72
+ }
73
+ //for entra groups, M365 groups have an associated email and security groups don't
74
+ if (entraGroup?.mail) {
75
+ //M365 group is prefixed with c:0o.c|federateddirectoryclaimprovider
76
+ requestUrl += `removeByLoginName('c:0o.c|federateddirectoryclaimprovider|${entraGroup.id}')`;
77
+ }
78
+ else {
79
+ //security group is prefixed with c:0t.c|tenant
80
+ requestUrl += `removeByLoginName('c:0t.c|tenant|${entraGroup?.id}')`;
81
+ }
82
+ }
83
+ const requestOptions = {
84
+ url: requestUrl,
85
+ headers: {
86
+ accept: 'application/json;odata=nometadata'
87
+ },
88
+ responseType: 'json'
89
+ };
90
+ await request.post(requestOptions);
46
91
  }
47
- else if (options.loginName) {
48
- requestUrl += `removeByLoginName('${formatting.encodeQueryParameter(options.loginName)}')`;
92
+ catch (err) {
93
+ this.handleRejectedODataJsonPromise(err);
49
94
  }
95
+ }
96
+ async getUser(options) {
97
+ const requestUrl = `${options.webUrl}/_api/web/siteusers?$filter=UserPrincipalName eq ('${formatting.encodeQueryParameter(options.userName)}')`;
50
98
  const requestOptions = {
51
99
  url: requestUrl,
52
100
  headers: {
@@ -54,20 +102,23 @@ class SpoUserRemoveCommand extends SpoCommand {
54
102
  },
55
103
  responseType: 'json'
56
104
  };
57
- try {
58
- await request.post(requestOptions);
59
- }
60
- catch (err) {
61
- this.handleRejectedODataJsonPromise(err);
62
- }
105
+ const userInstance = await request.get(requestOptions);
106
+ return userInstance.value[0];
107
+ }
108
+ async getEntraGroup(options) {
109
+ return options.entraGroupId ? await entraGroup.getGroupById(options.entraGroupId) : await entraGroup.getGroupByDisplayName(options.entraGroupName);
63
110
  }
64
111
  }
65
112
  _SpoUserRemoveCommand_instances = new WeakSet(), _SpoUserRemoveCommand_initTelemetry = function _SpoUserRemoveCommand_initTelemetry() {
66
113
  this.telemetry.push((args) => {
67
114
  Object.assign(this.telemetryProperties, {
68
- id: (!(!args.options.id)).toString(),
69
- loginName: (!(!args.options.loginName)).toString(),
70
- force: (!(!args.options.force)).toString()
115
+ id: typeof args.options.id !== 'undefined',
116
+ loginName: typeof args.options.loginName !== 'undefined',
117
+ email: typeof args.options.email !== 'undefined',
118
+ userName: typeof args.options.userName !== 'undefined',
119
+ entraGroupId: typeof args.options.entraGroupId !== 'undefined',
120
+ entraGroupName: typeof args.options.entraGroupName !== 'undefined',
121
+ force: !!args.options.force
71
122
  });
72
123
  });
73
124
  }, _SpoUserRemoveCommand_initOptions = function _SpoUserRemoveCommand_initOptions() {
@@ -77,15 +128,41 @@ _SpoUserRemoveCommand_instances = new WeakSet(), _SpoUserRemoveCommand_initTelem
77
128
  option: '-i, --id [id]'
78
129
  }, {
79
130
  option: '--loginName [loginName]'
131
+ }, {
132
+ option: '--email [email]'
133
+ }, {
134
+ option: '--userName [userName]'
135
+ }, {
136
+ option: '--entraGroupId [entraGroupId]'
137
+ }, {
138
+ option: '--entraGroupName [entraGroupName]'
80
139
  }, {
81
140
  option: '-f, --force'
82
141
  });
83
142
  }, _SpoUserRemoveCommand_initValidators = function _SpoUserRemoveCommand_initValidators() {
84
143
  this.validators.push(async (args) => {
85
- return validation.isValidSharePointUrl(args.options.webUrl);
144
+ const isValidSharePointUrl = validation.isValidSharePointUrl(args.options.webUrl);
145
+ if (isValidSharePointUrl !== true) {
146
+ return isValidSharePointUrl;
147
+ }
148
+ if (args.options.id && isNaN(parseInt(args.options.id))) {
149
+ return `Specified id ${args.options.id} is not a number`;
150
+ }
151
+ if (args.options.entraGroupId && !validation.isValidGuid(args.options.entraGroupId)) {
152
+ return `${args.options.entraId} is not a valid GUID.`;
153
+ }
154
+ if (args.options.userName && !validation.isValidUserPrincipalName(args.options.userName)) {
155
+ return `${args.options.userName} is not a valid userName.`;
156
+ }
157
+ if (args.options.email && !validation.isValidUserPrincipalName(args.options.email)) {
158
+ return `${args.options.email} is not a valid email.`;
159
+ }
160
+ return true;
86
161
  });
87
162
  }, _SpoUserRemoveCommand_initOptionSets = function _SpoUserRemoveCommand_initOptionSets() {
88
- this.optionSets.push({ options: ['id', 'loginName'] });
163
+ this.optionSets.push({
164
+ options: ['id', 'loginName', 'email', 'userName', 'entraGroupId', 'entraGroupName']
165
+ });
89
166
  };
90
167
  export default new SpoUserRemoveCommand();
91
168
  //# sourceMappingURL=user-remove.js.map
@@ -91,6 +91,7 @@ export default {
91
91
  FOLDER_MOVE: `${prefix} folder move`,
92
92
  FOLDER_REMOVE: `${prefix} folder remove`,
93
93
  FOLDER_RENAME: `${prefix} folder rename`,
94
+ FOLDER_SET: `${prefix} folder set`,
94
95
  FOLDER_RETENTIONLABEL_ENSURE: `${prefix} folder retentionlabel ensure`,
95
96
  FOLDER_RETENTIONLABEL_REMOVE: `${prefix} folder retentionlabel remove`,
96
97
  FOLDER_ROLEASSIGNMENT_REMOVE: `${prefix} folder roleassignment remove`,
@@ -10,6 +10,9 @@ import { validation } from '../../../../utils/validation.js';
10
10
  import GraphCommand from '../../../base/GraphCommand.js';
11
11
  import commands from '../../commands.js';
12
12
  class TeamsReportDirectroutingcallsCommand extends GraphCommand {
13
+ get allowedOutputs() {
14
+ return ['json', 'csv'];
15
+ }
13
16
  get name() {
14
17
  return commands.REPORT_DIRECTROUTINGCALLS;
15
18
  }
@@ -10,6 +10,9 @@ import { validation } from '../../../../utils/validation.js';
10
10
  import GraphCommand from '../../../base/GraphCommand.js';
11
11
  import commands from '../../commands.js';
12
12
  class TeamsReportPstncallsCommand extends GraphCommand {
13
+ get allowedOutputs() {
14
+ return ['json', 'csv'];
15
+ }
13
16
  get name() {
14
17
  return commands.REPORT_PSTNCALLS;
15
18
  }
@@ -78,7 +78,7 @@ class TeamsTabGetCommand extends GraphCommand {
78
78
  this.teamId = await this.getTeamId(args);
79
79
  this.channelId = await this.getChannelId(args);
80
80
  const tabId = await this.getTabId(args);
81
- const endpoint = `${this.resource}/v1.0/teams/${formatting.encodeQueryParameter(this.teamId)}/channels/${formatting.encodeQueryParameter(this.channelId)}/tabs/${formatting.encodeQueryParameter(tabId)}`;
81
+ const endpoint = `${this.resource}/v1.0/teams/${formatting.encodeQueryParameter(this.teamId)}/channels/${formatting.encodeQueryParameter(this.channelId)}/tabs/${formatting.encodeQueryParameter(tabId)}?$expand=teamsApp`;
82
82
  const requestOptions = {
83
83
  url: endpoint,
84
84
  headers: {
@@ -3,12 +3,17 @@ 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 _TeamsTeamAddCommand_instances, _TeamsTeamAddCommand_initTelemetry, _TeamsTeamAddCommand_initOptions, _TeamsTeamAddCommand_initOptionSets;
6
+ var _TeamsTeamAddCommand_instances, _TeamsTeamAddCommand_initTelemetry, _TeamsTeamAddCommand_initOptions, _TeamsTeamAddCommand_initValidators, _TeamsTeamAddCommand_initOptionSets;
7
7
  import { setTimeout } from 'timers/promises';
8
8
  import request from '../../../../request.js';
9
9
  import { entraGroup } from '../../../../utils/entraGroup.js';
10
10
  import GraphCommand from '../../../base/GraphCommand.js';
11
11
  import commands from '../../commands.js';
12
+ import { validation } from '../../../../utils/validation.js';
13
+ import { accessToken } from '../../../../utils/accessToken.js';
14
+ import auth from '../../../../Auth.js';
15
+ import { entraUser } from '../../../../utils/entraUser.js';
16
+ import { formatting } from '../../../../utils/formatting.js';
12
17
  class TeamsTeamAddCommand extends GraphCommand {
13
18
  get name() {
14
19
  return commands.TEAM_ADD;
@@ -22,9 +27,14 @@ class TeamsTeamAddCommand extends GraphCommand {
22
27
  this.pollingInterval = 30000;
23
28
  __classPrivateFieldGet(this, _TeamsTeamAddCommand_instances, "m", _TeamsTeamAddCommand_initTelemetry).call(this);
24
29
  __classPrivateFieldGet(this, _TeamsTeamAddCommand_instances, "m", _TeamsTeamAddCommand_initOptions).call(this);
30
+ __classPrivateFieldGet(this, _TeamsTeamAddCommand_instances, "m", _TeamsTeamAddCommand_initValidators).call(this);
25
31
  __classPrivateFieldGet(this, _TeamsTeamAddCommand_instances, "m", _TeamsTeamAddCommand_initOptionSets).call(this);
26
32
  }
27
33
  async commandAction(logger, args) {
34
+ const isAppOnlyAccessToken = accessToken.isAppOnlyAccessToken(auth.connection.accessTokens[this.resource].accessToken);
35
+ if (isAppOnlyAccessToken && !args.options.ownerUserNames && !args.options.ownerIds && !args.options.ownerEmails) {
36
+ this.handleError(`Specify at least 'ownerUserNames', 'ownerIds' or 'ownerEmails' when using application permissions.`);
37
+ }
28
38
  let requestBody;
29
39
  if (args.options.template) {
30
40
  if (this.verbose) {
@@ -54,6 +64,19 @@ class TeamsTeamAddCommand extends GraphCommand {
54
64
  description: args.options.description
55
65
  };
56
66
  }
67
+ let members = [];
68
+ if (args.options.ownerEmails || args.options.ownerIds || args.options.ownerUserNames) {
69
+ await this.retrieveMembersToAdd(members, 'owner', args.options.ownerEmails, args.options.ownerIds, args.options.ownerUserNames);
70
+ }
71
+ if (args.options.memberEmails || args.options.memberIds || args.options.memberUserNames) {
72
+ await this.retrieveMembersToAdd(members, 'member', args.options.memberEmails, args.options.memberIds, args.options.memberUserNames);
73
+ }
74
+ // We filter out the first owner here and add it to the request body when we are using application only permissions. This is required or the Graph API will throw an error.
75
+ if (members.length > 0 && members.filter(y => y.roles.includes('owner')).length > 0 && isAppOnlyAccessToken) {
76
+ const groupOwner = members.filter(y => y.roles.includes('owner')).slice(0, 1);
77
+ members = members.filter(y => y !== groupOwner[0]);
78
+ requestBody.members = groupOwner;
79
+ }
57
80
  const requestOptionsPost = {
58
81
  url: `${this.resource}/v1.0/teams`,
59
82
  headers: {
@@ -72,12 +95,18 @@ class TeamsTeamAddCommand extends GraphCommand {
72
95
  responseType: 'json'
73
96
  };
74
97
  const teamsAsyncOperation = await request.get(requestOptions);
75
- if (!args.options.wait) {
98
+ if (!args.options.wait && members.length === 0) {
76
99
  await logger.log(teamsAsyncOperation);
77
100
  }
78
101
  else {
79
102
  await this.waitUntilTeamFinishedProvisioning(teamsAsyncOperation, requestOptions, logger);
80
103
  const entraGroup = await this.getEntraGroup(teamsAsyncOperation.targetResourceId, logger);
104
+ if (members.length > 0) {
105
+ if (this.verbose) {
106
+ await logger.logToStderr('Adding members to the team...');
107
+ }
108
+ await this.addMembers(members, entraGroup.id);
109
+ }
81
110
  await logger.log(entraGroup);
82
111
  }
83
112
  }
@@ -85,6 +114,19 @@ class TeamsTeamAddCommand extends GraphCommand {
85
114
  this.handleRejectedODataJsonPromise(err);
86
115
  }
87
116
  }
117
+ async addMembers(members, groupId) {
118
+ for (const member of members) {
119
+ const requestOptions = {
120
+ url: `${this.resource}/v1.0/teams/${groupId}/members`,
121
+ headers: {
122
+ 'content-type': 'application/json;odata.metadata=none'
123
+ },
124
+ responseType: 'json',
125
+ data: member
126
+ };
127
+ await request.post(requestOptions);
128
+ }
129
+ }
88
130
  async waitUntilTeamFinishedProvisioning(teamsAsyncOperation, requestOptions, logger) {
89
131
  if (teamsAsyncOperation.status === 'succeeded') {
90
132
  if (this.verbose) {
@@ -118,6 +160,31 @@ class TeamsTeamAddCommand extends GraphCommand {
118
160
  }
119
161
  return group;
120
162
  }
163
+ async retrieveMembersToAdd(members, role, emails, ids, userNames) {
164
+ let itemsToProcess = [];
165
+ if (emails) {
166
+ itemsToProcess = await entraUser.getUserIdsByEmails(formatting.splitAndTrim(emails));
167
+ }
168
+ else if (ids) {
169
+ itemsToProcess = formatting.splitAndTrim(ids);
170
+ }
171
+ else if (userNames) {
172
+ itemsToProcess = await entraUser.getUserIdsByUpns(formatting.splitAndTrim(userNames));
173
+ }
174
+ itemsToProcess.map((item) => {
175
+ const member = members.find((y) => y['user@odata.bind'] === `https://graph.microsoft.com/v1.0/users('${item}')`);
176
+ if (!member) {
177
+ members.push({
178
+ '@odata.type': '#microsoft.graph.aadUserConversationMember',
179
+ 'user@odata.bind': `https://graph.microsoft.com/v1.0/users('${item}')`,
180
+ roles: [role]
181
+ });
182
+ }
183
+ else {
184
+ member.roles.push(role);
185
+ }
186
+ });
187
+ }
121
188
  }
122
189
  _TeamsTeamAddCommand_instances = new WeakSet(), _TeamsTeamAddCommand_initTelemetry = function _TeamsTeamAddCommand_initTelemetry() {
123
190
  this.telemetry.push((args) => {
@@ -125,7 +192,13 @@ _TeamsTeamAddCommand_instances = new WeakSet(), _TeamsTeamAddCommand_initTelemet
125
192
  name: typeof args.options.name !== 'undefined',
126
193
  description: typeof args.options.description !== 'undefined',
127
194
  template: typeof args.options.template !== 'undefined',
128
- wait: !!args.options.wait
195
+ wait: !!args.options.wait,
196
+ ownerUserNames: typeof args.options.ownerUserNames !== 'undefined',
197
+ ownerIds: typeof args.options.ownerIds !== 'undefined',
198
+ ownerEmails: typeof args.options.ownerEmails !== 'undefined',
199
+ memberUserNames: typeof args.options.memberUserNames !== 'undefined',
200
+ memberIds: typeof args.options.memberIds !== 'undefined',
201
+ memberEmails: typeof args.options.memberEmails !== 'undefined'
129
202
  });
130
203
  });
131
204
  }, _TeamsTeamAddCommand_initOptions = function _TeamsTeamAddCommand_initOptions() {
@@ -137,6 +210,52 @@ _TeamsTeamAddCommand_instances = new WeakSet(), _TeamsTeamAddCommand_initTelemet
137
210
  option: '--template [template]'
138
211
  }, {
139
212
  option: '--wait'
213
+ }, {
214
+ option: '--ownerUserNames [ownerUserNames]'
215
+ }, {
216
+ option: '--ownerIds [ownerIds]'
217
+ }, {
218
+ option: '--ownerEmails [ownerEmails]'
219
+ }, {
220
+ option: '--memberUserNames [memberUserNames]'
221
+ }, {
222
+ option: '--memberIds [memberIds]'
223
+ }, {
224
+ option: '--memberEmails [memberEmails]'
225
+ });
226
+ }, _TeamsTeamAddCommand_initValidators = function _TeamsTeamAddCommand_initValidators() {
227
+ this.validators.push(async (args) => {
228
+ if (args.options.ownerUserNames) {
229
+ const isValidUserPrincipalNameArray = validation.isValidUserPrincipalNameArray(formatting.splitAndTrim(args.options.ownerUserNames));
230
+ if (isValidUserPrincipalNameArray !== true) {
231
+ return `Owner username '${isValidUserPrincipalNameArray}' is invalid for option 'ownerUserNames'.`;
232
+ }
233
+ }
234
+ if (args.options.ownerEmails) {
235
+ const isValidUserPrincipalNameArray = validation.isValidUserPrincipalNameArray(formatting.splitAndTrim(args.options.ownerEmails));
236
+ if (isValidUserPrincipalNameArray !== true) {
237
+ return `Owner email '${isValidUserPrincipalNameArray}' is invalid for option 'ownerEmails'.`;
238
+ }
239
+ }
240
+ if (args.options.ownerIds && !validation.isValidGuidArray(formatting.splitAndTrim(args.options.ownerIds))) {
241
+ return `The option 'ownerIds' contains one or more invalid GUIDs.`;
242
+ }
243
+ if (args.options.memberUserNames) {
244
+ const isValidUserPrincipalNameArray = validation.isValidUserPrincipalNameArray(formatting.splitAndTrim(args.options.memberUserNames));
245
+ if (isValidUserPrincipalNameArray !== true) {
246
+ return `Member username '${isValidUserPrincipalNameArray}' is invalid for option 'memberUserNames'.`;
247
+ }
248
+ }
249
+ if (args.options.memberEmails) {
250
+ const isValidUserPrincipalNameArray = validation.isValidUserPrincipalNameArray(formatting.splitAndTrim(args.options.memberEmails));
251
+ if (isValidUserPrincipalNameArray !== true) {
252
+ return `Member email '${isValidUserPrincipalNameArray}' is invalid for option 'memberEmails'.`;
253
+ }
254
+ }
255
+ if (args.options.memberIds && !validation.isValidGuidArray(formatting.splitAndTrim(args.options.memberIds))) {
256
+ return `The option 'memberIds' contains one or more invalid GUIDs`;
257
+ }
258
+ return true;
140
259
  });
141
260
  }, _TeamsTeamAddCommand_initOptionSets = function _TeamsTeamAddCommand_initOptionSets() {
142
261
  this.optionSets.push({
@@ -149,6 +268,16 @@ _TeamsTeamAddCommand_instances = new WeakSet(), _TeamsTeamAddCommand_initTelemet
149
268
  runsWhen: (args) => {
150
269
  return !args.options.template;
151
270
  }
271
+ }, {
272
+ options: ['ownerUserNames', 'ownerIds', 'ownerEmails'],
273
+ runsWhen: (args) => {
274
+ return args.options.ownerUserNames || args.options.ownerIds || args.options.ownerEmails;
275
+ }
276
+ }, {
277
+ options: ['memberUserNames', 'memberIds', 'memberEmails'],
278
+ runsWhen: (args) => {
279
+ return args.options.memberUserNames || args.options.memberIds || args.options.memberEmails;
280
+ }
152
281
  });
153
282
  };
154
283
  export default new TeamsTeamAddCommand();
@@ -3,6 +3,9 @@ import { formatting } from '../../../../utils/formatting.js';
3
3
  import GraphCommand from '../../../base/GraphCommand.js';
4
4
  import commands from '../../commands.js';
5
5
  class TenantReportOffice365ActivationCountsCommand extends GraphCommand {
6
+ get allowedOutputs() {
7
+ return ['json', 'csv'];
8
+ }
6
9
  get name() {
7
10
  return commands.REPORT_OFFICE365ACTIVATIONCOUNTS;
8
11
  }
@@ -3,6 +3,9 @@ import { formatting } from '../../../../utils/formatting.js';
3
3
  import GraphCommand from '../../../base/GraphCommand.js';
4
4
  import commands from '../../commands.js';
5
5
  class TenantReportOffice365ActivationsUserCountsCommand extends GraphCommand {
6
+ get allowedOutputs() {
7
+ return ['json', 'csv'];
8
+ }
6
9
  get name() {
7
10
  return commands.REPORT_OFFICE365ACTIVATIONSUSERCOUNTS;
8
11
  }
@@ -3,6 +3,9 @@ import { formatting } from '../../../../utils/formatting.js';
3
3
  import GraphCommand from '../../../base/GraphCommand.js';
4
4
  import commands from '../../commands.js';
5
5
  class TenantReportOffice365ActivationsUserDetailCommand extends GraphCommand {
6
+ get allowedOutputs() {
7
+ return ['json', 'csv'];
8
+ }
6
9
  get name() {
7
10
  return commands.REPORT_OFFICE365ACTIVATIONSUSERDETAIL;
8
11
  }
@@ -74,6 +74,42 @@ export const entraUser = {
74
74
  }
75
75
  return res.value[0].id;
76
76
  },
77
+ /**
78
+ * Retrieve the IDs of users by their mail. There is no guarantee that the order of the returned IDs will match the order of the specified mails.
79
+ * @param emails Array of user mails.
80
+ * @returns Array of user IDs.
81
+ */
82
+ async getUserIdsByEmails(emails) {
83
+ const userIds = [];
84
+ for (let i = 0; i < emails.length; i += 20) {
85
+ const emailsChunk = emails.slice(i, i + 20);
86
+ const requestOptions = {
87
+ url: `${graphResource}/v1.0/$batch`,
88
+ headers: {
89
+ accept: 'application/json;odata.metadata=none'
90
+ },
91
+ responseType: 'json',
92
+ data: {
93
+ requests: emailsChunk.map((email, index) => ({
94
+ id: index + 1,
95
+ method: 'GET',
96
+ url: `/users?$filter=mail eq '${formatting.encodeQueryParameter(email)}'&$select=id`,
97
+ headers: {
98
+ accept: 'application/json;odata.metadata=none'
99
+ }
100
+ }))
101
+ }
102
+ };
103
+ const res = await request.post(requestOptions);
104
+ for (const response of res.responses) {
105
+ if (response.status !== 200) {
106
+ throw Error(`The specified user with mail '${emailsChunk[response.id - 1]}' does not exist.`);
107
+ }
108
+ userIds.push(response.body.id);
109
+ }
110
+ }
111
+ return userIds;
112
+ },
77
113
  /**
78
114
  * Retrieve the UPN of a user by its ID.
79
115
  * @param id User ID.
package/dist/utils/spo.js CHANGED
@@ -490,7 +490,7 @@ export const spo = {
490
490
  return result.CorporateCatalogUrl;
491
491
  },
492
492
  /**
493
- * Retrieves the Azure AD ID from a SP user.
493
+ * Retrieves the Microsoft Entra ID from a SP user.
494
494
  * @param webUrl Web url
495
495
  * @param id The Id of the user
496
496
  */
@@ -4,7 +4,7 @@ import TabItem from '@theme/TabItem';
4
4
 
5
5
  # app get
6
6
 
7
- Retrieves information about the current Azure AD app
7
+ Retrieves information about the current Microsoft Entra app
8
8
 
9
9
  ## Usage
10
10
 
@@ -16,26 +16,26 @@ m365 app get [options]
16
16
 
17
17
  ```md definition-list
18
18
  `--appId [appId]`
19
- : Client ID of the Azure AD app registered in the .m365rc.json file to retrieve information for.
19
+ : Client ID of the Microsoft Entra app registered in the .m365rc.json file to retrieve information for.
20
20
  ```
21
21
 
22
22
  <Global />
23
23
 
24
24
  ## Remarks
25
25
 
26
- Use this command to quickly look up information for the Azure AD application registration registered in the .m365rc.json file in your current project (folder).
26
+ Use this command to quickly look up information for the Microsoft Entra application registration registered in the .m365rc.json file in your current project (folder).
27
27
 
28
28
  If you have multiple apps registered in your .m365rc.json file, you can specify the app for which you'd like to retrieve permissions using the `--appId` option. If you don't specify the app using the `--appId` option, you'll be prompted to select one of the applications from your .m365rc.json file.
29
29
 
30
30
  ## Examples
31
31
 
32
- Retrieve information about your current Azure AD app.
32
+ Retrieve information about your current Microsoft Entra app.
33
33
 
34
34
  ```sh
35
35
  m365 app get
36
36
  ```
37
37
 
38
- Retrieve information about the Azure AD app with client ID specified in the _.m365rc.json_ file.
38
+ Retrieve information about the Microsoft Entra app with client ID specified in the _.m365rc.json_ file.
39
39
 
40
40
  ```sh
41
41
  m365 app get --appId e23d235c-fcdf-45d1-ac5f-24ab2ee0695d
@@ -54,7 +54,7 @@ m365 app get --appId e23d235c-fcdf-45d1-ac5f-24ab2ee0695d
54
54
  "applicationTemplateId": null,
55
55
  "disabledByMicrosoftStatus": null,
56
56
  "createdDateTime": "2022-10-28T21:20:57Z",
57
- "displayName": "My AAD app",
57
+ "displayName": "My Microsoft Entra app",
58
58
  "description": null,
59
59
  "groupMembershipClaims": null,
60
60
  "identifierUris": [],
@@ -167,7 +167,7 @@ m365 app get --appId e23d235c-fcdf-45d1-ac5f-24ab2ee0695d
167
167
  deletedDateTime : null
168
168
  description : null
169
169
  disabledByMicrosoftStatus : null
170
- displayName : My AAD app
170
+ displayName : My Microsoft Entra app
171
171
  groupMembershipClaims : null
172
172
  id : b3241f2a-6551-43d4-a72f-0d02ccfeb77f
173
173
  identifierUris : []
@@ -197,7 +197,7 @@ m365 app get --appId e23d235c-fcdf-45d1-ac5f-24ab2ee0695d
197
197
 
198
198
  ```csv
199
199
  id,deletedDateTime,appId,applicationTemplateId,disabledByMicrosoftStatus,createdDateTime,displayName,description,groupMembershipClaims,identifierUris,isDeviceOnlyAuthSupported,isFallbackPublicClient,notes,publisherDomain,serviceManagementReference,signInAudience,tags,tokenEncryptionKeyId,samlMetadataUrl,defaultRedirectUri,certification,optionalClaims,addIns,api,appRoles,info,keyCredentials,parentalControlSettings,passwordCredentials,publicClient,requiredResourceAccess,verifiedPublisher,web,spa
200
- b3241f2a-6551-43d4-a72f-0d02ccfeb77f,,02f9ff8c-b79e-4552-bdda-4facd74d6df1,,,2022-10-28T21:20:57Z,My AAD app,,,[],,,,contoso.onmicrosoft.com,,AzureADMyOrg,[],,,,,,[],"{""acceptMappedClaims"":null,""knownClientApplications"":[],""requestedAccessTokenVersion"":null,""oauth2PermissionScopes"":[],""preAuthorizedApplications"":[]}","[{""allowedMemberTypes"":[""User""],""description"":""Managers"",""displayName"":""Managers"",""id"":""d7c46856-8a66-485a-9047-098eba08b9a3"",""isEnabled"":true,""origin"":""Application"",""value"":""managers""}]","{""logoUrl"":null,""marketingUrl"":null,""privacyStatementUrl"":null,""supportUrl"":null,""termsOfServiceUrl"":null}",[],"{""countriesBlockedForMinors"":[],""legalAgeGroupRule"":""Allow""}",[],"{""redirectUris"":[]}","[{""resourceAppId"":""b55b276d-2b09-4ad2-8de5-f09cf24ffba9"",""resourceAccess"":[{""id"":""162b1576-a2b2-458d-b7b9-04481911b4ef"",""type"":""Role""}]},{""resourceAppId"":""00000005-0000-0ff1-ce00-000000000000"",""resourceAccess"":[{""id"":""8e5870bb-8808-44dc-8e10-c509ed919ddd"",""type"":""Scope""},{""id"":""5db81a03-0de0-432b-b31e-71d57c8d2e0b"",""type"":""Scope""}]}]","{""displayName"":null,""verifiedPublisherId"":null,""addedDateTime"":null}","{""homePageUrl"":null,""logoutUrl"":null,""redirectUris"":[],""implicitGrantSettings"":{""enableAccessTokenIssuance"":false,""enableIdTokenIssuance"":false},""redirectUriSettings"":[]}","{""redirectUris"":[]}"
200
+ b3241f2a-6551-43d4-a72f-0d02ccfeb77f,,02f9ff8c-b79e-4552-bdda-4facd74d6df1,,,2022-10-28T21:20:57Z,My Microsoft Entra app,,,[],,,,contoso.onmicrosoft.com,,AzureADMyOrg,[],,,,,,[],"{""acceptMappedClaims"":null,""knownClientApplications"":[],""requestedAccessTokenVersion"":null,""oauth2PermissionScopes"":[],""preAuthorizedApplications"":[]}","[{""allowedMemberTypes"":[""User""],""description"":""Managers"",""displayName"":""Managers"",""id"":""d7c46856-8a66-485a-9047-098eba08b9a3"",""isEnabled"":true,""origin"":""Application"",""value"":""managers""}]","{""logoUrl"":null,""marketingUrl"":null,""privacyStatementUrl"":null,""supportUrl"":null,""termsOfServiceUrl"":null}",[],"{""countriesBlockedForMinors"":[],""legalAgeGroupRule"":""Allow""}",[],"{""redirectUris"":[]}","[{""resourceAppId"":""b55b276d-2b09-4ad2-8de5-f09cf24ffba9"",""resourceAccess"":[{""id"":""162b1576-a2b2-458d-b7b9-04481911b4ef"",""type"":""Role""}]},{""resourceAppId"":""00000005-0000-0ff1-ce00-000000000000"",""resourceAccess"":[{""id"":""8e5870bb-8808-44dc-8e10-c509ed919ddd"",""type"":""Scope""},{""id"":""5db81a03-0de0-432b-b31e-71d57c8d2e0b"",""type"":""Scope""}]}]","{""displayName"":null,""verifiedPublisherId"":null,""addedDateTime"":null}","{""homePageUrl"":null,""logoutUrl"":null,""redirectUris"":[],""implicitGrantSettings"":{""enableAccessTokenIssuance"":false,""enableIdTokenIssuance"":false},""redirectUriSettings"":[]}","{""redirectUris"":[]}"
201
201
  ```
202
202
 
203
203
  </TabItem>
@@ -208,14 +208,14 @@ m365 app get --appId e23d235c-fcdf-45d1-ac5f-24ab2ee0695d
208
208
 
209
209
  Date: 5/29/2023
210
210
 
211
- ## My AAD app (b3241f2a-6551-43d4-a72f-0d02ccfeb77f)
211
+ ## My Microsoft Entra app (b3241f2a-6551-43d4-a72f-0d02ccfeb77f)
212
212
 
213
213
  Property | Value
214
214
  ---------|-------
215
215
  id | b3241f2a-6551-43d4-a72f-0d02ccfeb77f
216
216
  appId | 02f9ff8c-b79e-4552-bdda-4facd74d6df1
217
217
  createdDateTime | 2022-10-28T21:20:57Z
218
- displayName | My AAD app
218
+ displayName | My Microsoft Entra app
219
219
  publisherDomain | contoso.onmicrosoft.com
220
220
  signInAudience | AzureADMyOrg
221
221
  ```
@@ -4,7 +4,7 @@ import TabItem from '@theme/TabItem';
4
4
 
5
5
  # app open
6
6
 
7
- Returns deep link of the current AD app to open the Azure portal on the Azure AD app registration management page.
7
+ Opens Microsoft Entra app in the Microsoft Entra ID portal
8
8
 
9
9
  ## Usage
10
10
 
@@ -16,10 +16,10 @@ m365 app open [options]
16
16
 
17
17
  ```md definition-list
18
18
  `--appId [appId]`
19
- : Optional Application (client) ID of the Azure AD application registration to open. Uses the app from the `.m365rc.json` file corresponding to the `appId`. If multiple apps are available, this will evade the prompt to choose an app. If the `appId` is not available in the list of apps, an error is thrown.
19
+ : Optional Application (client) ID of the Microsoft Entra application registration to open. Uses the app from the `.m365rc.json` file corresponding to the `appId`. If multiple apps are available, this will evade the prompt to choose an app. If the `appId` is not available in the list of apps, an error is thrown.
20
20
 
21
21
  `--preview`
22
- : Use to open the url of the Azure AD preview portal.
22
+ : Use to open the url of the Microsoft Entra ID preview portal.
23
23
  ```
24
24
 
25
25
  <Global />
@@ -32,19 +32,19 @@ Gets the app from the `.m365rc.json` file in the current directory. If the `--ap
32
32
 
33
33
  ## Examples
34
34
 
35
- Prints the URL to the Azure AD application registration management page on the Azure Portal.
35
+ Prints the URL to the Microsoft Entra application registration management page on the Azure Portal.
36
36
 
37
37
  ```sh
38
38
  m365 app open
39
39
  ```
40
40
 
41
- Prints the url of the Azure AD application registration management page on the preview Azure Portal.
41
+ Prints the url of the Microsoft Entra application registration management page on the preview Azure Portal.
42
42
 
43
43
  ```sh
44
44
  m365 app open --preview
45
45
  ```
46
46
 
47
- Prints the URL to the Azure AD application registration management page on the Azure Portal, evading a possible choice prompt in the case of multiple saved apps in the `.m365rc.json` file.
47
+ Prints the URL to the Microsoft Entra application registration management page on the Azure Portal, evading a possible choice prompt in the case of multiple saved apps in the `.m365rc.json` file.
48
48
 
49
49
  ```sh
50
50
  m365 app open --appId d75be2e1-0204-4f95-857d-51a37cf40be8