@pnp/cli-microsoft365 7.4.0-beta.fce7b64 → 7.5.0-beta.0ae7da4
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.
- package/.devcontainer/Dockerfile +2 -2
- package/.eslintrc.cjs +7 -0
- package/Dockerfile +2 -5
- package/README.md +1 -1
- package/allCommands.json +1 -1
- package/allCommandsFull.json +1 -1
- package/dist/Auth.js +2 -1
- package/dist/appInsights.js +2 -0
- package/dist/cli/cli.js +1 -0
- package/dist/m365/app/commands/app-get.js +2 -2
- package/dist/m365/app/commands/permission/permission-list.js +1 -1
- package/dist/m365/{aad/commands.js → entra/aadCommands.js} +3 -1
- package/dist/m365/{aad → entra}/commands/administrativeunit/administrativeunit-add.js +12 -8
- package/dist/m365/{aad → entra}/commands/administrativeunit/administrativeunit-get.js +20 -16
- package/dist/m365/{aad → entra}/commands/administrativeunit/administrativeunit-list.js +6 -2
- package/dist/m365/{aad → entra}/commands/administrativeunit/administrativeunit-member-add.js +24 -20
- package/dist/m365/{aad → entra}/commands/administrativeunit/administrativeunit-member-get.js +18 -14
- package/dist/m365/{aad → entra}/commands/administrativeunit/administrativeunit-member-list.js +18 -14
- package/dist/m365/{aad → entra}/commands/administrativeunit/administrativeunit-remove.js +20 -16
- package/dist/m365/entra/commands/administrativeunit/administrativeunit-roleassignment-add.js +102 -0
- package/dist/m365/{aad → entra}/commands/app/app-add.js +25 -21
- package/dist/m365/{aad → entra}/commands/app/app-get.js +17 -13
- package/dist/m365/{aad → entra}/commands/app/app-list.js +7 -3
- package/dist/m365/{aad → entra}/commands/app/app-permission-add.js +19 -19
- package/dist/m365/entra/commands/app/app-permission-list.js +182 -0
- package/dist/m365/{aad → entra}/commands/app/app-remove.js +17 -13
- package/dist/m365/{aad → entra}/commands/app/app-role-add.js +18 -14
- package/dist/m365/{aad → entra}/commands/app/app-role-list.js +15 -11
- package/dist/m365/{aad → entra}/commands/app/app-role-remove.js +17 -13
- package/dist/m365/{aad → entra}/commands/app/app-set.js +18 -14
- package/dist/m365/{aad → entra}/commands/approleassignment/approleassignment-add.js +17 -13
- package/dist/m365/{aad → entra}/commands/approleassignment/approleassignment-list.js +16 -12
- package/dist/m365/{aad → entra}/commands/approleassignment/approleassignment-remove.js +17 -13
- package/dist/m365/entra/commands/group/group-add.js +224 -0
- package/dist/m365/{aad → entra}/commands/group/group-get.js +20 -16
- package/dist/m365/{aad → entra}/commands/group/group-list.js +16 -12
- package/dist/m365/{aad → entra}/commands/group/group-remove.js +21 -17
- package/dist/m365/entra/commands/group/group-user-add.js +145 -0
- package/dist/m365/{aad → entra}/commands/group/group-user-list.js +19 -15
- package/dist/m365/{aad → entra}/commands/groupsetting/groupsetting-add.js +12 -8
- package/dist/m365/{aad → entra}/commands/groupsetting/groupsetting-get.js +12 -8
- package/dist/m365/{aad → entra}/commands/groupsetting/groupsetting-list.js +7 -3
- package/dist/m365/{aad → entra}/commands/groupsetting/groupsetting-remove.js +14 -10
- package/dist/m365/{aad → entra}/commands/groupsetting/groupsetting-set.js +12 -8
- package/dist/m365/{aad → entra}/commands/groupsettingtemplate/groupsettingtemplate-get.js +17 -13
- package/dist/m365/{aad → entra}/commands/groupsettingtemplate/groupsettingtemplate-list.js +7 -3
- package/dist/m365/{aad → entra}/commands/license/license-list.js +6 -2
- package/dist/m365/{aad → entra}/commands/m365group/m365group-add.js +19 -15
- package/dist/m365/{aad → entra}/commands/m365group/m365group-conversation-list.js +14 -10
- package/dist/m365/{aad → entra}/commands/m365group/m365group-conversation-post-list.js +19 -15
- package/dist/m365/{aad → entra}/commands/m365group/m365group-get.js +15 -11
- package/dist/m365/{aad → entra}/commands/m365group/m365group-list.js +12 -8
- package/dist/m365/{aad → entra}/commands/m365group/m365group-recyclebinitem-clear.js +12 -8
- package/dist/m365/{aad → entra}/commands/m365group/m365group-recyclebinitem-list.js +12 -8
- package/dist/m365/{aad → entra}/commands/m365group/m365group-recyclebinitem-remove.js +16 -12
- package/dist/m365/{aad → entra}/commands/m365group/m365group-recyclebinitem-restore.js +16 -12
- package/dist/m365/{aad → entra}/commands/m365group/m365group-remove.js +19 -15
- package/dist/m365/{aad → entra}/commands/m365group/m365group-renew.js +14 -10
- package/dist/m365/{aad → entra}/commands/m365group/m365group-report-activitycounts.js +4 -0
- package/dist/m365/{aad → entra}/commands/m365group/m365group-report-activitydetail.js +4 -0
- package/dist/m365/{aad → entra}/commands/m365group/m365group-report-activityfilecounts.js +4 -0
- package/dist/m365/{aad → entra}/commands/m365group/m365group-report-activitygroupcounts.js +4 -0
- package/dist/m365/{aad → entra}/commands/m365group/m365group-report-activitystorage.js +4 -0
- package/dist/m365/{aad → entra}/commands/m365group/m365group-set.js +21 -17
- package/dist/m365/{aad → entra}/commands/m365group/m365group-teamify.js +18 -14
- package/dist/m365/{aad → entra}/commands/m365group/m365group-user-add.js +16 -15
- package/dist/m365/entra/commands/m365group/m365group-user-list.js +154 -0
- package/dist/m365/{aad → entra}/commands/m365group/m365group-user-remove.js +16 -15
- package/dist/m365/{aad → entra}/commands/m365group/m365group-user-set.js +16 -15
- package/dist/m365/{aad → entra}/commands/oauth2grant/oauth2grant-add.js +12 -8
- package/dist/m365/{aad → entra}/commands/oauth2grant/oauth2grant-list.js +12 -8
- package/dist/m365/{aad → entra}/commands/oauth2grant/oauth2grant-remove.js +10 -6
- package/dist/m365/{aad → entra}/commands/oauth2grant/oauth2grant-set.js +10 -6
- package/dist/m365/{aad → entra}/commands/policy/policy-list.js +16 -12
- package/dist/m365/{aad → entra}/commands/siteclassification/siteclassification-disable.js +12 -8
- package/dist/m365/{aad → entra}/commands/siteclassification/siteclassification-enable.js +12 -8
- package/dist/m365/{aad → entra}/commands/siteclassification/siteclassification-get.js +6 -2
- package/dist/m365/{aad → entra}/commands/siteclassification/siteclassification-set.js +14 -10
- package/dist/m365/{aad → entra}/commands/sp/sp-add.js +17 -13
- package/dist/m365/{aad → entra}/commands/sp/sp-get.js +16 -12
- package/dist/m365/{aad → entra}/commands/sp/sp-list.js +12 -8
- package/dist/m365/{aad → entra}/commands/user/user-add.js +18 -14
- package/dist/m365/entra/commands/user/user-get.js +115 -0
- package/dist/m365/{aad → entra}/commands/user/user-guest-add.js +12 -8
- package/dist/m365/{aad → entra}/commands/user/user-hibp.js +14 -10
- package/dist/m365/{aad → entra}/commands/user/user-license-add.js +16 -12
- package/dist/m365/{aad → entra}/commands/user/user-license-list.js +16 -12
- package/dist/m365/{aad → entra}/commands/user/user-license-remove.js +16 -12
- package/dist/m365/{aad → entra}/commands/user/user-list.js +12 -8
- package/dist/m365/{aad → entra}/commands/user/user-password-validate.js +10 -6
- package/dist/m365/{aad → entra}/commands/user/user-recyclebinitem-clear.js +12 -8
- package/dist/m365/{aad → entra}/commands/user/user-recyclebinitem-list.js +6 -2
- package/dist/m365/{aad → entra}/commands/user/user-recyclebinitem-remove.js +14 -10
- package/dist/m365/{aad → entra}/commands/user/user-recyclebinitem-restore.js +12 -8
- package/dist/m365/{aad → entra}/commands/user/user-remove.js +16 -12
- package/dist/m365/{aad → entra}/commands/user/user-set.js +18 -14
- package/dist/m365/{aad → entra}/commands/user/user-signin-list.js +15 -11
- package/dist/m365/entra/commands.js +89 -0
- package/dist/m365/external/commands/connection/connection-doctor.js +2 -1
- package/dist/m365/external/commands/connection/connection-urltoitemresolver-add.js +69 -0
- package/dist/m365/external/commands.js +1 -0
- package/dist/m365/file/commands/file-copy.js +151 -0
- package/dist/m365/file/commands.js +1 -0
- package/dist/m365/flow/commands/owner/owner-ensure.js +4 -4
- package/dist/m365/flow/commands/owner/owner-remove.js +4 -4
- package/dist/m365/flow/commands/run/run-get.js +52 -13
- package/dist/m365/onenote/commands/notebook/notebook-list.js +2 -2
- package/dist/m365/onenote/commands/page/page-list.js +2 -2
- package/dist/m365/pa/commands/app/app-get.js +26 -11
- package/dist/m365/pa/commands/app/app-owner-set.js +2 -2
- package/dist/m365/pa/commands/app/app-permission-ensure.js +4 -4
- package/dist/m365/pa/commands/app/app-permission-remove.js +4 -4
- package/dist/m365/pa/commands/app/app-remove.js +19 -2
- package/dist/m365/planner/commands/bucket/bucket-add.js +2 -2
- package/dist/m365/planner/commands/bucket/bucket-get.js +2 -2
- package/dist/m365/planner/commands/bucket/bucket-list.js +2 -2
- package/dist/m365/planner/commands/bucket/bucket-remove.js +2 -2
- package/dist/m365/planner/commands/bucket/bucket-set.js +2 -2
- package/dist/m365/planner/commands/plan/plan-add.js +2 -2
- package/dist/m365/planner/commands/plan/plan-get.js +2 -2
- package/dist/m365/planner/commands/plan/plan-list.js +2 -2
- package/dist/m365/planner/commands/plan/plan-remove.js +2 -2
- package/dist/m365/planner/commands/plan/plan-set.js +2 -2
- package/dist/m365/planner/commands/roster/roster-member-add.js +2 -2
- package/dist/m365/planner/commands/roster/roster-member-get.js +2 -2
- package/dist/m365/planner/commands/roster/roster-member-remove.js +2 -2
- package/dist/m365/planner/commands/task/task-add.js +2 -2
- package/dist/m365/planner/commands/task/task-get.js +2 -2
- package/dist/m365/planner/commands/task/task-list.js +2 -2
- package/dist/m365/planner/commands/task/task-remove.js +2 -2
- package/dist/m365/planner/commands/task/task-set.js +2 -2
- package/dist/m365/spfx/commands/project/project-github-workflow-add.js +1 -1
- package/dist/m365/spo/commands/file/file-add.js +12 -8
- package/dist/m365/spo/commands/file/file-checkin.js +4 -1
- package/dist/m365/spo/commands/file/file-checkout-undo.js +5 -1
- package/dist/m365/spo/commands/file/file-checkout.js +4 -1
- package/dist/m365/spo/commands/file/file-copy.js +5 -1
- package/dist/m365/spo/commands/file/file-get.js +5 -1
- package/dist/m365/spo/commands/file/file-list.js +5 -1
- package/dist/m365/spo/commands/file/file-move.js +5 -1
- package/dist/m365/spo/commands/file/file-remove.js +5 -1
- package/dist/m365/spo/commands/file/file-rename.js +5 -1
- package/dist/m365/spo/commands/file/file-retentionlabel-ensure.js +4 -1
- package/dist/m365/spo/commands/file/file-retentionlabel-remove.js +5 -1
- package/dist/m365/spo/commands/file/file-roleassignment-add.js +4 -1
- package/dist/m365/spo/commands/file/file-roleassignment-remove.js +5 -1
- package/dist/m365/spo/commands/file/file-roleinheritance-break.js +5 -1
- package/dist/m365/spo/commands/file/file-roleinheritance-reset.js +5 -1
- package/dist/m365/spo/commands/file/file-sharinginfo-get.js +6 -3
- package/dist/m365/spo/commands/file/file-sharinglink-add.js +4 -1
- package/dist/m365/spo/commands/file/file-sharinglink-clear.js +5 -1
- package/dist/m365/spo/commands/file/file-sharinglink-get.js +4 -1
- package/dist/m365/spo/commands/file/file-sharinglink-list.js +4 -1
- package/dist/m365/spo/commands/file/file-sharinglink-remove.js +5 -1
- package/dist/m365/spo/commands/file/file-sharinglink-set.js +4 -1
- package/dist/m365/spo/commands/file/file-version-clear.js +6 -2
- package/dist/m365/spo/commands/file/file-version-get.js +1 -1
- package/dist/m365/spo/commands/file/file-version-list.js +4 -1
- package/dist/m365/spo/commands/file/file-version-remove.js +2 -1
- package/dist/m365/spo/commands/file/file-version-restore.js +2 -1
- package/dist/m365/spo/commands/folder/folder-add.js +4 -1
- package/dist/m365/spo/commands/folder/folder-copy.js +5 -1
- package/dist/m365/spo/commands/folder/folder-get.js +4 -1
- package/dist/m365/spo/commands/folder/folder-list.js +6 -2
- package/dist/m365/spo/commands/folder/folder-move.js +5 -1
- package/dist/m365/spo/commands/folder/folder-remove.js +5 -1
- package/dist/m365/spo/commands/folder/folder-rename.js +4 -1
- package/dist/m365/spo/commands/folder/folder-retentionlabel-ensure.js +4 -1
- package/dist/m365/spo/commands/folder/folder-retentionlabel-remove.js +5 -1
- package/dist/m365/spo/commands/folder/folder-roleassignment-add.js +4 -1
- package/dist/m365/spo/commands/folder/folder-roleassignment-remove.js +6 -2
- package/dist/m365/spo/commands/folder/folder-roleinheritance-break.js +5 -1
- package/dist/m365/spo/commands/folder/folder-roleinheritance-reset.js +5 -1
- package/dist/m365/spo/commands/group/group-member-add.js +25 -8
- package/dist/m365/spo/commands/group/group-member-remove.js +29 -12
- package/dist/m365/spo/commands/group/group-set.js +2 -2
- package/dist/m365/spo/commands/site/site-remove.js +2 -2
- package/dist/m365/spo/commands/site/site-set.js +2 -2
- package/dist/m365/spo/commands/user/user-ensure.js +17 -7
- package/dist/m365/teams/commands/app/app-install.js +2 -2
- package/dist/m365/teams/commands/channel/channel-get.js +2 -2
- package/dist/m365/teams/commands/channel/channel-list.js +2 -2
- package/dist/m365/teams/commands/channel/channel-member-add.js +2 -2
- package/dist/m365/teams/commands/channel/channel-member-list.js +2 -2
- package/dist/m365/teams/commands/channel/channel-member-remove.js +2 -2
- package/dist/m365/teams/commands/channel/channel-member-set.js +2 -2
- package/dist/m365/teams/commands/channel/channel-remove.js +2 -2
- package/dist/m365/teams/commands/channel/channel-set.js +2 -2
- package/dist/m365/teams/commands/meeting/meeting-add.js +2 -2
- package/dist/m365/teams/commands/meeting/meeting-attendancereport-list.js +2 -2
- package/dist/m365/teams/commands/meeting/meeting-get.js +3 -3
- package/dist/m365/teams/commands/meeting/meeting-list.js +2 -2
- package/dist/m365/teams/commands/meeting/meeting-transcript-list.js +2 -2
- package/dist/m365/teams/commands/tab/tab-get.js +2 -2
- package/dist/m365/teams/commands/team/team-add.js +6 -6
- package/dist/m365/teams/commands/team/team-archive.js +2 -2
- package/dist/m365/teams/commands/team/team-get.js +2 -2
- package/dist/m365/teams/commands/team/team-remove.js +2 -2
- package/dist/m365/teams/commands/team/team-unarchive.js +2 -2
- package/dist/m365/teams/commands/user/user-app-add.js +35 -3
- package/dist/request.js +16 -0
- package/dist/utils/{aadAdministrativeUnit.js → entraAdministrativeUnit.js} +2 -2
- package/dist/utils/{aadDevice.js → entraDevice.js} +2 -2
- package/dist/utils/{aadGroup.js → entraGroup.js} +2 -2
- package/dist/utils/{aadUser.js → entraUser.js} +38 -2
- package/dist/utils/md.js +2 -2
- package/dist/utils/roleAssignment.js +42 -0
- package/dist/utils/roleDefinition.js +24 -0
- package/dist/utils/spo.js +24 -2
- package/dist/utils/urlUtil.js +31 -0
- package/dist/utils/validation.js +8 -0
- package/docs/docs/cmd/adaptivecard/adaptivecard-send.mdx +1 -1
- package/docs/docs/cmd/{aad → entra}/administrativeunit/administrativeunit-add.mdx +10 -4
- package/docs/docs/cmd/{aad → entra}/administrativeunit/administrativeunit-get.mdx +9 -3
- package/docs/docs/cmd/{aad → entra}/administrativeunit/administrativeunit-list.mdx +9 -3
- package/docs/docs/cmd/{aad → entra}/administrativeunit/administrativeunit-member-add.mdx +13 -7
- package/docs/docs/cmd/{aad → entra}/administrativeunit/administrativeunit-member-get.mdx +9 -3
- package/docs/docs/cmd/{aad → entra}/administrativeunit/administrativeunit-member-list.mdx +16 -10
- package/docs/docs/cmd/{aad → entra}/administrativeunit/administrativeunit-remove.mdx +9 -3
- package/docs/docs/cmd/entra/administrativeunit/administrativeunit-roleassignment-add.mdx +116 -0
- package/docs/docs/cmd/{aad → entra}/app/app-add.mdx +44 -38
- package/docs/docs/cmd/{aad → entra}/app/app-get.mdx +23 -17
- package/docs/docs/cmd/{aad → entra}/app/app-list.mdx +11 -5
- package/docs/docs/cmd/entra/app/app-permission-add.mdx +68 -0
- package/docs/docs/cmd/entra/app/app-permission-list.mdx +105 -0
- package/docs/docs/cmd/entra/app/app-remove.mdx +65 -0
- package/docs/docs/cmd/entra/app/app-role-add.mdx +74 -0
- package/docs/docs/cmd/{aad → entra}/app/app-role-list.mdx +20 -14
- package/docs/docs/cmd/entra/app/app-role-remove.mdx +84 -0
- package/docs/docs/cmd/entra/app/app-set.mdx +103 -0
- package/docs/docs/cmd/{aad → entra}/approleassignment/approleassignment-add.mdx +14 -8
- package/docs/docs/cmd/{aad → entra}/approleassignment/approleassignment-list.mdx +12 -6
- package/docs/docs/cmd/{aad → entra}/approleassignment/approleassignment-remove.mdx +13 -7
- package/docs/docs/cmd/entra/group/group-add.mdx +231 -0
- package/docs/docs/cmd/{aad → entra}/group/group-get.mdx +15 -9
- package/docs/docs/cmd/{aad → entra}/group/group-list.mdx +13 -7
- package/docs/docs/cmd/entra/group/group-remove.mdx +50 -0
- package/docs/docs/cmd/entra/group/group-user-add.mdx +62 -0
- package/docs/docs/cmd/{aad → entra}/group/group-user-list.mdx +17 -11
- package/docs/docs/cmd/{aad → entra}/groupsetting/groupsetting-add.mdx +11 -5
- package/docs/docs/cmd/{aad → entra}/groupsetting/groupsetting-get.mdx +9 -3
- package/docs/docs/cmd/{aad → entra}/groupsetting/groupsetting-list.mdx +10 -4
- package/docs/docs/cmd/{aad → entra}/groupsetting/groupsetting-remove.mdx +9 -3
- package/docs/docs/cmd/{aad → entra}/groupsetting/groupsetting-set.mdx +10 -4
- package/docs/docs/cmd/{aad → entra}/groupsettingtemplate/groupsettingtemplate-get.mdx +11 -5
- package/docs/docs/cmd/{aad → entra}/groupsettingtemplate/groupsettingtemplate-list.mdx +10 -4
- package/docs/docs/cmd/{aad → entra}/license/license-list.mdx +9 -3
- package/docs/docs/cmd/{aad → entra}/m365group/m365group-add.mdx +17 -11
- package/docs/docs/cmd/{aad → entra}/m365group/m365group-conversation-list.mdx +9 -3
- package/docs/docs/cmd/{aad → entra}/m365group/m365group-conversation-post-list.mdx +10 -4
- package/docs/docs/cmd/{aad → entra}/m365group/m365group-get.mdx +10 -4
- package/docs/docs/cmd/{aad → entra}/m365group/m365group-list.mdx +13 -7
- package/docs/docs/cmd/{aad → entra}/m365group/m365group-recyclebinitem-clear.mdx +9 -3
- package/docs/docs/cmd/{aad → entra}/m365group/m365group-recyclebinitem-list.mdx +12 -6
- package/docs/docs/cmd/{aad → entra}/m365group/m365group-recyclebinitem-remove.mdx +10 -4
- package/docs/docs/cmd/{aad → entra}/m365group/m365group-recyclebinitem-restore.mdx +10 -4
- package/docs/docs/cmd/{aad → entra}/m365group/m365group-remove.mdx +10 -4
- package/docs/docs/cmd/{aad → entra}/m365group/m365group-renew.mdx +8 -2
- package/docs/docs/cmd/{aad → entra}/m365group/m365group-report-activitycounts.mdx +10 -4
- package/docs/docs/cmd/{aad → entra}/m365group/m365group-report-activitydetail.mdx +11 -5
- package/docs/docs/cmd/{aad → entra}/m365group/m365group-report-activityfilecounts.mdx +10 -4
- package/docs/docs/cmd/{aad → entra}/m365group/m365group-report-activitygroupcounts.mdx +10 -4
- package/docs/docs/cmd/{aad → entra}/m365group/m365group-report-activitystorage.mdx +10 -4
- package/docs/docs/cmd/{aad → entra}/m365group/m365group-set.mdx +12 -6
- package/docs/docs/cmd/{aad → entra}/m365group/m365group-teamify.mdx +9 -3
- package/docs/docs/cmd/{aad → entra}/m365group/m365group-user-add.mdx +9 -3
- package/docs/docs/cmd/entra/m365group/m365group-user-list.mdx +131 -0
- package/docs/docs/cmd/{aad → entra}/m365group/m365group-user-remove.mdx +9 -5
- package/docs/docs/cmd/{aad → entra}/m365group/m365group-user-set.mdx +10 -6
- package/docs/docs/cmd/{aad → entra}/oauth2grant/oauth2grant-add.mdx +15 -9
- package/docs/docs/cmd/{aad → entra}/oauth2grant/oauth2grant-list.mdx +11 -5
- package/docs/docs/cmd/{aad → entra}/oauth2grant/oauth2grant-remove.mdx +13 -7
- package/docs/docs/cmd/{aad → entra}/oauth2grant/oauth2grant-set.mdx +12 -6
- package/docs/docs/cmd/{aad → entra}/policy/policy-list.mdx +14 -8
- package/docs/docs/cmd/{aad → entra}/siteclassification/siteclassification-disable.mdx +9 -3
- package/docs/docs/cmd/{aad → entra}/siteclassification/siteclassification-enable.mdx +10 -4
- package/docs/docs/cmd/{aad → entra}/siteclassification/siteclassification-get.mdx +9 -3
- package/docs/docs/cmd/{aad → entra}/siteclassification/siteclassification-set.mdx +11 -5
- package/docs/docs/cmd/{aad → entra}/sp/sp-add.mdx +25 -19
- package/docs/docs/cmd/{aad → entra}/sp/sp-get.mdx +12 -6
- package/docs/docs/cmd/{aad → entra}/sp/sp-list.mdx +10 -4
- package/docs/docs/cmd/{aad → entra}/user/user-add.mdx +12 -6
- package/docs/docs/cmd/{aad → entra}/user/user-get.mdx +16 -10
- package/docs/docs/cmd/{aad → entra}/user/user-guest-add.mdx +11 -5
- package/docs/docs/cmd/{aad → entra}/user/user-hibp.mdx +10 -4
- package/docs/docs/cmd/{aad → entra}/user/user-license-add.mdx +10 -4
- package/docs/docs/cmd/{aad → entra}/user/user-license-list.mdx +11 -5
- package/docs/docs/cmd/{aad → entra}/user/user-license-remove.mdx +9 -3
- package/docs/docs/cmd/{aad → entra}/user/user-list.mdx +12 -6
- package/docs/docs/cmd/{aad → entra}/user/user-password-validate.mdx +9 -3
- package/docs/docs/cmd/{aad → entra}/user/user-recyclebinitem-clear.mdx +9 -3
- package/docs/docs/cmd/{aad → entra}/user/user-recyclebinitem-list.mdx +9 -3
- package/docs/docs/cmd/{aad → entra}/user/user-recyclebinitem-remove.mdx +9 -3
- package/docs/docs/cmd/{aad → entra}/user/user-recyclebinitem-restore.mdx +8 -2
- package/docs/docs/cmd/{aad → entra}/user/user-remove.mdx +9 -3
- package/docs/docs/cmd/{aad → entra}/user/user-set.mdx +15 -9
- package/docs/docs/cmd/{aad → entra}/user/user-signin-list.mdx +19 -13
- package/docs/docs/cmd/external/connection/connection-urltoitemresolver-add.mdx +47 -0
- package/docs/docs/cmd/file/file-copy.mdx +68 -0
- package/docs/docs/cmd/flow/run/run-get.mdx +167 -4
- package/docs/docs/cmd/graph/schemaextension/schemaextension-add.mdx +1 -1
- package/docs/docs/cmd/graph/schemaextension/schemaextension-set.mdx +1 -1
- package/docs/docs/cmd/pa/app/app-get.mdx +15 -0
- package/docs/docs/cmd/pa/app/app-remove.mdx +14 -0
- package/docs/docs/cmd/planner/plan/plan-add.mdx +1 -1
- package/docs/docs/cmd/spo/applicationcustomizer/applicationcustomizer-add.mdx +1 -1
- package/docs/docs/cmd/spo/applicationcustomizer/applicationcustomizer-set.mdx +1 -1
- package/docs/docs/cmd/spo/commandset/commandset-add.mdx +1 -1
- package/docs/docs/cmd/spo/commandset/commandset-set.mdx +1 -1
- package/docs/docs/cmd/spo/contenttype/contenttype-set.mdx +1 -1
- package/docs/docs/cmd/spo/customaction/customaction-add.mdx +1 -1
- package/docs/docs/cmd/spo/customaction/customaction-set.mdx +1 -1
- package/docs/docs/cmd/spo/field/field-set.mdx +1 -1
- package/docs/docs/cmd/spo/group/group-member-add.mdx +19 -7
- package/docs/docs/cmd/spo/group/group-member-remove.mdx +12 -6
- package/docs/docs/cmd/spo/list/list-view-set.mdx +1 -1
- package/docs/docs/cmd/spo/listitem/listitem-add.mdx +1 -1
- package/docs/docs/cmd/spo/listitem/listitem-batch-add.mdx +1 -1
- package/docs/docs/cmd/spo/listitem/listitem-list.mdx +1 -1
- package/docs/docs/cmd/spo/listitem/listitem-set.mdx +1 -1
- package/docs/docs/cmd/spo/page/page-clientsidewebpart-add.mdx +1 -1
- package/docs/docs/cmd/spo/page/page-control-set.mdx +1 -1
- package/docs/docs/cmd/spo/page/page-set.mdx +2 -2
- package/docs/docs/cmd/spo/site/site-add.mdx +1 -1
- package/docs/docs/cmd/spo/tenant/tenant-applicationcustomizer-add.mdx +1 -1
- package/docs/docs/cmd/spo/tenant/tenant-applicationcustomizer-set.mdx +1 -1
- package/docs/docs/cmd/spo/tenant/tenant-commandset-add.mdx +1 -1
- package/docs/docs/cmd/spo/tenant/tenant-commandset-set.mdx +1 -1
- package/docs/docs/cmd/spo/term/term-add.mdx +1 -1
- package/docs/docs/cmd/spo/term/term-group-add.mdx +1 -1
- package/docs/docs/cmd/spo/term/term-set-add.mdx +1 -1
- package/docs/docs/cmd/spo/user/user-ensure.mdx +8 -5
- package/docs/docs/cmd/teams/team/team-add.mdx +1 -1
- package/docs/docs/cmd/teams/user/user-app-add.mdx +8 -5
- package/npm-shrinkwrap.json +298 -542
- package/package.json +21 -21
- package/dist/m365/aad/commands/m365group/m365group-user-list.js +0 -94
- package/dist/m365/aad/commands/user/user-get.js +0 -111
- package/docs/docs/cmd/aad/app/app-permission-add.mdx +0 -62
- package/docs/docs/cmd/aad/app/app-remove.mdx +0 -59
- package/docs/docs/cmd/aad/app/app-role-add.mdx +0 -68
- package/docs/docs/cmd/aad/app/app-role-remove.mdx +0 -78
- package/docs/docs/cmd/aad/app/app-set.mdx +0 -97
- package/docs/docs/cmd/aad/group/group-remove.mdx +0 -44
- package/docs/docs/cmd/aad/m365group/m365group-user-list.mdx +0 -99
- /package/dist/m365/{aad → entra}/commands/approleassignment/ServicePrincipal.js +0 -0
- /package/dist/m365/{aad → entra}/commands/m365group/GroupExtended.js +0 -0
- /package/dist/m365/{aad → entra}/commands/siteclassification/SiteClassificationSettings.js +0 -0
|
@@ -3,26 +3,30 @@ 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
|
|
6
|
+
var _EntraAppRoleAssignmentListCommand_instances, _EntraAppRoleAssignmentListCommand_initTelemetry, _EntraAppRoleAssignmentListCommand_initOptions, _EntraAppRoleAssignmentListCommand_initValidators, _EntraAppRoleAssignmentListCommand_initOptionSets;
|
|
7
7
|
import request from '../../../../request.js';
|
|
8
8
|
import { formatting } from '../../../../utils/formatting.js';
|
|
9
9
|
import { validation } from '../../../../utils/validation.js';
|
|
10
10
|
import GraphCommand from '../../../base/GraphCommand.js';
|
|
11
11
|
import commands from '../../commands.js';
|
|
12
|
-
|
|
12
|
+
import aadCommands from '../../aadCommands.js';
|
|
13
|
+
class EntraAppRoleAssignmentListCommand extends GraphCommand {
|
|
13
14
|
get name() {
|
|
14
15
|
return commands.APPROLEASSIGNMENT_LIST;
|
|
15
16
|
}
|
|
16
17
|
get description() {
|
|
17
18
|
return 'Lists app role assignments for the specified application registration';
|
|
18
19
|
}
|
|
20
|
+
alias() {
|
|
21
|
+
return [aadCommands.APPROLEASSIGNMENT_LIST];
|
|
22
|
+
}
|
|
19
23
|
constructor() {
|
|
20
24
|
super();
|
|
21
|
-
|
|
22
|
-
__classPrivateFieldGet(this,
|
|
23
|
-
__classPrivateFieldGet(this,
|
|
24
|
-
__classPrivateFieldGet(this,
|
|
25
|
-
__classPrivateFieldGet(this,
|
|
25
|
+
_EntraAppRoleAssignmentListCommand_instances.add(this);
|
|
26
|
+
__classPrivateFieldGet(this, _EntraAppRoleAssignmentListCommand_instances, "m", _EntraAppRoleAssignmentListCommand_initTelemetry).call(this);
|
|
27
|
+
__classPrivateFieldGet(this, _EntraAppRoleAssignmentListCommand_instances, "m", _EntraAppRoleAssignmentListCommand_initOptions).call(this);
|
|
28
|
+
__classPrivateFieldGet(this, _EntraAppRoleAssignmentListCommand_instances, "m", _EntraAppRoleAssignmentListCommand_initValidators).call(this);
|
|
29
|
+
__classPrivateFieldGet(this, _EntraAppRoleAssignmentListCommand_instances, "m", _EntraAppRoleAssignmentListCommand_initOptionSets).call(this);
|
|
26
30
|
}
|
|
27
31
|
defaultProperties() {
|
|
28
32
|
return ['resourceDisplayName', 'roleName'];
|
|
@@ -115,7 +119,7 @@ class AadAppRoleAssignmentListCommand extends GraphCommand {
|
|
|
115
119
|
return request.get(spRequestOptions);
|
|
116
120
|
}
|
|
117
121
|
}
|
|
118
|
-
|
|
122
|
+
_EntraAppRoleAssignmentListCommand_instances = new WeakSet(), _EntraAppRoleAssignmentListCommand_initTelemetry = function _EntraAppRoleAssignmentListCommand_initTelemetry() {
|
|
119
123
|
this.telemetry.push((args) => {
|
|
120
124
|
Object.assign(this.telemetryProperties, {
|
|
121
125
|
appId: typeof args.options.appId !== 'undefined',
|
|
@@ -123,7 +127,7 @@ _AadAppRoleAssignmentListCommand_instances = new WeakSet(), _AadAppRoleAssignmen
|
|
|
123
127
|
appObjectId: typeof args.options.appObjectId !== 'undefined'
|
|
124
128
|
});
|
|
125
129
|
});
|
|
126
|
-
},
|
|
130
|
+
}, _EntraAppRoleAssignmentListCommand_initOptions = function _EntraAppRoleAssignmentListCommand_initOptions() {
|
|
127
131
|
this.options.unshift({
|
|
128
132
|
option: '-i, --appId [appId]'
|
|
129
133
|
}, {
|
|
@@ -131,7 +135,7 @@ _AadAppRoleAssignmentListCommand_instances = new WeakSet(), _AadAppRoleAssignmen
|
|
|
131
135
|
}, {
|
|
132
136
|
option: '--appObjectId [appObjectId]'
|
|
133
137
|
});
|
|
134
|
-
},
|
|
138
|
+
}, _EntraAppRoleAssignmentListCommand_initValidators = function _EntraAppRoleAssignmentListCommand_initValidators() {
|
|
135
139
|
this.validators.push(async (args) => {
|
|
136
140
|
if (args.options.appId && !validation.isValidGuid(args.options.appId)) {
|
|
137
141
|
return `${args.options.appId} is not a valid GUID`;
|
|
@@ -141,8 +145,8 @@ _AadAppRoleAssignmentListCommand_instances = new WeakSet(), _AadAppRoleAssignmen
|
|
|
141
145
|
}
|
|
142
146
|
return true;
|
|
143
147
|
});
|
|
144
|
-
},
|
|
148
|
+
}, _EntraAppRoleAssignmentListCommand_initOptionSets = function _EntraAppRoleAssignmentListCommand_initOptionSets() {
|
|
145
149
|
this.optionSets.push({ options: ['appId', 'appObjectId', 'appDisplayName'] });
|
|
146
150
|
};
|
|
147
|
-
export default new
|
|
151
|
+
export default new EntraAppRoleAssignmentListCommand();
|
|
148
152
|
//# sourceMappingURL=approleassignment-list.js.map
|
|
@@ -3,7 +3,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
3
3
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
4
4
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
5
5
|
};
|
|
6
|
-
var
|
|
6
|
+
var _EntraAppRoleAssignmentRemoveCommand_instances, _EntraAppRoleAssignmentRemoveCommand_initTelemetry, _EntraAppRoleAssignmentRemoveCommand_initOptions, _EntraAppRoleAssignmentRemoveCommand_initValidators, _EntraAppRoleAssignmentRemoveCommand_initOptionSets;
|
|
7
7
|
import os from 'os';
|
|
8
8
|
import { cli } from '../../../../cli/cli.js';
|
|
9
9
|
import request from '../../../../request.js';
|
|
@@ -11,20 +11,24 @@ import { formatting } from '../../../../utils/formatting.js';
|
|
|
11
11
|
import { validation } from '../../../../utils/validation.js';
|
|
12
12
|
import GraphCommand from '../../../base/GraphCommand.js';
|
|
13
13
|
import commands from '../../commands.js';
|
|
14
|
-
|
|
14
|
+
import aadCommands from '../../aadCommands.js';
|
|
15
|
+
class EntraAppRoleAssignmentRemoveCommand extends GraphCommand {
|
|
15
16
|
get name() {
|
|
16
17
|
return commands.APPROLEASSIGNMENT_REMOVE;
|
|
17
18
|
}
|
|
18
19
|
get description() {
|
|
19
|
-
return 'Deletes an app role assignment for the specified
|
|
20
|
+
return 'Deletes an app role assignment for the specified Entra Application Registration';
|
|
21
|
+
}
|
|
22
|
+
alias() {
|
|
23
|
+
return [aadCommands.APPROLEASSIGNMENT_REMOVE];
|
|
20
24
|
}
|
|
21
25
|
constructor() {
|
|
22
26
|
super();
|
|
23
|
-
|
|
24
|
-
__classPrivateFieldGet(this,
|
|
25
|
-
__classPrivateFieldGet(this,
|
|
26
|
-
__classPrivateFieldGet(this,
|
|
27
|
-
__classPrivateFieldGet(this,
|
|
27
|
+
_EntraAppRoleAssignmentRemoveCommand_instances.add(this);
|
|
28
|
+
__classPrivateFieldGet(this, _EntraAppRoleAssignmentRemoveCommand_instances, "m", _EntraAppRoleAssignmentRemoveCommand_initTelemetry).call(this);
|
|
29
|
+
__classPrivateFieldGet(this, _EntraAppRoleAssignmentRemoveCommand_instances, "m", _EntraAppRoleAssignmentRemoveCommand_initOptions).call(this);
|
|
30
|
+
__classPrivateFieldGet(this, _EntraAppRoleAssignmentRemoveCommand_instances, "m", _EntraAppRoleAssignmentRemoveCommand_initValidators).call(this);
|
|
31
|
+
__classPrivateFieldGet(this, _EntraAppRoleAssignmentRemoveCommand_instances, "m", _EntraAppRoleAssignmentRemoveCommand_initOptionSets).call(this);
|
|
28
32
|
}
|
|
29
33
|
async commandAction(logger, args) {
|
|
30
34
|
const removeAppRoleAssignment = async () => {
|
|
@@ -138,7 +142,7 @@ class AadAppRoleAssignmentRemoveCommand extends GraphCommand {
|
|
|
138
142
|
return request.delete(spRequestOptions);
|
|
139
143
|
}
|
|
140
144
|
}
|
|
141
|
-
|
|
145
|
+
_EntraAppRoleAssignmentRemoveCommand_instances = new WeakSet(), _EntraAppRoleAssignmentRemoveCommand_initTelemetry = function _EntraAppRoleAssignmentRemoveCommand_initTelemetry() {
|
|
142
146
|
this.telemetry.push((args) => {
|
|
143
147
|
Object.assign(this.telemetryProperties, {
|
|
144
148
|
appId: typeof args.options.appId !== 'undefined',
|
|
@@ -147,7 +151,7 @@ _AadAppRoleAssignmentRemoveCommand_instances = new WeakSet(), _AadAppRoleAssignm
|
|
|
147
151
|
force: (!!args.options.force).toString()
|
|
148
152
|
});
|
|
149
153
|
});
|
|
150
|
-
},
|
|
154
|
+
}, _EntraAppRoleAssignmentRemoveCommand_initOptions = function _EntraAppRoleAssignmentRemoveCommand_initOptions() {
|
|
151
155
|
this.options.unshift({
|
|
152
156
|
option: '--appId [appId]'
|
|
153
157
|
}, {
|
|
@@ -162,7 +166,7 @@ _AadAppRoleAssignmentRemoveCommand_instances = new WeakSet(), _AadAppRoleAssignm
|
|
|
162
166
|
}, {
|
|
163
167
|
option: '-f, --force'
|
|
164
168
|
});
|
|
165
|
-
},
|
|
169
|
+
}, _EntraAppRoleAssignmentRemoveCommand_initValidators = function _EntraAppRoleAssignmentRemoveCommand_initValidators() {
|
|
166
170
|
this.validators.push(async (args) => {
|
|
167
171
|
if (args.options.appId && !validation.isValidGuid(args.options.appId)) {
|
|
168
172
|
return `${args.options.appId} is not a valid GUID`;
|
|
@@ -172,8 +176,8 @@ _AadAppRoleAssignmentRemoveCommand_instances = new WeakSet(), _AadAppRoleAssignm
|
|
|
172
176
|
}
|
|
173
177
|
return true;
|
|
174
178
|
});
|
|
175
|
-
},
|
|
179
|
+
}, _EntraAppRoleAssignmentRemoveCommand_initOptionSets = function _EntraAppRoleAssignmentRemoveCommand_initOptionSets() {
|
|
176
180
|
this.optionSets.push({ options: ['appId', 'appObjectId', 'appDisplayName'] });
|
|
177
181
|
};
|
|
178
|
-
export default new
|
|
182
|
+
export default new EntraAppRoleAssignmentRemoveCommand();
|
|
179
183
|
//# sourceMappingURL=approleassignment-remove.js.map
|
|
@@ -0,0 +1,224 @@
|
|
|
1
|
+
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
2
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
3
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
4
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
5
|
+
};
|
|
6
|
+
var _EntraGroupAddCommand_instances, _EntraGroupAddCommand_initOptions, _EntraGroupAddCommand_initValidators, _EntraGroupAddCommand_initTelemetry;
|
|
7
|
+
import GraphCommand from '../../../base/GraphCommand.js';
|
|
8
|
+
import commands from '../../commands.js';
|
|
9
|
+
import aadCommands from '../../aadCommands.js';
|
|
10
|
+
import { validation } from '../../../../utils/validation.js';
|
|
11
|
+
import request from '../../../../request.js';
|
|
12
|
+
import { entraUser } from '../../../../utils/entraUser.js';
|
|
13
|
+
class EntraGroupAddCommand extends GraphCommand {
|
|
14
|
+
get name() {
|
|
15
|
+
return commands.GROUP_ADD;
|
|
16
|
+
}
|
|
17
|
+
get description() {
|
|
18
|
+
return 'Creates a Microsoft Entra group';
|
|
19
|
+
}
|
|
20
|
+
alias() {
|
|
21
|
+
return [aadCommands.GROUP_ADD];
|
|
22
|
+
}
|
|
23
|
+
allowUnknownOptions() {
|
|
24
|
+
return true;
|
|
25
|
+
}
|
|
26
|
+
constructor() {
|
|
27
|
+
super();
|
|
28
|
+
_EntraGroupAddCommand_instances.add(this);
|
|
29
|
+
__classPrivateFieldGet(this, _EntraGroupAddCommand_instances, "m", _EntraGroupAddCommand_initTelemetry).call(this);
|
|
30
|
+
__classPrivateFieldGet(this, _EntraGroupAddCommand_instances, "m", _EntraGroupAddCommand_initOptions).call(this);
|
|
31
|
+
__classPrivateFieldGet(this, _EntraGroupAddCommand_instances, "m", _EntraGroupAddCommand_initValidators).call(this);
|
|
32
|
+
}
|
|
33
|
+
async commandAction(logger, args) {
|
|
34
|
+
let group;
|
|
35
|
+
let ownerIds = [];
|
|
36
|
+
let memberIds = [];
|
|
37
|
+
try {
|
|
38
|
+
const manifest = this.createRequestBody(args.options);
|
|
39
|
+
const requestOptions = {
|
|
40
|
+
url: `${this.resource}/v1.0/groups`,
|
|
41
|
+
headers: {
|
|
42
|
+
accept: 'application/json;odata.metadata=none'
|
|
43
|
+
},
|
|
44
|
+
responseType: 'json',
|
|
45
|
+
data: manifest
|
|
46
|
+
};
|
|
47
|
+
ownerIds = await this.getUserIds(logger, args.options.ownerIds, args.options.ownerUserNames);
|
|
48
|
+
memberIds = await this.getUserIds(logger, args.options.memberIds, args.options.memberUserNames);
|
|
49
|
+
group = await request.post(requestOptions);
|
|
50
|
+
if (ownerIds.length !== 0) {
|
|
51
|
+
await this.addUsers(group.id, 'owners', ownerIds);
|
|
52
|
+
}
|
|
53
|
+
if (memberIds.length !== 0) {
|
|
54
|
+
await this.addUsers(group.id, 'members', memberIds);
|
|
55
|
+
}
|
|
56
|
+
await logger.log(group);
|
|
57
|
+
}
|
|
58
|
+
catch (err) {
|
|
59
|
+
this.handleRejectedODataJsonPromise(err);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
;
|
|
63
|
+
createRequestBody(options) {
|
|
64
|
+
const requestBody = {
|
|
65
|
+
displayName: options.displayName,
|
|
66
|
+
description: options.description,
|
|
67
|
+
mailNickName: options.mailNickname ?? this.generateMailNickname(),
|
|
68
|
+
visibility: options.visibility ?? 'Public',
|
|
69
|
+
groupTypes: options.type === 'microsoft365' ? ['Unified'] : [],
|
|
70
|
+
mailEnabled: options.type === 'security' ? false : true,
|
|
71
|
+
securityEnabled: true
|
|
72
|
+
};
|
|
73
|
+
this.addUnknownOptionsToPayload(requestBody, options);
|
|
74
|
+
return requestBody;
|
|
75
|
+
}
|
|
76
|
+
generateMailNickname() {
|
|
77
|
+
return `Group${Math.floor(Math.random() * 1000000)}`;
|
|
78
|
+
}
|
|
79
|
+
async getUserIds(logger, userIds, userNames) {
|
|
80
|
+
if (userIds) {
|
|
81
|
+
return userIds.split(',').map(o => o.trim());
|
|
82
|
+
}
|
|
83
|
+
if (!userNames) {
|
|
84
|
+
if (this.verbose) {
|
|
85
|
+
await logger.logToStderr('No users to validate, skipping.');
|
|
86
|
+
}
|
|
87
|
+
return [];
|
|
88
|
+
}
|
|
89
|
+
if (this.verbose) {
|
|
90
|
+
await logger.logToStderr('Retrieving user information.');
|
|
91
|
+
}
|
|
92
|
+
const userArr = userNames.split(',').map(o => o.trim());
|
|
93
|
+
if (this.verbose) {
|
|
94
|
+
await logger.logToStderr('Retrieving ID(s) of user(s)...');
|
|
95
|
+
}
|
|
96
|
+
return entraUser.getUserIdsByUpns(userArr);
|
|
97
|
+
}
|
|
98
|
+
async addUsers(groupId, role, userIds) {
|
|
99
|
+
for (let i = 0; i < userIds.length; i += 400) {
|
|
100
|
+
const userIdsBatch = userIds.slice(i, i + 400);
|
|
101
|
+
const requestOptions = {
|
|
102
|
+
url: `${this.resource}/v1.0/$batch`,
|
|
103
|
+
headers: {
|
|
104
|
+
'content-type': 'application/json;odata.metadata=none'
|
|
105
|
+
},
|
|
106
|
+
responseType: 'json',
|
|
107
|
+
data: {
|
|
108
|
+
requests: []
|
|
109
|
+
}
|
|
110
|
+
};
|
|
111
|
+
// only 20 requests per one batch are allowed
|
|
112
|
+
for (let j = 0; j < userIdsBatch.length; j += 20) {
|
|
113
|
+
// only 20 users can be added in one request
|
|
114
|
+
const userIdsChunk = userIdsBatch.slice(j, j + 20);
|
|
115
|
+
requestOptions.data.requests.push({
|
|
116
|
+
id: j + 1,
|
|
117
|
+
method: 'PATCH',
|
|
118
|
+
url: `/groups/${groupId}`,
|
|
119
|
+
headers: {
|
|
120
|
+
'content-type': 'application/json;odata.metadata=none'
|
|
121
|
+
},
|
|
122
|
+
body: {
|
|
123
|
+
[`${role}@odata.bind`]: userIdsChunk.map(u => `${this.resource}/v1.0/directoryObjects/${u}`)
|
|
124
|
+
}
|
|
125
|
+
});
|
|
126
|
+
}
|
|
127
|
+
const res = await request.post(requestOptions);
|
|
128
|
+
for (const response of res.responses) {
|
|
129
|
+
if (response.status !== 204) {
|
|
130
|
+
throw response.body;
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
_EntraGroupAddCommand_instances = new WeakSet(), _EntraGroupAddCommand_initOptions = function _EntraGroupAddCommand_initOptions() {
|
|
137
|
+
this.options.unshift({
|
|
138
|
+
option: '-n, --displayName <displayName>'
|
|
139
|
+
}, {
|
|
140
|
+
option: '-d, --description [description]'
|
|
141
|
+
}, {
|
|
142
|
+
option: '-t, --type <type>',
|
|
143
|
+
autocomplete: ['microsoft365', 'security']
|
|
144
|
+
}, {
|
|
145
|
+
option: '-m, --mailNickname [mailNickname]'
|
|
146
|
+
}, {
|
|
147
|
+
option: '--ownerIds [ownerIds]'
|
|
148
|
+
}, {
|
|
149
|
+
option: '--ownerUserNames [ownerUserNames]'
|
|
150
|
+
}, {
|
|
151
|
+
option: '--memberIds [memberIds]'
|
|
152
|
+
}, {
|
|
153
|
+
option: '--memberUserNames [memberUserNames]'
|
|
154
|
+
}, {
|
|
155
|
+
option: '--visibility [visibility]',
|
|
156
|
+
autocomplete: ['Public', 'Private', 'HiddenMembership']
|
|
157
|
+
});
|
|
158
|
+
}, _EntraGroupAddCommand_initValidators = function _EntraGroupAddCommand_initValidators() {
|
|
159
|
+
this.validators.push(async (args) => {
|
|
160
|
+
if (args.options.displayName.length > 256) {
|
|
161
|
+
return `The maximum amount of characters for 'displayName' is 256.`;
|
|
162
|
+
}
|
|
163
|
+
if (args.options.mailNickname) {
|
|
164
|
+
if (!validation.isValidMailNickname(args.options.mailNickname)) {
|
|
165
|
+
return `Value for option 'mailNickname' must contain only characters in the ASCII character set 0-127 except the following: @ () \ [] " ; : <> , SPACE.`;
|
|
166
|
+
}
|
|
167
|
+
if (args.options.mailNickname.length > 64) {
|
|
168
|
+
return `The maximum amount of characters for 'mailNickname' is 64.`;
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
if (args.options.ownerIds) {
|
|
172
|
+
const ids = args.options.ownerIds.split(',').map(i => i.trim());
|
|
173
|
+
if (!validation.isValidGuidArray(ids)) {
|
|
174
|
+
const invalidGuid = ids.find(id => !validation.isValidGuid(id));
|
|
175
|
+
return `'${invalidGuid}' is not a valid GUID for option 'ownerIds'.`;
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
if (args.options.ownerUserNames) {
|
|
179
|
+
const isValidUserPrincipalNameArray = validation.isValidUserPrincipalNameArray(args.options.ownerUserNames.split(',').map(u => u.trim()));
|
|
180
|
+
if (isValidUserPrincipalNameArray !== true) {
|
|
181
|
+
return `User principal name '${isValidUserPrincipalNameArray}' is invalid for option 'ownerUserNames'.`;
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
if (args.options.memberIds) {
|
|
185
|
+
const ids = args.options.memberIds.split(',').map(i => i.trim());
|
|
186
|
+
if (!validation.isValidGuidArray(ids)) {
|
|
187
|
+
const invalidGuid = ids.find(id => !validation.isValidGuid(id));
|
|
188
|
+
return `'${invalidGuid}' is not a valid GUID for option 'memberIds'.`;
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
if (args.options.memberUserNames) {
|
|
192
|
+
const isValidUserPrincipalNameArray = validation.isValidUserPrincipalNameArray(args.options.memberUserNames.split(',').map(u => u.trim()));
|
|
193
|
+
if (isValidUserPrincipalNameArray !== true) {
|
|
194
|
+
return `User principal name '${isValidUserPrincipalNameArray}' is invalid for option 'memberUserNames'.`;
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
if (['microsoft365', 'security'].indexOf(args.options.type) === -1) {
|
|
198
|
+
return `Option 'type' must be one of the following values: microsoft365, security.`;
|
|
199
|
+
}
|
|
200
|
+
if (args.options.type === 'microsoft365' && !args.options.visibility) {
|
|
201
|
+
return `Option 'visibility' must be specified if the option 'type' is set to microsoft365`;
|
|
202
|
+
}
|
|
203
|
+
if (args.options.visibility && ['Public', 'Private', 'HiddenMembership'].indexOf(args.options.visibility) === -1) {
|
|
204
|
+
return `Option 'visibility' must be one of the following values: Public, Private, HiddenMembership.`;
|
|
205
|
+
}
|
|
206
|
+
return true;
|
|
207
|
+
});
|
|
208
|
+
}, _EntraGroupAddCommand_initTelemetry = function _EntraGroupAddCommand_initTelemetry() {
|
|
209
|
+
this.telemetry.push((args) => {
|
|
210
|
+
Object.assign(this.telemetryProperties, {
|
|
211
|
+
displayName: typeof args.options.displayName !== 'undefined',
|
|
212
|
+
description: typeof args.options.description !== 'undefined',
|
|
213
|
+
type: typeof args.options.type !== 'undefined',
|
|
214
|
+
mailNickname: typeof args.options.mailNickname !== 'undefined',
|
|
215
|
+
ownerIds: typeof args.options.ownerIds !== 'undefined',
|
|
216
|
+
ownerUserNames: typeof args.options.ownerUserNames !== 'undefined',
|
|
217
|
+
memberIds: typeof args.options.memberIds !== 'undefined',
|
|
218
|
+
memberUserNames: typeof args.options.memberUserNames !== 'undefined',
|
|
219
|
+
visibility: typeof args.options.visibility !== 'undefined'
|
|
220
|
+
});
|
|
221
|
+
});
|
|
222
|
+
};
|
|
223
|
+
export default new EntraGroupAddCommand();
|
|
224
|
+
//# sourceMappingURL=group-add.js.map
|
|
@@ -3,34 +3,38 @@ 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
|
|
7
|
-
import {
|
|
6
|
+
var _EntraGroupGetCommand_instances, _EntraGroupGetCommand_initOptions, _EntraGroupGetCommand_initValidators, _EntraGroupGetCommand_initOptionSets, _EntraGroupGetCommand_initTelemetry;
|
|
7
|
+
import { entraGroup } from '../../../../utils/entraGroup.js';
|
|
8
8
|
import { validation } from '../../../../utils/validation.js';
|
|
9
9
|
import GraphCommand from '../../../base/GraphCommand.js';
|
|
10
10
|
import commands from '../../commands.js';
|
|
11
|
-
|
|
11
|
+
import aadCommands from '../../aadCommands.js';
|
|
12
|
+
class EntraGroupGetCommand extends GraphCommand {
|
|
12
13
|
get name() {
|
|
13
14
|
return commands.GROUP_GET;
|
|
14
15
|
}
|
|
15
16
|
get description() {
|
|
16
|
-
return 'Gets information about the specified
|
|
17
|
+
return 'Gets information about the specified Entra group';
|
|
18
|
+
}
|
|
19
|
+
alias() {
|
|
20
|
+
return [aadCommands.GROUP_GET];
|
|
17
21
|
}
|
|
18
22
|
constructor() {
|
|
19
23
|
super();
|
|
20
|
-
|
|
21
|
-
__classPrivateFieldGet(this,
|
|
22
|
-
__classPrivateFieldGet(this,
|
|
23
|
-
__classPrivateFieldGet(this,
|
|
24
|
-
__classPrivateFieldGet(this,
|
|
24
|
+
_EntraGroupGetCommand_instances.add(this);
|
|
25
|
+
__classPrivateFieldGet(this, _EntraGroupGetCommand_instances, "m", _EntraGroupGetCommand_initOptions).call(this);
|
|
26
|
+
__classPrivateFieldGet(this, _EntraGroupGetCommand_instances, "m", _EntraGroupGetCommand_initValidators).call(this);
|
|
27
|
+
__classPrivateFieldGet(this, _EntraGroupGetCommand_instances, "m", _EntraGroupGetCommand_initOptionSets).call(this);
|
|
28
|
+
__classPrivateFieldGet(this, _EntraGroupGetCommand_instances, "m", _EntraGroupGetCommand_initTelemetry).call(this);
|
|
25
29
|
}
|
|
26
30
|
async commandAction(logger, args) {
|
|
27
31
|
let group;
|
|
28
32
|
try {
|
|
29
33
|
if (args.options.id) {
|
|
30
|
-
group = await
|
|
34
|
+
group = await entraGroup.getGroupById(args.options.id);
|
|
31
35
|
}
|
|
32
36
|
else {
|
|
33
|
-
group = await
|
|
37
|
+
group = await entraGroup.getGroupByDisplayName(args.options.displayName);
|
|
34
38
|
}
|
|
35
39
|
await logger.log(group);
|
|
36
40
|
}
|
|
@@ -39,22 +43,22 @@ class AadGroupGetCommand extends GraphCommand {
|
|
|
39
43
|
}
|
|
40
44
|
}
|
|
41
45
|
}
|
|
42
|
-
|
|
46
|
+
_EntraGroupGetCommand_instances = new WeakSet(), _EntraGroupGetCommand_initOptions = function _EntraGroupGetCommand_initOptions() {
|
|
43
47
|
this.options.unshift({
|
|
44
48
|
option: '-i, --id [id]'
|
|
45
49
|
}, {
|
|
46
50
|
option: '-n, --displayName [displayName]'
|
|
47
51
|
});
|
|
48
|
-
},
|
|
52
|
+
}, _EntraGroupGetCommand_initValidators = function _EntraGroupGetCommand_initValidators() {
|
|
49
53
|
this.validators.push(async (args) => {
|
|
50
54
|
if (args.options.id && !validation.isValidGuid(args.options.id)) {
|
|
51
55
|
return `${args.options.id} is not a valid GUID`;
|
|
52
56
|
}
|
|
53
57
|
return true;
|
|
54
58
|
});
|
|
55
|
-
},
|
|
59
|
+
}, _EntraGroupGetCommand_initOptionSets = function _EntraGroupGetCommand_initOptionSets() {
|
|
56
60
|
this.optionSets.push({ options: ['id', 'displayName'] });
|
|
57
|
-
},
|
|
61
|
+
}, _EntraGroupGetCommand_initTelemetry = function _EntraGroupGetCommand_initTelemetry() {
|
|
58
62
|
this.telemetry.push((args) => {
|
|
59
63
|
Object.assign(this.telemetryProperties, {
|
|
60
64
|
id: typeof args.options.id !== 'undefined',
|
|
@@ -62,5 +66,5 @@ _AadGroupGetCommand_instances = new WeakSet(), _AadGroupGetCommand_initOptions =
|
|
|
62
66
|
});
|
|
63
67
|
});
|
|
64
68
|
};
|
|
65
|
-
export default new
|
|
69
|
+
export default new EntraGroupGetCommand();
|
|
66
70
|
//# sourceMappingURL=group-get.js.map
|
|
@@ -3,27 +3,31 @@ 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
|
|
6
|
+
var _EntraGroupListCommand_instances, _a, _EntraGroupListCommand_initTelemetry, _EntraGroupListCommand_initOptions, _EntraGroupListCommand_initValidators;
|
|
7
7
|
import { cli } from '../../../../cli/cli.js';
|
|
8
8
|
import { odata } from '../../../../utils/odata.js';
|
|
9
9
|
import GraphCommand from '../../../base/GraphCommand.js';
|
|
10
10
|
import commands from '../../commands.js';
|
|
11
|
-
|
|
11
|
+
import aadCommands from '../../aadCommands.js';
|
|
12
|
+
class EntraGroupListCommand extends GraphCommand {
|
|
12
13
|
get name() {
|
|
13
14
|
return commands.GROUP_LIST;
|
|
14
15
|
}
|
|
15
16
|
get description() {
|
|
16
|
-
return 'Lists all groups defined in
|
|
17
|
+
return 'Lists all groups defined in Entra ID.';
|
|
18
|
+
}
|
|
19
|
+
alias() {
|
|
20
|
+
return [aadCommands.GROUP_LIST];
|
|
17
21
|
}
|
|
18
22
|
defaultProperties() {
|
|
19
23
|
return ['id', 'displayName', 'groupType'];
|
|
20
24
|
}
|
|
21
25
|
constructor() {
|
|
22
26
|
super();
|
|
23
|
-
|
|
24
|
-
__classPrivateFieldGet(this,
|
|
25
|
-
__classPrivateFieldGet(this,
|
|
26
|
-
__classPrivateFieldGet(this,
|
|
27
|
+
_EntraGroupListCommand_instances.add(this);
|
|
28
|
+
__classPrivateFieldGet(this, _EntraGroupListCommand_instances, "m", _EntraGroupListCommand_initTelemetry).call(this);
|
|
29
|
+
__classPrivateFieldGet(this, _EntraGroupListCommand_instances, "m", _EntraGroupListCommand_initOptions).call(this);
|
|
30
|
+
__classPrivateFieldGet(this, _EntraGroupListCommand_instances, "m", _EntraGroupListCommand_initValidators).call(this);
|
|
27
31
|
}
|
|
28
32
|
async commandAction(logger, args) {
|
|
29
33
|
try {
|
|
@@ -86,18 +90,18 @@ class AadGroupListCommand extends GraphCommand {
|
|
|
86
90
|
}
|
|
87
91
|
}
|
|
88
92
|
}
|
|
89
|
-
_a =
|
|
93
|
+
_a = EntraGroupListCommand, _EntraGroupListCommand_instances = new WeakSet(), _EntraGroupListCommand_initTelemetry = function _EntraGroupListCommand_initTelemetry() {
|
|
90
94
|
this.telemetry.push((args) => {
|
|
91
95
|
Object.assign(this.telemetryProperties, {
|
|
92
96
|
type: typeof args.options.type !== 'undefined'
|
|
93
97
|
});
|
|
94
98
|
});
|
|
95
|
-
},
|
|
99
|
+
}, _EntraGroupListCommand_initOptions = function _EntraGroupListCommand_initOptions() {
|
|
96
100
|
this.options.unshift({
|
|
97
101
|
option: '--type [type]',
|
|
98
102
|
autocomplete: _a.groupTypes
|
|
99
103
|
});
|
|
100
|
-
},
|
|
104
|
+
}, _EntraGroupListCommand_initValidators = function _EntraGroupListCommand_initValidators() {
|
|
101
105
|
this.validators.push(async (args) => {
|
|
102
106
|
if (args.options.type && _a.groupTypes.every(g => g.toLowerCase() !== args.options.type?.toLowerCase())) {
|
|
103
107
|
return `${args.options.type} is not a valid type value. Allowed values microsoft365|security|distribution|mailEnabledSecurity.`;
|
|
@@ -105,6 +109,6 @@ _a = AadGroupListCommand, _AadGroupListCommand_instances = new WeakSet(), _AadGr
|
|
|
105
109
|
return true;
|
|
106
110
|
});
|
|
107
111
|
};
|
|
108
|
-
|
|
109
|
-
export default new
|
|
112
|
+
EntraGroupListCommand.groupTypes = ['microsoft365', 'security', 'distribution', 'mailEnabledSecurity'];
|
|
113
|
+
export default new EntraGroupListCommand();
|
|
110
114
|
//# sourceMappingURL=group-list.js.map
|
|
@@ -3,28 +3,32 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
3
3
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
4
4
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
5
5
|
};
|
|
6
|
-
var
|
|
6
|
+
var _EntraGroupRemoveCommand_instances, _EntraGroupRemoveCommand_initTelemetry, _EntraGroupRemoveCommand_initOptions, _EntraGroupRemoveCommand_initOptionSets, _EntraGroupRemoveCommand_initValidators, _EntraGroupRemoveCommand_initTypes;
|
|
7
7
|
import { cli } from '../../../../cli/cli.js';
|
|
8
8
|
import GraphCommand from '../../../base/GraphCommand.js';
|
|
9
9
|
import commands from '../../commands.js';
|
|
10
10
|
import request from '../../../../request.js';
|
|
11
|
-
import {
|
|
11
|
+
import { entraGroup } from '../../../../utils/entraGroup.js';
|
|
12
12
|
import { validation } from '../../../../utils/validation.js';
|
|
13
|
-
|
|
13
|
+
import aadCommands from '../../aadCommands.js';
|
|
14
|
+
class EntraGroupRemoveCommand extends GraphCommand {
|
|
14
15
|
get name() {
|
|
15
16
|
return commands.GROUP_REMOVE;
|
|
16
17
|
}
|
|
17
18
|
get description() {
|
|
18
|
-
return 'Removes an
|
|
19
|
+
return 'Removes an Entra group';
|
|
20
|
+
}
|
|
21
|
+
alias() {
|
|
22
|
+
return [aadCommands.GROUP_REMOVE];
|
|
19
23
|
}
|
|
20
24
|
constructor() {
|
|
21
25
|
super();
|
|
22
|
-
|
|
23
|
-
__classPrivateFieldGet(this,
|
|
24
|
-
__classPrivateFieldGet(this,
|
|
25
|
-
__classPrivateFieldGet(this,
|
|
26
|
-
__classPrivateFieldGet(this,
|
|
27
|
-
__classPrivateFieldGet(this,
|
|
26
|
+
_EntraGroupRemoveCommand_instances.add(this);
|
|
27
|
+
__classPrivateFieldGet(this, _EntraGroupRemoveCommand_instances, "m", _EntraGroupRemoveCommand_initOptions).call(this);
|
|
28
|
+
__classPrivateFieldGet(this, _EntraGroupRemoveCommand_instances, "m", _EntraGroupRemoveCommand_initValidators).call(this);
|
|
29
|
+
__classPrivateFieldGet(this, _EntraGroupRemoveCommand_instances, "m", _EntraGroupRemoveCommand_initOptionSets).call(this);
|
|
30
|
+
__classPrivateFieldGet(this, _EntraGroupRemoveCommand_instances, "m", _EntraGroupRemoveCommand_initTelemetry).call(this);
|
|
31
|
+
__classPrivateFieldGet(this, _EntraGroupRemoveCommand_instances, "m", _EntraGroupRemoveCommand_initTypes).call(this);
|
|
28
32
|
}
|
|
29
33
|
async commandAction(logger, args) {
|
|
30
34
|
const removeGroup = async () => {
|
|
@@ -34,7 +38,7 @@ class AadGroupRemoveCommand extends GraphCommand {
|
|
|
34
38
|
try {
|
|
35
39
|
let groupId = args.options.id;
|
|
36
40
|
if (args.options.displayName) {
|
|
37
|
-
groupId = await
|
|
41
|
+
groupId = await entraGroup.getGroupIdByDisplayName(args.options.displayName);
|
|
38
42
|
}
|
|
39
43
|
const requestOptions = {
|
|
40
44
|
url: `${this.resource}/v1.0/groups/${groupId}`,
|
|
@@ -59,7 +63,7 @@ class AadGroupRemoveCommand extends GraphCommand {
|
|
|
59
63
|
}
|
|
60
64
|
}
|
|
61
65
|
}
|
|
62
|
-
|
|
66
|
+
_EntraGroupRemoveCommand_instances = new WeakSet(), _EntraGroupRemoveCommand_initTelemetry = function _EntraGroupRemoveCommand_initTelemetry() {
|
|
63
67
|
this.telemetry.push((args) => {
|
|
64
68
|
Object.assign(this.telemetryProperties, {
|
|
65
69
|
id: args.options.id !== 'undefined',
|
|
@@ -67,7 +71,7 @@ _AadGroupRemoveCommand_instances = new WeakSet(), _AadGroupRemoveCommand_initTel
|
|
|
67
71
|
force: !!args.options.force
|
|
68
72
|
});
|
|
69
73
|
});
|
|
70
|
-
},
|
|
74
|
+
}, _EntraGroupRemoveCommand_initOptions = function _EntraGroupRemoveCommand_initOptions() {
|
|
71
75
|
this.options.unshift({
|
|
72
76
|
option: '-i, --id [id]'
|
|
73
77
|
}, {
|
|
@@ -75,19 +79,19 @@ _AadGroupRemoveCommand_instances = new WeakSet(), _AadGroupRemoveCommand_initTel
|
|
|
75
79
|
}, {
|
|
76
80
|
option: '-f, --force'
|
|
77
81
|
});
|
|
78
|
-
},
|
|
82
|
+
}, _EntraGroupRemoveCommand_initOptionSets = function _EntraGroupRemoveCommand_initOptionSets() {
|
|
79
83
|
this.optionSets.push({
|
|
80
84
|
options: ['id', 'displayName']
|
|
81
85
|
});
|
|
82
|
-
},
|
|
86
|
+
}, _EntraGroupRemoveCommand_initValidators = function _EntraGroupRemoveCommand_initValidators() {
|
|
83
87
|
this.validators.push(async (args) => {
|
|
84
88
|
if (args.options.id && !validation.isValidGuid(args.options.id)) {
|
|
85
89
|
return `${args.options.id} is not a valid GUID for option id.`;
|
|
86
90
|
}
|
|
87
91
|
return true;
|
|
88
92
|
});
|
|
89
|
-
},
|
|
93
|
+
}, _EntraGroupRemoveCommand_initTypes = function _EntraGroupRemoveCommand_initTypes() {
|
|
90
94
|
this.types.string.push('id', 'displayName');
|
|
91
95
|
};
|
|
92
|
-
export default new
|
|
96
|
+
export default new EntraGroupRemoveCommand();
|
|
93
97
|
//# sourceMappingURL=group-remove.js.map
|