@pnp/cli-microsoft365 7.4.0-beta.fce7b64 → 7.5.0-beta.23612bc
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} +2 -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/{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/{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/{aad → entra}/commands/user/user-get.js +16 -12
- 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 +87 -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/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 +2 -2
- package/dist/utils/validation.js +4 -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-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/{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/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/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
|
@@ -5,7 +5,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
5
5
|
};
|
|
6
6
|
var _TeamsMeetingAddCommand_instances, _TeamsMeetingAddCommand_initTelemetry, _TeamsMeetingAddCommand_initOptions, _TeamsMeetingAddCommand_initValidators;
|
|
7
7
|
import auth from '../../../../Auth.js';
|
|
8
|
-
import {
|
|
8
|
+
import { entraUser } from '../../../../utils/entraUser.js';
|
|
9
9
|
import { accessToken } from '../../../../utils/accessToken.js';
|
|
10
10
|
import { validation } from '../../../../utils/validation.js';
|
|
11
11
|
import GraphCommand from "../../../base/GraphCommand.js";
|
|
@@ -53,7 +53,7 @@ class TeamsMeetingAddCommand extends GraphCommand {
|
|
|
53
53
|
if (this.verbose) {
|
|
54
54
|
await logger.logToStderr(`Retrieving Organizer Id...`);
|
|
55
55
|
}
|
|
56
|
-
const organizerId = await
|
|
56
|
+
const organizerId = await entraUser.getUserIdByEmail(options.organizerEmail);
|
|
57
57
|
requestUrl = `${this.resource}/v1.0/users/${organizerId}`;
|
|
58
58
|
}
|
|
59
59
|
if (this.verbose) {
|
|
@@ -9,7 +9,7 @@ import { cli } from '../../../../cli/cli.js';
|
|
|
9
9
|
import { accessToken } from '../../../../utils/accessToken.js';
|
|
10
10
|
import { odata } from '../../../../utils/odata.js';
|
|
11
11
|
import { validation } from '../../../../utils/validation.js';
|
|
12
|
-
import
|
|
12
|
+
import entraUserGetCommand from '../../../entra/commands/user/user-get.js';
|
|
13
13
|
import GraphCommand from "../../../base/GraphCommand.js";
|
|
14
14
|
import commands from '../../commands.js';
|
|
15
15
|
class TeamsMeetingAttendancereportListCommand extends GraphCommand {
|
|
@@ -71,7 +71,7 @@ class TeamsMeetingAttendancereportListCommand extends GraphCommand {
|
|
|
71
71
|
debug: this.debug,
|
|
72
72
|
verbose: this.verbose
|
|
73
73
|
};
|
|
74
|
-
const output = await cli.executeCommandWithOutput(
|
|
74
|
+
const output = await cli.executeCommandWithOutput(entraUserGetCommand, { options: { ...options, _: [] } });
|
|
75
75
|
const getUserOutput = JSON.parse(output.stdout);
|
|
76
76
|
return getUserOutput.id;
|
|
77
77
|
}
|
|
@@ -6,7 +6,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
6
6
|
var _TeamsMeetingGetCommand_instances, _TeamsMeetingGetCommand_initTelemetry, _TeamsMeetingGetCommand_initOptions, _TeamsMeetingGetCommand_initValidators;
|
|
7
7
|
import auth from '../../../../Auth.js';
|
|
8
8
|
import request from '../../../../request.js';
|
|
9
|
-
import {
|
|
9
|
+
import { entraUser } from '../../../../utils/entraUser.js';
|
|
10
10
|
import { accessToken } from '../../../../utils/accessToken.js';
|
|
11
11
|
import { formatting } from '../../../../utils/formatting.js';
|
|
12
12
|
import { validation } from '../../../../utils/validation.js';
|
|
@@ -76,9 +76,9 @@ class TeamsMeetingGetCommand extends GraphCommand {
|
|
|
76
76
|
return options.userId;
|
|
77
77
|
}
|
|
78
78
|
if (options.userName) {
|
|
79
|
-
return
|
|
79
|
+
return entraUser.getUserIdByUpn(options.userName);
|
|
80
80
|
}
|
|
81
|
-
return
|
|
81
|
+
return entraUser.getUserIdByEmail(options.email);
|
|
82
82
|
}
|
|
83
83
|
}
|
|
84
84
|
_TeamsMeetingGetCommand_instances = new WeakSet(), _TeamsMeetingGetCommand_initTelemetry = function _TeamsMeetingGetCommand_initTelemetry() {
|
|
@@ -5,7 +5,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
5
5
|
};
|
|
6
6
|
var _TeamsMeetingListCommand_instances, _TeamsMeetingListCommand_initTelemetry, _TeamsMeetingListCommand_initOptions, _TeamsMeetingListCommand_initValidators;
|
|
7
7
|
import auth from '../../../../Auth.js';
|
|
8
|
-
import {
|
|
8
|
+
import { entraUser } from '../../../../utils/entraUser.js';
|
|
9
9
|
import { accessToken } from '../../../../utils/accessToken.js';
|
|
10
10
|
import { odata } from '../../../../utils/odata.js';
|
|
11
11
|
import { validation } from '../../../../utils/validation.js';
|
|
@@ -60,7 +60,7 @@ class TeamsMeetingListCommand extends GraphCommand {
|
|
|
60
60
|
requestUrl += `users/${options.userId || options.userName}`;
|
|
61
61
|
}
|
|
62
62
|
else if (options.email) {
|
|
63
|
-
const userId = await
|
|
63
|
+
const userId = await entraUser.getUserIdByEmail(options.email);
|
|
64
64
|
requestUrl += `users/${userId}`;
|
|
65
65
|
}
|
|
66
66
|
else {
|
|
@@ -5,7 +5,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
5
5
|
};
|
|
6
6
|
var _TeamsMeetingTranscriptListCommand_instances, _TeamsMeetingTranscriptListCommand_initTelemetry, _TeamsMeetingTranscriptListCommand_initOptions, _TeamsMeetingTranscriptListCommand_initValidators, _TeamsMeetingTranscriptListCommand_initOptionSets;
|
|
7
7
|
import auth from '../../../../Auth.js';
|
|
8
|
-
import {
|
|
8
|
+
import { entraUser } from '../../../../utils/entraUser.js';
|
|
9
9
|
import { accessToken } from '../../../../utils/accessToken.js';
|
|
10
10
|
import { odata } from '../../../../utils/odata.js';
|
|
11
11
|
import { validation } from '../../../../utils/validation.js';
|
|
@@ -51,7 +51,7 @@ class TeamsMeetingTranscriptListCommand extends GraphCommand {
|
|
|
51
51
|
if (this.verbose) {
|
|
52
52
|
await logger.logToStderr(`Getting user ID for user with email '${args.options.email}'.`);
|
|
53
53
|
}
|
|
54
|
-
const userId = await
|
|
54
|
+
const userId = await entraUser.getUserIdByEmail(args.options.email);
|
|
55
55
|
requestUrl += userId;
|
|
56
56
|
}
|
|
57
57
|
}
|
|
@@ -5,7 +5,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
5
5
|
};
|
|
6
6
|
var _TeamsTabGetCommand_instances, _TeamsTabGetCommand_initTelemetry, _TeamsTabGetCommand_initOptions, _TeamsTabGetCommand_initValidators, _TeamsTabGetCommand_initOptionSets;
|
|
7
7
|
import request from '../../../../request.js';
|
|
8
|
-
import {
|
|
8
|
+
import { entraGroup } from '../../../../utils/entraGroup.js';
|
|
9
9
|
import { formatting } from '../../../../utils/formatting.js';
|
|
10
10
|
import { validation } from '../../../../utils/validation.js';
|
|
11
11
|
import GraphCommand from '../../../base/GraphCommand.js';
|
|
@@ -31,7 +31,7 @@ class TeamsTabGetCommand extends GraphCommand {
|
|
|
31
31
|
if (args.options.teamId) {
|
|
32
32
|
return args.options.teamId;
|
|
33
33
|
}
|
|
34
|
-
const group = await
|
|
34
|
+
const group = await entraGroup.getGroupByDisplayName(args.options.teamName);
|
|
35
35
|
if (group.resourceProvisioningOptions.indexOf('Team') === -1) {
|
|
36
36
|
throw 'The specified team does not exist in the Microsoft Teams';
|
|
37
37
|
}
|
|
@@ -6,7 +6,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
6
6
|
var _TeamsTeamAddCommand_instances, _TeamsTeamAddCommand_initTelemetry, _TeamsTeamAddCommand_initOptions, _TeamsTeamAddCommand_initOptionSets;
|
|
7
7
|
import { setTimeout } from 'timers/promises';
|
|
8
8
|
import request from '../../../../request.js';
|
|
9
|
-
import {
|
|
9
|
+
import { entraGroup } from '../../../../utils/entraGroup.js';
|
|
10
10
|
import GraphCommand from '../../../base/GraphCommand.js';
|
|
11
11
|
import commands from '../../commands.js';
|
|
12
12
|
class TeamsTeamAddCommand extends GraphCommand {
|
|
@@ -77,8 +77,8 @@ class TeamsTeamAddCommand extends GraphCommand {
|
|
|
77
77
|
}
|
|
78
78
|
else {
|
|
79
79
|
await this.waitUntilTeamFinishedProvisioning(teamsAsyncOperation, requestOptions, logger);
|
|
80
|
-
const
|
|
81
|
-
await logger.log(
|
|
80
|
+
const entraGroup = await this.getEntraGroup(teamsAsyncOperation.targetResourceId, logger);
|
|
81
|
+
await logger.log(entraGroup);
|
|
82
82
|
}
|
|
83
83
|
}
|
|
84
84
|
catch (err) {
|
|
@@ -104,17 +104,17 @@ class TeamsTeamAddCommand extends GraphCommand {
|
|
|
104
104
|
await this.waitUntilTeamFinishedProvisioning(teamsAsyncOperation, requestOptions, logger);
|
|
105
105
|
}
|
|
106
106
|
}
|
|
107
|
-
async
|
|
107
|
+
async getEntraGroup(id, logger) {
|
|
108
108
|
let group;
|
|
109
109
|
try {
|
|
110
|
-
group = await
|
|
110
|
+
group = await entraGroup.getGroupById(id);
|
|
111
111
|
}
|
|
112
112
|
catch {
|
|
113
113
|
if (this.verbose) {
|
|
114
114
|
await logger.logToStderr(`Error occurred on retrieving the aad group. Retrying in ${this.pollingInterval / 1000} seconds.`);
|
|
115
115
|
}
|
|
116
116
|
await setTimeout(this.pollingInterval);
|
|
117
|
-
return await this.
|
|
117
|
+
return await this.getEntraGroup(id, logger);
|
|
118
118
|
}
|
|
119
119
|
return group;
|
|
120
120
|
}
|
|
@@ -5,7 +5,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
5
5
|
};
|
|
6
6
|
var _TeamsTeamArchiveCommand_instances, _TeamsTeamArchiveCommand_initTelemetry, _TeamsTeamArchiveCommand_initOptions, _TeamsTeamArchiveCommand_initValidators, _TeamsTeamArchiveCommand_initOptionSets;
|
|
7
7
|
import request from '../../../../request.js';
|
|
8
|
-
import {
|
|
8
|
+
import { entraGroup } from '../../../../utils/entraGroup.js';
|
|
9
9
|
import { formatting } from '../../../../utils/formatting.js';
|
|
10
10
|
import { validation } from '../../../../utils/validation.js';
|
|
11
11
|
import GraphCommand from '../../../base/GraphCommand.js';
|
|
@@ -29,7 +29,7 @@ class TeamsTeamArchiveCommand extends GraphCommand {
|
|
|
29
29
|
if (args.options.id) {
|
|
30
30
|
return args.options.id;
|
|
31
31
|
}
|
|
32
|
-
const group = await
|
|
32
|
+
const group = await entraGroup.getGroupByDisplayName(args.options.name);
|
|
33
33
|
if (group.resourceProvisioningOptions.indexOf('Team') === -1) {
|
|
34
34
|
throw 'The specified team does not exist in the Microsoft Teams';
|
|
35
35
|
}
|
|
@@ -5,7 +5,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
5
5
|
};
|
|
6
6
|
var _TeamsTeamGetCommand_instances, _TeamsTeamGetCommand_initTelemetry, _TeamsTeamGetCommand_initOptions, _TeamsTeamGetCommand_initValidators, _TeamsTeamGetCommand_initOptionSets;
|
|
7
7
|
import request from '../../../../request.js';
|
|
8
|
-
import {
|
|
8
|
+
import { entraGroup } from '../../../../utils/entraGroup.js';
|
|
9
9
|
import { formatting } from '../../../../utils/formatting.js';
|
|
10
10
|
import { validation } from '../../../../utils/validation.js';
|
|
11
11
|
import GraphCommand from '../../../base/GraphCommand.js';
|
|
@@ -29,7 +29,7 @@ class TeamsTeamGetCommand extends GraphCommand {
|
|
|
29
29
|
if (args.options.id) {
|
|
30
30
|
return args.options.id;
|
|
31
31
|
}
|
|
32
|
-
const group = await
|
|
32
|
+
const group = await entraGroup.getGroupByDisplayName(args.options.name);
|
|
33
33
|
if (group.resourceProvisioningOptions.indexOf('Team') === -1) {
|
|
34
34
|
throw 'The specified team does not exist in the Microsoft Teams';
|
|
35
35
|
}
|
|
@@ -6,7 +6,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
6
6
|
var _TeamsTeamRemoveCommand_instances, _TeamsTeamRemoveCommand_initTelemetry, _TeamsTeamRemoveCommand_initOptions, _TeamsTeamRemoveCommand_initValidators, _TeamsTeamRemoveCommand_initOptionSets;
|
|
7
7
|
import { cli } from '../../../../cli/cli.js';
|
|
8
8
|
import request from '../../../../request.js';
|
|
9
|
-
import {
|
|
9
|
+
import { entraGroup } from '../../../../utils/entraGroup.js';
|
|
10
10
|
import { formatting } from '../../../../utils/formatting.js';
|
|
11
11
|
import { validation } from '../../../../utils/validation.js';
|
|
12
12
|
import GraphCommand from '../../../base/GraphCommand.js';
|
|
@@ -30,7 +30,7 @@ class TeamsTeamRemoveCommand extends GraphCommand {
|
|
|
30
30
|
if (args.options.id) {
|
|
31
31
|
return args.options.id;
|
|
32
32
|
}
|
|
33
|
-
const group = await
|
|
33
|
+
const group = await entraGroup.getGroupByDisplayName(args.options.name);
|
|
34
34
|
if (group.resourceProvisioningOptions.indexOf('Team') === -1) {
|
|
35
35
|
throw `The specified team does not exist in the Microsoft Teams`;
|
|
36
36
|
}
|
|
@@ -5,7 +5,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
5
5
|
};
|
|
6
6
|
var _TeamsTeamUnarchiveCommand_instances, _TeamsTeamUnarchiveCommand_initOptions, _TeamsTeamUnarchiveCommand_initValidators, _TeamsTeamUnarchiveCommand_initOptionSets;
|
|
7
7
|
import request from '../../../../request.js';
|
|
8
|
-
import {
|
|
8
|
+
import { entraGroup } from '../../../../utils/entraGroup.js';
|
|
9
9
|
import { formatting } from '../../../../utils/formatting.js';
|
|
10
10
|
import { validation } from '../../../../utils/validation.js';
|
|
11
11
|
import GraphCommand from '../../../base/GraphCommand.js';
|
|
@@ -28,7 +28,7 @@ class TeamsTeamUnarchiveCommand extends GraphCommand {
|
|
|
28
28
|
if (args.options.id) {
|
|
29
29
|
return args.options.id;
|
|
30
30
|
}
|
|
31
|
-
const group = await
|
|
31
|
+
const group = await entraGroup.getGroupByDisplayName(args.options.name);
|
|
32
32
|
if (group.resourceProvisioningOptions.indexOf('Team') === -1) {
|
|
33
33
|
throw 'The specified team does not exist in the Microsoft Teams';
|
|
34
34
|
}
|
|
@@ -4,6 +4,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
4
4
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
5
5
|
};
|
|
6
6
|
var _TeamsUserAppAddCommand_instances, _TeamsUserAppAddCommand_initTelemetry, _TeamsUserAppAddCommand_initOptions, _TeamsUserAppAddCommand_initValidators, _TeamsUserAppAddCommand_initOptionSets;
|
|
7
|
+
import { cli } from '../../../../cli/cli.js';
|
|
7
8
|
import request from '../../../../request.js';
|
|
8
9
|
import { formatting } from '../../../../utils/formatting.js';
|
|
9
10
|
import { validation } from '../../../../utils/validation.js';
|
|
@@ -25,8 +26,12 @@ class TeamsUserAppAddCommand extends GraphCommand {
|
|
|
25
26
|
__classPrivateFieldGet(this, _TeamsUserAppAddCommand_instances, "m", _TeamsUserAppAddCommand_initOptionSets).call(this);
|
|
26
27
|
}
|
|
27
28
|
async commandAction(logger, args) {
|
|
29
|
+
const appId = await this.getAppId(args);
|
|
28
30
|
const userId = (args.options.userId ?? args.options.userName);
|
|
29
31
|
const endpoint = `${this.resource}/v1.0`;
|
|
32
|
+
if (this.verbose) {
|
|
33
|
+
await logger.logToStderr(`Removing app with ID ${appId} for user ${args.options.userId}`);
|
|
34
|
+
}
|
|
30
35
|
const requestOptions = {
|
|
31
36
|
url: `${endpoint}/users/${formatting.encodeQueryParameter(userId)}/teamwork/installedApps`,
|
|
32
37
|
headers: {
|
|
@@ -35,7 +40,7 @@ class TeamsUserAppAddCommand extends GraphCommand {
|
|
|
35
40
|
},
|
|
36
41
|
responseType: 'json',
|
|
37
42
|
data: {
|
|
38
|
-
'teamsApp@odata.bind': `${endpoint}/appCatalogs/teamsApps/${
|
|
43
|
+
'teamsApp@odata.bind': `${endpoint}/appCatalogs/teamsApps/${appId}`
|
|
39
44
|
}
|
|
40
45
|
};
|
|
41
46
|
try {
|
|
@@ -45,17 +50,43 @@ class TeamsUserAppAddCommand extends GraphCommand {
|
|
|
45
50
|
this.handleRejectedODataJsonPromise(err);
|
|
46
51
|
}
|
|
47
52
|
}
|
|
53
|
+
async getAppId(args) {
|
|
54
|
+
if (args.options.id) {
|
|
55
|
+
return args.options.id;
|
|
56
|
+
}
|
|
57
|
+
const requestOptions = {
|
|
58
|
+
url: `${this.resource}/v1.0/appCatalogs/teamsApps?$filter=displayName eq '${formatting.encodeQueryParameter(args.options.name)}'`,
|
|
59
|
+
headers: {
|
|
60
|
+
accept: 'application/json;odata.metadata=none'
|
|
61
|
+
},
|
|
62
|
+
responseType: 'json'
|
|
63
|
+
};
|
|
64
|
+
const response = await request.get(requestOptions);
|
|
65
|
+
if (response.value.length === 1) {
|
|
66
|
+
return response.value[0].id;
|
|
67
|
+
}
|
|
68
|
+
if (response.value.length === 0) {
|
|
69
|
+
throw `The specified Teams app does not exist`;
|
|
70
|
+
}
|
|
71
|
+
const resultAsKeyValuePair = formatting.convertArrayToHashTable('id', response.value);
|
|
72
|
+
const result = (await cli.handleMultipleResultsFound(`Multiple Teams apps with name '${args.options.name}' found.`, resultAsKeyValuePair));
|
|
73
|
+
return result.id;
|
|
74
|
+
}
|
|
48
75
|
}
|
|
49
76
|
_TeamsUserAppAddCommand_instances = new WeakSet(), _TeamsUserAppAddCommand_initTelemetry = function _TeamsUserAppAddCommand_initTelemetry() {
|
|
50
77
|
this.telemetry.push((args) => {
|
|
51
78
|
Object.assign(this.telemetryProperties, {
|
|
79
|
+
id: typeof args.options.id !== 'undefined',
|
|
80
|
+
name: typeof args.options.name !== 'undefined',
|
|
52
81
|
userId: typeof args.options.userId !== 'undefined',
|
|
53
82
|
userName: typeof args.options.userName !== 'undefined'
|
|
54
83
|
});
|
|
55
84
|
});
|
|
56
85
|
}, _TeamsUserAppAddCommand_initOptions = function _TeamsUserAppAddCommand_initOptions() {
|
|
57
86
|
this.options.unshift({
|
|
58
|
-
option: '--id
|
|
87
|
+
option: '--id [id]'
|
|
88
|
+
}, {
|
|
89
|
+
option: '--name [name]'
|
|
59
90
|
}, {
|
|
60
91
|
option: '--userId [userId]'
|
|
61
92
|
}, {
|
|
@@ -63,7 +94,7 @@ _TeamsUserAppAddCommand_instances = new WeakSet(), _TeamsUserAppAddCommand_initT
|
|
|
63
94
|
});
|
|
64
95
|
}, _TeamsUserAppAddCommand_initValidators = function _TeamsUserAppAddCommand_initValidators() {
|
|
65
96
|
this.validators.push(async (args) => {
|
|
66
|
-
if (!validation.isValidGuid(args.options.id)) {
|
|
97
|
+
if (args.options.id && !validation.isValidGuid(args.options.id)) {
|
|
67
98
|
return `${args.options.id} is not a valid GUID`;
|
|
68
99
|
}
|
|
69
100
|
if (args.options.userId && !validation.isValidGuid(args.options.userId)) {
|
|
@@ -75,6 +106,7 @@ _TeamsUserAppAddCommand_instances = new WeakSet(), _TeamsUserAppAddCommand_initT
|
|
|
75
106
|
return true;
|
|
76
107
|
});
|
|
77
108
|
}, _TeamsUserAppAddCommand_initOptionSets = function _TeamsUserAppAddCommand_initOptionSets() {
|
|
109
|
+
this.optionSets.push({ options: ['id', 'name'] });
|
|
78
110
|
this.optionSets.push({ options: ['userId', 'userName'] });
|
|
79
111
|
};
|
|
80
112
|
export default new TeamsUserAppAddCommand();
|
package/dist/request.js
CHANGED
|
@@ -154,6 +154,10 @@ class Request {
|
|
|
154
154
|
options.headers.authorization = `Bearer ${accessToken}`;
|
|
155
155
|
}
|
|
156
156
|
}
|
|
157
|
+
const proxyUrl = process.env.HTTP_PROXY || process.env.HTTPS_PROXY;
|
|
158
|
+
if (proxyUrl) {
|
|
159
|
+
options.proxy = this.createProxyConfigFromUrl(proxyUrl);
|
|
160
|
+
}
|
|
157
161
|
return this.req(options);
|
|
158
162
|
})
|
|
159
163
|
.then((res) => {
|
|
@@ -199,6 +203,18 @@ class Request {
|
|
|
199
203
|
const cloudUrl = Auth.getEndpointForResource(hostname, cloudType);
|
|
200
204
|
options.url = options.url.replace(hostname, cloudUrl);
|
|
201
205
|
}
|
|
206
|
+
createProxyConfigFromUrl(url) {
|
|
207
|
+
const parsedUrl = new URL(url);
|
|
208
|
+
const port = parsedUrl.port || (url.toLowerCase().startsWith('https') ? 443 : 80);
|
|
209
|
+
let authObject = null;
|
|
210
|
+
if (parsedUrl.username && parsedUrl.password) {
|
|
211
|
+
authObject = {
|
|
212
|
+
username: parsedUrl.username,
|
|
213
|
+
password: parsedUrl.password
|
|
214
|
+
};
|
|
215
|
+
}
|
|
216
|
+
return { host: parsedUrl.hostname, port: Number(port), protocol: 'http', ...(authObject && { auth: authObject }) };
|
|
217
|
+
}
|
|
202
218
|
}
|
|
203
219
|
export default new Request();
|
|
204
220
|
//# sourceMappingURL=request.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { odata } from './odata.js';
|
|
2
2
|
import { formatting } from './formatting.js';
|
|
3
3
|
import { cli } from '../cli/cli.js';
|
|
4
|
-
export const
|
|
4
|
+
export const entraAdministrativeUnit = {
|
|
5
5
|
/**
|
|
6
6
|
* Get an administrative unit by its display name.
|
|
7
7
|
* @param displayName Administrative unit display name.
|
|
@@ -22,4 +22,4 @@ export const aadAdministrativeUnit = {
|
|
|
22
22
|
return administrativeUnits[0];
|
|
23
23
|
}
|
|
24
24
|
};
|
|
25
|
-
//# sourceMappingURL=
|
|
25
|
+
//# sourceMappingURL=entraAdministrativeUnit.js.map
|
|
@@ -2,7 +2,7 @@ import { odata } from "./odata.js";
|
|
|
2
2
|
import { formatting } from "./formatting.js";
|
|
3
3
|
import { cli } from "../cli/cli.js";
|
|
4
4
|
const graphResource = 'https://graph.microsoft.com';
|
|
5
|
-
export const
|
|
5
|
+
export const entraDevice = {
|
|
6
6
|
/**
|
|
7
7
|
* Get a device by its display name.
|
|
8
8
|
* @param displayName Device display name.
|
|
@@ -22,4 +22,4 @@ export const aadDevice = {
|
|
|
22
22
|
return devices[0];
|
|
23
23
|
}
|
|
24
24
|
};
|
|
25
|
-
//# sourceMappingURL=
|
|
25
|
+
//# sourceMappingURL=entraDevice.js.map
|
|
@@ -3,7 +3,7 @@ import { formatting } from "./formatting.js";
|
|
|
3
3
|
import { odata } from "./odata.js";
|
|
4
4
|
import { cli } from '../cli/cli.js';
|
|
5
5
|
const graphResource = 'https://graph.microsoft.com';
|
|
6
|
-
export const
|
|
6
|
+
export const entraGroup = {
|
|
7
7
|
/**
|
|
8
8
|
* Retrieve a single group.
|
|
9
9
|
* @param id Group ID.
|
|
@@ -95,4 +95,4 @@ export const aadGroup = {
|
|
|
95
95
|
return group.groupTypes.some(type => type === 'Unified');
|
|
96
96
|
}
|
|
97
97
|
};
|
|
98
|
-
//# sourceMappingURL=
|
|
98
|
+
//# sourceMappingURL=entraGroup.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import request from "../request.js";
|
|
2
2
|
import { formatting } from "./formatting.js";
|
|
3
3
|
const graphResource = 'https://graph.microsoft.com';
|
|
4
|
-
export const
|
|
4
|
+
export const entraUser = {
|
|
5
5
|
/**
|
|
6
6
|
* Retrieve the id of a user by its UPN.
|
|
7
7
|
* @param upn User UPN.
|
|
@@ -20,6 +20,42 @@ export const aadUser = {
|
|
|
20
20
|
}
|
|
21
21
|
return res.value[0].id;
|
|
22
22
|
},
|
|
23
|
+
/**
|
|
24
|
+
* Retrieve the IDs of users by their UPNs. There is no guarantee that the order of the returned IDs will match the order of the specified UPNs.
|
|
25
|
+
* @param upns Array of user UPNs.
|
|
26
|
+
* @returns Array of user IDs.
|
|
27
|
+
*/
|
|
28
|
+
async getUserIdsByUpns(upns) {
|
|
29
|
+
const userIds = [];
|
|
30
|
+
for (let i = 0; i < upns.length; i += 20) {
|
|
31
|
+
const upnsChunk = upns.slice(i, i + 20);
|
|
32
|
+
const requestOptions = {
|
|
33
|
+
url: `${graphResource}/v1.0/$batch`,
|
|
34
|
+
headers: {
|
|
35
|
+
accept: 'application/json;odata.metadata=none'
|
|
36
|
+
},
|
|
37
|
+
responseType: 'json',
|
|
38
|
+
data: {
|
|
39
|
+
requests: upnsChunk.map((upn, index) => ({
|
|
40
|
+
id: index + 1,
|
|
41
|
+
method: 'GET',
|
|
42
|
+
url: `/users/${formatting.encodeQueryParameter(upn)}?$select=id`,
|
|
43
|
+
headers: {
|
|
44
|
+
accept: 'application/json;odata.metadata=none'
|
|
45
|
+
}
|
|
46
|
+
}))
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
const res = await request.post(requestOptions);
|
|
50
|
+
for (const response of res.responses) {
|
|
51
|
+
if (response.status !== 200) {
|
|
52
|
+
throw Error(`The specified user with user name '${upnsChunk[response.id - 1]}' does not exist.`);
|
|
53
|
+
}
|
|
54
|
+
userIds.push(response.body.id);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
return userIds;
|
|
58
|
+
},
|
|
23
59
|
/**
|
|
24
60
|
* Retrieve the ID of a user by its email.
|
|
25
61
|
* @param mail User email.
|
|
@@ -54,4 +90,4 @@ export const aadUser = {
|
|
|
54
90
|
return res.userPrincipalName;
|
|
55
91
|
}
|
|
56
92
|
};
|
|
57
|
-
//# sourceMappingURL=
|
|
93
|
+
//# sourceMappingURL=entraUser.js.map
|
package/dist/utils/md.js
CHANGED
|
@@ -13,8 +13,8 @@ function convertHeadings(md) {
|
|
|
13
13
|
});
|
|
14
14
|
}
|
|
15
15
|
function convertAdmonitions(md) {
|
|
16
|
-
const regex = new RegExp(/^:::(\w+)([\s\S]*?):::$/, 'gm');
|
|
17
|
-
return md.replace(regex, (_, label, content) => label.toLocaleUpperCase() + EOL + EOL + content.trim());
|
|
16
|
+
const regex = new RegExp(/^:::(\w+)(?:\[([^\]]+)\])?([\s\S]*?):::$/, 'gm');
|
|
17
|
+
return md.replace(regex, (_, label, title, content) => label.toLocaleUpperCase() + (title ? EOL + EOL + title : '') + EOL + EOL + content.trim());
|
|
18
18
|
}
|
|
19
19
|
function includeContent(md, rootFolder) {
|
|
20
20
|
const mdxImports = [
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import request from '../request.js';
|
|
2
|
+
const getRequestOptions = (roleDefinitionId, principalId, directoryScopeId) => ({
|
|
3
|
+
url: `https://graph.microsoft.com/v1.0/roleManagement/directory/roleAssignments`,
|
|
4
|
+
headers: {
|
|
5
|
+
accept: 'application/json;odata.metadata=none'
|
|
6
|
+
},
|
|
7
|
+
responseType: 'json',
|
|
8
|
+
data: {
|
|
9
|
+
roleDefinitionId: roleDefinitionId,
|
|
10
|
+
principalId: principalId,
|
|
11
|
+
directoryScopeId: directoryScopeId
|
|
12
|
+
}
|
|
13
|
+
});
|
|
14
|
+
/**
|
|
15
|
+
* Utils for RBAC.
|
|
16
|
+
* Supported RBAC providers:
|
|
17
|
+
* - Directory (Entra ID)
|
|
18
|
+
*/
|
|
19
|
+
export const roleAssignment = {
|
|
20
|
+
/**
|
|
21
|
+
* Assigns a specific role to a principal with scope to an administrative unit
|
|
22
|
+
* @param roleDefinitionId Role which lists the actions that can be performed
|
|
23
|
+
* @param principalId Object that represents a user, group, service principal, or managed identity that is requesting access to resources
|
|
24
|
+
* @param administrativeUnitId Administrative unit which represents a current scope for a role assignment
|
|
25
|
+
* @returns Returns unified role assignment object that represents a role definition assigned to a principal with scope to an administrative unit
|
|
26
|
+
*/
|
|
27
|
+
async createRoleAssignmentWithAdministrativeUnitScope(roleDefinitionId, principalId, administrativeUnitId) {
|
|
28
|
+
const requestOptions = getRequestOptions(roleDefinitionId, principalId, `/administrativeUnits/${administrativeUnitId}`);
|
|
29
|
+
return await request.post(requestOptions);
|
|
30
|
+
},
|
|
31
|
+
/**
|
|
32
|
+
* Assigns a specific role to a principal with scope to the whole tenant
|
|
33
|
+
* @param roleDefinitionId Role which lists the actions that can be performed
|
|
34
|
+
* @param principalId Object that represents a user, group, service principal, or managed identity that is requesting access to resources
|
|
35
|
+
* @returns Returns unified role assignment object that represents a role definition assigned to a principal with scope to the whole tenant
|
|
36
|
+
*/
|
|
37
|
+
async createRoleAssignmentWithTenantScope(roleDefinitionId, principalId) {
|
|
38
|
+
const requestOptions = getRequestOptions(roleDefinitionId, principalId, '/');
|
|
39
|
+
return await request.post(requestOptions);
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
//# sourceMappingURL=roleAssignment.js.map
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { cli } from '../cli/cli.js';
|
|
2
|
+
import { formatting } from './formatting.js';
|
|
3
|
+
import { odata } from './odata.js';
|
|
4
|
+
export const roleDefinition = {
|
|
5
|
+
/**
|
|
6
|
+
* Get a directory (Microsoft Entra) role
|
|
7
|
+
* @param displayName Role definition display name.
|
|
8
|
+
* @returns The role definition.
|
|
9
|
+
* @throws Error when role definition was not found.
|
|
10
|
+
*/
|
|
11
|
+
async getRoleDefinitionByDisplayName(displayName) {
|
|
12
|
+
const roleDefinitions = await odata.getAllItems(`https://graph.microsoft.com/v1.0/roleManagement/directory/roleDefinitions?$filter=displayName eq '${formatting.encodeQueryParameter(displayName)}'`);
|
|
13
|
+
if (roleDefinitions.length === 0) {
|
|
14
|
+
throw `The specified role definition '${displayName}' does not exist.`;
|
|
15
|
+
}
|
|
16
|
+
if (roleDefinitions.length > 1) {
|
|
17
|
+
const resultAsKeyValuePair = formatting.convertArrayToHashTable('id', roleDefinitions);
|
|
18
|
+
const selectedRoleDefinition = await cli.handleMultipleResultsFound(`Multiple role definitions with name '${displayName}' found.`, resultAsKeyValuePair);
|
|
19
|
+
return selectedRoleDefinition;
|
|
20
|
+
}
|
|
21
|
+
return roleDefinitions[0];
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
//# sourceMappingURL=roleDefinition.js.map
|
package/dist/utils/spo.js
CHANGED
|
@@ -8,7 +8,7 @@ import request from "../request.js";
|
|
|
8
8
|
import { formatting } from './formatting.js';
|
|
9
9
|
import { odata } from './odata.js';
|
|
10
10
|
import { RoleType } from '../m365/spo/commands/roledefinition/RoleType.js';
|
|
11
|
-
import {
|
|
11
|
+
import { entraGroup } from './entraGroup.js';
|
|
12
12
|
import { SharingCapabilities } from '../m365/spo/commands/site/SharingCapabilities.js';
|
|
13
13
|
export const spo = {
|
|
14
14
|
getRequestDigest(siteUrl) {
|
|
@@ -996,7 +996,7 @@ export const spo = {
|
|
|
996
996
|
promises.push(request.post(requestOptions));
|
|
997
997
|
}
|
|
998
998
|
if (typeof isPublic !== 'undefined') {
|
|
999
|
-
promises.push(
|
|
999
|
+
promises.push(entraGroup.setGroup(groupId, (isPublic === false), logger, verbose));
|
|
1000
1000
|
}
|
|
1001
1001
|
if (typeof owners !== 'undefined') {
|
|
1002
1002
|
promises.push(spo.setGroupifiedSiteOwners(spoAdminUrl, groupId, owners, logger, verbose));
|
package/dist/utils/validation.js
CHANGED
|
@@ -21,6 +21,10 @@ export const validation = {
|
|
|
21
21
|
const guidRegEx = new RegExp(/^19:[0-9a-zA-Z-_]+(@thread\.v2|@unq\.gbl\.spaces)$/i);
|
|
22
22
|
return guidRegEx.test(guid);
|
|
23
23
|
},
|
|
24
|
+
isValidUserPrincipalNameArray(upns) {
|
|
25
|
+
const invalidGuid = upns.find(upn => !this.isValidUserPrincipalName(upn));
|
|
26
|
+
return invalidGuid || true;
|
|
27
|
+
},
|
|
24
28
|
isValidUserPrincipalName(upn) {
|
|
25
29
|
const upnRegEx = new RegExp(/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/i);
|
|
26
30
|
// verify if the upn is a valid upn. @meusername will be replaced in a later stage with the actual username of the logged in user
|
|
@@ -47,7 +47,7 @@ The predefined card is automatically adjusted based on which options have been s
|
|
|
47
47
|
|
|
48
48
|
If your custom card is a card template (card with placeholders like `${title}`), you can fill it with data either by specifying the complete data object using the `cardData` option, or by passing any number of arbitrary options that will be mapped onto the card. The arbitrary properties should not match any of the global options like `output`, `query`, `debug`, etc. Data options like `title`, `description`, `imageUrl` and `actionUrl` will be mapped onto the card as well.
|
|
49
49
|
|
|
50
|
-
:::warning
|
|
50
|
+
:::warning[Escaping JSON in PowerShell]
|
|
51
51
|
|
|
52
52
|
When using the `--card` and `--cardData` options it's possible to enter a JSON string. In PowerShell 5 to 7.2 [specific escaping rules](./../../user-guide/using-cli.mdx#escaping-double-quotes-in-powershell) apply due to an issue. Remember that you can also use [file tokens](./../../user-guide/using-cli.mdx#passing-complex-content-into-cli-options) instead.
|
|
53
53
|
|
|
@@ -2,12 +2,18 @@ import Global from '/docs/cmd/_global.mdx';
|
|
|
2
2
|
import Tabs from '@theme/Tabs';
|
|
3
3
|
import TabItem from '@theme/TabItem';
|
|
4
4
|
|
|
5
|
-
#
|
|
5
|
+
# entra administrativeunit add
|
|
6
6
|
|
|
7
7
|
Creates a new administrative unit
|
|
8
8
|
|
|
9
9
|
## Usage
|
|
10
10
|
|
|
11
|
+
```sh
|
|
12
|
+
m365 entra administrativeunit add [options]
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Alias
|
|
16
|
+
|
|
11
17
|
```sh
|
|
12
18
|
m365 aad administrativeunit add [options]
|
|
13
19
|
```
|
|
@@ -40,19 +46,19 @@ To use this command you must be either **Global Administrator** or **Privileged
|
|
|
40
46
|
Create an administrative unit with a specific display name
|
|
41
47
|
|
|
42
48
|
```sh
|
|
43
|
-
m365
|
|
49
|
+
m365 entra administrativeunit add --displayName 'Marketing Division'
|
|
44
50
|
```
|
|
45
51
|
|
|
46
52
|
Create an administrative unit with a specific display name and description
|
|
47
53
|
|
|
48
54
|
```sh
|
|
49
|
-
m365
|
|
55
|
+
m365 entra administrativeunit add --displayName 'Marketing Division' --description 'Marketing department administration'
|
|
50
56
|
```
|
|
51
57
|
|
|
52
58
|
Create a hidden administrative unit with a specific display name
|
|
53
59
|
|
|
54
60
|
```sh
|
|
55
|
-
m365
|
|
61
|
+
m365 entra administrativeunit add --displayName 'Marketing Division' --hiddenMembership
|
|
56
62
|
```
|
|
57
63
|
|
|
58
64
|
## Response
|