@pnp/cli-microsoft365 10.0.0-beta.e925c1c → 10.0.0-beta.fd332f4
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/.eslintrc.cjs +1 -0
- package/allCommands.json +1 -1
- package/allCommandsFull.json +1 -1
- package/dist/Auth.js +6 -4
- package/dist/AuthServer.js +7 -7
- package/dist/Command.js +4 -1
- package/dist/api.js +1 -1
- package/dist/appInsights.js +6 -4
- package/dist/config.js +1 -0
- package/dist/m365/base/PowerAutomateCommand.js +1 -1
- package/dist/m365/cli/commands/cli-doctor.js +2 -2
- package/dist/m365/cli/commands/config/config-set.js +0 -1
- package/dist/m365/cli/commands.js +1 -2
- package/dist/m365/commands/login.js +122 -69
- package/dist/m365/commands/setup.js +1 -1
- package/dist/m365/commands/setupPresets.js +2 -4
- package/dist/m365/entra/commands/administrativeunit/administrativeunit-add.js +0 -5
- package/dist/m365/entra/commands/administrativeunit/administrativeunit-get.js +0 -5
- package/dist/m365/entra/commands/administrativeunit/administrativeunit-list.js +0 -5
- package/dist/m365/entra/commands/administrativeunit/administrativeunit-member-add.js +0 -5
- package/dist/m365/entra/commands/administrativeunit/administrativeunit-member-get.js +0 -5
- package/dist/m365/entra/commands/administrativeunit/administrativeunit-member-list.js +0 -5
- package/dist/m365/entra/commands/administrativeunit/administrativeunit-remove.js +0 -5
- package/dist/m365/entra/commands/app/app-add.js +0 -5
- package/dist/m365/entra/commands/app/app-get.js +0 -5
- package/dist/m365/entra/commands/app/app-list.js +0 -5
- package/dist/m365/entra/commands/app/app-permission-add.js +0 -5
- package/dist/m365/entra/commands/app/app-remove.js +0 -5
- package/dist/m365/entra/commands/app/app-role-add.js +0 -5
- package/dist/m365/entra/commands/app/app-role-list.js +0 -5
- package/dist/m365/entra/commands/app/app-role-remove.js +0 -5
- package/dist/m365/entra/commands/app/app-set.js +0 -5
- package/dist/m365/entra/commands/approleassignment/approleassignment-add.js +0 -5
- package/dist/m365/entra/commands/approleassignment/approleassignment-list.js +0 -5
- package/dist/m365/entra/commands/approleassignment/approleassignment-remove.js +0 -5
- package/dist/m365/entra/commands/enterpriseapp/enterpriseapp-add.js +0 -5
- package/dist/m365/entra/commands/enterpriseapp/enterpriseapp-get.js +0 -5
- package/dist/m365/entra/commands/enterpriseapp/enterpriseapp-list.js +0 -5
- package/dist/m365/entra/commands/group/group-add.js +0 -4
- package/dist/m365/entra/commands/group/group-get.js +0 -5
- package/dist/m365/entra/commands/group/group-list.js +0 -5
- package/dist/m365/entra/commands/group/{group-user-add.js → group-member-add.js} +18 -18
- package/dist/m365/entra/commands/group/{group-user-list.js → group-member-list.js} +16 -21
- package/dist/m365/entra/commands/group/{group-user-set.js → group-member-set.js} +19 -19
- package/dist/m365/entra/commands/group/group-remove.js +0 -5
- package/dist/m365/entra/commands/groupsetting/groupsetting-add.js +0 -5
- package/dist/m365/entra/commands/groupsetting/groupsetting-get.js +0 -5
- package/dist/m365/entra/commands/groupsetting/groupsetting-list.js +0 -5
- package/dist/m365/entra/commands/groupsetting/groupsetting-remove.js +0 -5
- package/dist/m365/entra/commands/groupsetting/groupsetting-set.js +0 -5
- package/dist/m365/entra/commands/groupsettingtemplate/groupsettingtemplate-get.js +0 -5
- package/dist/m365/entra/commands/groupsettingtemplate/groupsettingtemplate-list.js +0 -5
- package/dist/m365/entra/commands/license/license-list.js +0 -5
- package/dist/m365/entra/commands/m365group/m365group-add.js +0 -5
- package/dist/m365/entra/commands/m365group/m365group-conversation-list.js +0 -5
- package/dist/m365/entra/commands/m365group/m365group-conversation-post-list.js +0 -5
- package/dist/m365/entra/commands/m365group/m365group-get.js +0 -5
- package/dist/m365/entra/commands/m365group/m365group-list.js +0 -5
- package/dist/m365/entra/commands/m365group/m365group-recyclebinitem-clear.js +0 -5
- package/dist/m365/entra/commands/m365group/m365group-recyclebinitem-list.js +0 -5
- package/dist/m365/entra/commands/m365group/m365group-recyclebinitem-remove.js +0 -5
- package/dist/m365/entra/commands/m365group/m365group-recyclebinitem-restore.js +0 -5
- package/dist/m365/entra/commands/m365group/m365group-remove.js +0 -5
- package/dist/m365/entra/commands/m365group/m365group-renew.js +0 -5
- package/dist/m365/entra/commands/m365group/m365group-report-activitycounts.js +0 -4
- package/dist/m365/entra/commands/m365group/m365group-report-activitydetail.js +0 -4
- package/dist/m365/entra/commands/m365group/m365group-report-activityfilecounts.js +0 -4
- package/dist/m365/entra/commands/m365group/m365group-report-activitygroupcounts.js +0 -4
- package/dist/m365/entra/commands/m365group/m365group-report-activitystorage.js +0 -4
- package/dist/m365/entra/commands/m365group/m365group-set.js +159 -86
- package/dist/m365/entra/commands/m365group/m365group-teamify.js +0 -5
- package/dist/m365/entra/commands/m365group/m365group-user-add.js +5 -18
- package/dist/m365/entra/commands/m365group/m365group-user-list.js +0 -5
- package/dist/m365/entra/commands/m365group/m365group-user-remove.js +84 -62
- package/dist/m365/entra/commands/m365group/m365group-user-set.js +3 -15
- package/dist/m365/entra/commands/oauth2grant/oauth2grant-add.js +0 -5
- package/dist/m365/entra/commands/oauth2grant/oauth2grant-list.js +3 -17
- package/dist/m365/entra/commands/oauth2grant/oauth2grant-remove.js +0 -5
- package/dist/m365/entra/commands/oauth2grant/oauth2grant-set.js +0 -5
- package/dist/m365/entra/commands/policy/policy-list.js +0 -5
- package/dist/m365/entra/commands/siteclassification/siteclassification-disable.js +0 -5
- package/dist/m365/entra/commands/siteclassification/siteclassification-enable.js +0 -5
- package/dist/m365/entra/commands/siteclassification/siteclassification-get.js +0 -5
- package/dist/m365/entra/commands/siteclassification/siteclassification-set.js +0 -5
- package/dist/m365/entra/commands/user/user-add.js +0 -5
- package/dist/m365/entra/commands/user/user-get.js +0 -5
- package/dist/m365/entra/commands/user/user-guest-add.js +0 -5
- package/dist/m365/entra/commands/user/user-hibp.js +0 -5
- package/dist/m365/entra/commands/user/user-license-add.js +0 -5
- package/dist/m365/entra/commands/user/user-license-list.js +0 -5
- package/dist/m365/entra/commands/user/user-license-remove.js +0 -5
- package/dist/m365/entra/commands/user/user-list.js +0 -5
- package/dist/m365/entra/commands/user/user-password-validate.js +0 -5
- package/dist/m365/entra/commands/user/user-recyclebinitem-clear.js +0 -5
- package/dist/m365/entra/commands/user/user-recyclebinitem-list.js +0 -5
- package/dist/m365/entra/commands/user/user-recyclebinitem-remove.js +0 -5
- package/dist/m365/entra/commands/user/user-recyclebinitem-restore.js +0 -5
- package/dist/m365/entra/commands/user/user-registrationdetails-list.js +0 -4
- package/dist/m365/entra/commands/user/user-remove.js +0 -5
- package/dist/m365/entra/commands/user/user-set.js +0 -5
- package/dist/m365/entra/commands/user/user-signin-list.js +0 -5
- package/dist/m365/entra/commands.js +3 -3
- package/dist/m365/external/commands/item/item-add.js +2 -5
- package/dist/m365/file/commands/file-move.js +135 -0
- package/dist/m365/file/commands.js +2 -1
- package/dist/m365/flow/commands/environment/environment-get.js +1 -1
- package/dist/m365/flow/commands/environment/environment-list.js +2 -2
- package/dist/m365/flow/commands/flow-disable.js +1 -1
- package/dist/m365/flow/commands/flow-enable.js +1 -1
- package/dist/m365/flow/commands/flow-export.js +17 -16
- package/dist/m365/flow/commands/flow-get.js +1 -1
- package/dist/m365/flow/commands/flow-list.js +1 -1
- package/dist/m365/flow/commands/flow-remove.js +1 -1
- package/dist/m365/flow/commands/owner/owner-ensure.js +1 -1
- package/dist/m365/flow/commands/owner/owner-list.js +1 -1
- package/dist/m365/flow/commands/owner/owner-remove.js +1 -1
- package/dist/m365/flow/commands/recyclebinitem/recyclebinitem-list.js +47 -0
- package/dist/m365/flow/commands/recyclebinitem/recyclebinitem-restore.js +48 -0
- package/dist/m365/flow/commands/run/run-cancel.js +1 -1
- package/dist/m365/flow/commands/run/run-get.js +1 -1
- package/dist/m365/flow/commands/run/run-list.js +1 -1
- package/dist/m365/flow/commands/run/run-resubmit.js +2 -2
- package/dist/m365/flow/commands.js +2 -0
- package/dist/m365/pa/commands/app/app-list.js +1 -6
- package/dist/m365/pa/commands/connector/connector-list.js +1 -6
- package/dist/m365/pa/commands/environment/environment-list.js +1 -1
- package/dist/m365/pp/commands/environment/environment-list.js +1 -1
- package/dist/m365/spfx/commands/project/project-doctor/doctor-1.20.0.js +27 -0
- package/dist/m365/spfx/commands/project/project-doctor/rules/FN002021_DEVDEP_rushstack_eslint_config.js +10 -0
- package/dist/m365/spfx/commands/project/project-doctor.js +2 -1
- package/dist/m365/spfx/commands/project/project-upgrade/upgrade-1.20.0.js +59 -0
- package/dist/m365/spfx/commands/project/project-upgrade.js +2 -1
- package/dist/m365/spfx/commands/spfx-doctor.js +15 -0
- package/dist/m365/spo/commands/app/app-instance-list.js +3 -18
- package/dist/m365/spo/commands/app/app-list.js +1 -8
- package/dist/m365/spo/commands/contenttype/contenttype-field-remove.js +8 -8
- package/dist/m365/spo/commands/contenttype/contenttype-field-set.js +2 -2
- package/dist/m365/spo/commands/feature/feature-list.js +1 -8
- package/dist/m365/spo/commands/file/file-copy.js +11 -7
- package/dist/m365/spo/commands/file/file-move.js +55 -33
- package/dist/m365/spo/commands/file/file-remove.js +7 -1
- package/dist/m365/spo/commands/file/file-roleassignment-add.js +17 -54
- package/dist/m365/spo/commands/file/file-roleassignment-remove.js +13 -40
- package/dist/m365/spo/commands/file/file-roleinheritance-break.js +5 -13
- package/dist/m365/spo/commands/file/file-roleinheritance-reset.js +5 -13
- package/dist/m365/spo/commands/folder/folder-copy.js +43 -35
- package/dist/m365/spo/commands/folder/folder-move.js +43 -35
- package/dist/m365/spo/commands/folder/folder-sharinglink-add.js +143 -0
- package/dist/m365/spo/commands/folder/folder-sharinglink-clear.js +111 -0
- package/dist/m365/spo/commands/folder/folder-sharinglink-remove.js +95 -0
- package/dist/m365/spo/commands/group/group-member-add.js +3 -23
- package/dist/m365/spo/commands/group/group-member-remove.js +1 -18
- package/dist/m365/spo/commands/list/list-get.js +17 -4
- package/dist/m365/spo/commands/list/list-remove.js +14 -4
- package/dist/m365/spo/commands/list/list-webhook-list.js +1 -6
- package/dist/m365/spo/commands/listitem/listitem-attachment-list.js +1 -8
- package/dist/m365/spo/commands/page/page-list.js +1 -1
- package/dist/m365/spo/commands/page/page-remove.js +37 -16
- package/dist/m365/spo/commands/page/page-section-add.js +185 -34
- package/dist/m365/spo/commands/page/page-template-list.js +1 -3
- package/dist/m365/spo/commands/site/SiteAdmin.js +2 -0
- package/dist/m365/spo/commands/site/site-admin-add.js +252 -0
- package/dist/m365/spo/commands/site/site-admin-list.js +10 -36
- package/dist/m365/spo/commands/site/site-admin-remove.js +194 -0
- package/dist/m365/spo/commands/site/site-sharingpermission-set.js +68 -0
- package/dist/m365/spo/commands/sitescript/sitescript-get.js +3 -2
- package/dist/m365/spo/commands/sitescript/sitescript-list.js +1 -3
- package/dist/m365/spo/commands/tenant/tenant-site-membership-list.js +118 -0
- package/dist/m365/spo/commands/{site/site-rename.js → tenant/tenant-site-rename.js} +29 -32
- package/dist/m365/spo/commands/theme/theme-list.js +1 -1
- package/dist/m365/spo/commands/user/user-ensure.js +1 -11
- package/dist/m365/spo/commands/user/user-get.js +67 -9
- package/dist/m365/spo/commands/userprofile/userprofile-get.js +1 -1
- package/dist/m365/spo/commands/web/web-clientsidewebpart-list.js +1 -6
- package/dist/m365/spo/commands.js +8 -1
- package/dist/m365/spp/commands/contentcenter/contentcenter-list.js +56 -0
- package/dist/m365/spp/commands/model/model-list.js +57 -0
- package/dist/m365/spp/commands.js +6 -0
- package/dist/m365/teams/MeetingTranscript.js +2 -0
- package/dist/m365/teams/commands/channel/channel-get.js +15 -50
- package/dist/m365/teams/commands/meeting/meeting-transcript-get.js +152 -0
- package/dist/m365/teams/commands/tab/tab-list.js +5 -3
- package/dist/m365/teams/commands/team/team-get.js +16 -21
- package/dist/m365/teams/commands.js +1 -0
- package/dist/m365/viva/commands/engage/Community.js +2 -0
- package/dist/m365/viva/commands/engage/engage-community-list.js +28 -0
- package/dist/m365/viva/commands.js +1 -0
- package/dist/request.js +46 -61
- package/dist/settingsNames.js +0 -1
- package/dist/telemetryRunner.js +2 -2
- package/dist/utils/spo.js +166 -29
- package/dist/utils/spp.js +22 -0
- package/dist/utils/teams.js +47 -5
- package/dist/utils/timersUtil.js +13 -0
- package/dist/utils/urlUtil.js +8 -0
- package/dist/utils/zod.js +12 -3
- package/docs/docs/_clisettings.mdx +0 -1
- package/docs/docs/cmd/cli/cli-doctor.mdx +24 -23
- package/docs/docs/cmd/entra/administrativeunit/administrativeunit-add.mdx +0 -6
- package/docs/docs/cmd/entra/administrativeunit/administrativeunit-get.mdx +0 -6
- package/docs/docs/cmd/entra/administrativeunit/administrativeunit-list.mdx +0 -6
- package/docs/docs/cmd/entra/administrativeunit/administrativeunit-member-add.mdx +0 -6
- package/docs/docs/cmd/entra/administrativeunit/administrativeunit-member-get.mdx +0 -6
- package/docs/docs/cmd/entra/administrativeunit/administrativeunit-member-list.mdx +0 -6
- package/docs/docs/cmd/entra/administrativeunit/administrativeunit-remove.mdx +0 -6
- package/docs/docs/cmd/entra/app/app-add.mdx +0 -1
- package/docs/docs/cmd/entra/app/app-get.mdx +0 -1
- package/docs/docs/cmd/entra/app/app-list.mdx +0 -1
- package/docs/docs/cmd/entra/app/app-permission-add.mdx +0 -1
- package/docs/docs/cmd/entra/app/app-permission-list.mdx +0 -6
- package/docs/docs/cmd/entra/app/app-remove.mdx +0 -1
- package/docs/docs/cmd/entra/app/app-role-add.mdx +0 -1
- package/docs/docs/cmd/entra/app/app-role-list.mdx +0 -1
- package/docs/docs/cmd/entra/app/app-role-remove.mdx +0 -1
- package/docs/docs/cmd/entra/app/app-set.mdx +0 -1
- package/docs/docs/cmd/entra/approleassignment/approleassignment-add.mdx +0 -6
- package/docs/docs/cmd/entra/approleassignment/approleassignment-list.mdx +0 -6
- package/docs/docs/cmd/entra/approleassignment/approleassignment-remove.mdx +0 -6
- package/docs/docs/cmd/entra/enterpriseapp/enterpriseapp-add.mdx +0 -1
- package/docs/docs/cmd/entra/enterpriseapp/enterpriseapp-get.mdx +0 -1
- package/docs/docs/cmd/entra/enterpriseapp/enterpriseapp-list.mdx +0 -1
- package/docs/docs/cmd/entra/group/group-add.mdx +0 -6
- package/docs/docs/cmd/entra/group/group-get.mdx +0 -6
- package/docs/docs/cmd/entra/group/group-list.mdx +0 -6
- package/docs/docs/cmd/entra/group/group-member-add.mdx +62 -0
- package/docs/docs/cmd/entra/group/{group-user-list.mdx → group-member-list.mdx} +14 -20
- package/docs/docs/cmd/entra/group/group-member-set.mdx +62 -0
- package/docs/docs/cmd/entra/group/group-remove.mdx +0 -6
- package/docs/docs/cmd/entra/groupsetting/groupsetting-add.mdx +0 -6
- package/docs/docs/cmd/entra/groupsetting/groupsetting-get.mdx +0 -6
- package/docs/docs/cmd/entra/groupsetting/groupsetting-list.mdx +0 -6
- package/docs/docs/cmd/entra/groupsetting/groupsetting-remove.mdx +0 -6
- package/docs/docs/cmd/entra/groupsetting/groupsetting-set.mdx +0 -6
- package/docs/docs/cmd/entra/groupsettingtemplate/groupsettingtemplate-get.mdx +0 -6
- package/docs/docs/cmd/entra/groupsettingtemplate/groupsettingtemplate-list.mdx +0 -6
- package/docs/docs/cmd/entra/license/license-list.mdx +0 -6
- package/docs/docs/cmd/entra/m365group/m365group-add.mdx +0 -6
- package/docs/docs/cmd/entra/m365group/m365group-conversation-list.mdx +0 -6
- package/docs/docs/cmd/entra/m365group/m365group-conversation-post-list.mdx +0 -6
- package/docs/docs/cmd/entra/m365group/m365group-get.mdx +0 -6
- package/docs/docs/cmd/entra/m365group/m365group-list.mdx +0 -6
- package/docs/docs/cmd/entra/m365group/m365group-recyclebinitem-clear.mdx +0 -6
- package/docs/docs/cmd/entra/m365group/m365group-recyclebinitem-list.mdx +0 -6
- package/docs/docs/cmd/entra/m365group/m365group-recyclebinitem-remove.mdx +0 -6
- package/docs/docs/cmd/entra/m365group/m365group-recyclebinitem-restore.mdx +0 -6
- package/docs/docs/cmd/entra/m365group/m365group-remove.mdx +0 -6
- package/docs/docs/cmd/entra/m365group/m365group-renew.mdx +0 -6
- package/docs/docs/cmd/entra/m365group/m365group-report-activitycounts.mdx +0 -6
- package/docs/docs/cmd/entra/m365group/m365group-report-activitydetail.mdx +0 -6
- package/docs/docs/cmd/entra/m365group/m365group-report-activityfilecounts.mdx +0 -6
- package/docs/docs/cmd/entra/m365group/m365group-report-activitygroupcounts.mdx +2 -8
- package/docs/docs/cmd/entra/m365group/m365group-report-activitystorage.mdx +3 -9
- package/docs/docs/cmd/entra/m365group/m365group-set.mdx +38 -23
- package/docs/docs/cmd/entra/m365group/m365group-teamify.mdx +5 -11
- package/docs/docs/cmd/entra/m365group/m365group-user-add.mdx +5 -14
- package/docs/docs/cmd/entra/m365group/m365group-user-list.mdx +0 -12
- package/docs/docs/cmd/entra/m365group/m365group-user-remove.mdx +26 -21
- package/docs/docs/cmd/entra/m365group/m365group-user-set.mdx +4 -17
- package/docs/docs/cmd/entra/oauth2grant/oauth2grant-add.mdx +3 -9
- package/docs/docs/cmd/entra/oauth2grant/oauth2grant-list.mdx +1 -7
- package/docs/docs/cmd/entra/oauth2grant/oauth2grant-remove.mdx +4 -10
- package/docs/docs/cmd/entra/oauth2grant/oauth2grant-set.mdx +3 -9
- package/docs/docs/cmd/entra/policy/policy-list.mdx +3 -9
- package/docs/docs/cmd/entra/siteclassification/siteclassification-disable.mdx +3 -9
- package/docs/docs/cmd/entra/siteclassification/siteclassification-enable.mdx +7 -13
- package/docs/docs/cmd/entra/siteclassification/siteclassification-get.mdx +1 -7
- package/docs/docs/cmd/entra/siteclassification/siteclassification-set.mdx +8 -14
- package/docs/docs/cmd/entra/user/user-add.mdx +4 -10
- package/docs/docs/cmd/entra/user/user-get.mdx +7 -13
- package/docs/docs/cmd/entra/user/user-guest-add.mdx +3 -9
- package/docs/docs/cmd/entra/user/user-hibp.mdx +2 -8
- package/docs/docs/cmd/entra/user/user-license-add.mdx +0 -6
- package/docs/docs/cmd/entra/user/user-license-list.mdx +0 -6
- package/docs/docs/cmd/entra/user/user-license-remove.mdx +2 -8
- package/docs/docs/cmd/entra/user/user-list.mdx +1 -7
- package/docs/docs/cmd/entra/user/user-password-validate.mdx +1 -7
- package/docs/docs/cmd/entra/user/user-recyclebinitem-clear.mdx +2 -8
- package/docs/docs/cmd/entra/user/user-recyclebinitem-list.mdx +0 -6
- package/docs/docs/cmd/entra/user/user-recyclebinitem-remove.mdx +2 -8
- package/docs/docs/cmd/entra/user/user-recyclebinitem-restore.mdx +0 -6
- package/docs/docs/cmd/entra/user/user-registrationdetails-list.mdx +7 -13
- package/docs/docs/cmd/entra/user/user-remove.mdx +2 -8
- package/docs/docs/cmd/entra/user/user-set.mdx +0 -6
- package/docs/docs/cmd/entra/user/user-signin-list.mdx +9 -15
- package/docs/docs/cmd/external/item/item-add.mdx +3 -3
- package/docs/docs/cmd/file/file-move.mdx +79 -0
- package/docs/docs/cmd/flow/recyclebinitem/recyclebinitem-list.mdx +132 -0
- package/docs/docs/cmd/flow/recyclebinitem/recyclebinitem-restore.mdx +55 -0
- package/docs/docs/cmd/login.mdx +9 -0
- package/docs/docs/cmd/setup.mdx +1 -3
- package/docs/docs/cmd/spfx/project/project-upgrade.mdx +1 -1
- package/docs/docs/cmd/spo/cdn/cdn-get.mdx +1 -1
- package/docs/docs/cmd/spo/cdn/cdn-origin-add.mdx +1 -1
- package/docs/docs/cmd/spo/cdn/cdn-origin-list.mdx +1 -1
- package/docs/docs/cmd/spo/cdn/cdn-origin-remove.mdx +1 -1
- package/docs/docs/cmd/spo/cdn/cdn-policy-list.mdx +1 -1
- package/docs/docs/cmd/spo/cdn/cdn-policy-set.mdx +1 -1
- package/docs/docs/cmd/spo/contenttype/contenttype-field-remove.mdx +7 -7
- package/docs/docs/cmd/spo/contenttype/contenttype-field-set.mdx +2 -2
- package/docs/docs/cmd/spo/externaluser/externaluser-list.mdx +1 -1
- package/docs/docs/cmd/spo/file/file-move.mdx +116 -11
- package/docs/docs/cmd/spo/file/file-remove.mdx +13 -4
- package/docs/docs/cmd/spo/folder/folder-copy.mdx +84 -13
- package/docs/docs/cmd/spo/folder/folder-move.mdx +84 -13
- package/docs/docs/cmd/spo/folder/folder-sharinglink-add.mdx +125 -0
- package/docs/docs/cmd/spo/folder/folder-sharinglink-clear.mdx +50 -0
- package/docs/docs/cmd/spo/folder/folder-sharinglink-remove.mdx +50 -0
- package/docs/docs/cmd/spo/group/group-member-add.mdx +8 -14
- package/docs/docs/cmd/spo/group/group-member-remove.mdx +5 -11
- package/docs/docs/cmd/spo/hidedefaultthemes/hidedefaultthemes-get.mdx +1 -1
- package/docs/docs/cmd/spo/hidedefaultthemes/hidedefaultthemes-set.mdx +1 -1
- package/docs/docs/cmd/spo/homesite/homesite-remove.mdx +1 -1
- package/docs/docs/cmd/spo/knowledgehub/knowledgehub-get.mdx +1 -1
- package/docs/docs/cmd/spo/knowledgehub/knowledgehub-remove.mdx +1 -1
- package/docs/docs/cmd/spo/knowledgehub/knowledgehub-set.mdx +1 -1
- package/docs/docs/cmd/spo/list/list-remove.mdx +10 -1
- package/docs/docs/cmd/spo/orgassetslibrary/orgassetslibrary-add.mdx +1 -1
- package/docs/docs/cmd/spo/orgassetslibrary/orgassetslibrary-list.mdx +1 -1
- package/docs/docs/cmd/spo/orgassetslibrary/orgassetslibrary-remove.mdx +1 -1
- package/docs/docs/cmd/spo/orgnewssite/orgnewssite-list.mdx +1 -1
- package/docs/docs/cmd/spo/orgnewssite/orgnewssite-remove.mdx +1 -1
- package/docs/docs/cmd/spo/orgnewssite/orgnewssite-set.mdx +1 -1
- package/docs/docs/cmd/spo/page/page-remove.mdx +30 -12
- package/docs/docs/cmd/spo/page/page-section-add.mdx +57 -2
- package/docs/docs/cmd/spo/site/site-admin-add.mdx +67 -0
- package/docs/docs/cmd/spo/site/site-admin-list.mdx +64 -12
- package/docs/docs/cmd/spo/site/site-admin-remove.mdx +67 -0
- package/docs/docs/cmd/spo/site/site-appcatalog-add.mdx +1 -1
- package/docs/docs/cmd/spo/site/site-appcatalog-remove.mdx +1 -1
- package/docs/docs/cmd/spo/site/site-commsite-enable.mdx +1 -1
- package/docs/docs/cmd/spo/site/site-list.mdx +6 -4
- package/docs/docs/cmd/spo/site/site-set.mdx +1 -1
- package/docs/docs/cmd/spo/site/site-sharingpermission-set.mdx +58 -0
- package/docs/docs/cmd/spo/sitescript/sitescript-get.mdx +14 -1
- package/docs/docs/cmd/spo/storageentity/storageentity-remove.mdx +1 -1
- package/docs/docs/cmd/spo/storageentity/storageentity-set.mdx +1 -1
- package/docs/docs/cmd/spo/tenant/tenant-appcatalog-add.mdx +1 -1
- package/docs/docs/cmd/spo/tenant/tenant-appcatalogurl-get.mdx +1 -1
- package/docs/docs/cmd/spo/tenant/tenant-recyclebinitem-list.mdx +1 -1
- package/docs/docs/cmd/spo/tenant/tenant-recyclebinitem-remove.mdx +1 -1
- package/docs/docs/cmd/spo/tenant/tenant-settings-list.mdx +1 -1
- package/docs/docs/cmd/spo/tenant/tenant-site-membership-list.mdx +122 -0
- package/docs/docs/cmd/spo/{site/site-rename.mdx → tenant/tenant-site-rename.mdx} +7 -7
- package/docs/docs/cmd/spo/theme/theme-apply.mdx +1 -1
- package/docs/docs/cmd/spo/theme/theme-get.mdx +1 -1
- package/docs/docs/cmd/spo/theme/theme-list.mdx +1 -1
- package/docs/docs/cmd/spo/theme/theme-remove.mdx +1 -1
- package/docs/docs/cmd/spo/theme/theme-set.mdx +1 -1
- package/docs/docs/cmd/spo/user/user-ensure.mdx +2 -5
- package/docs/docs/cmd/spo/user/user-get.mdx +35 -9
- package/docs/docs/cmd/spp/contentcenter/contentcenter-list.mdx +287 -0
- package/docs/docs/cmd/spp/model/model-list.mdx +140 -0
- package/docs/docs/cmd/teams/meeting/meeting-transcript-get.mdx +132 -0
- package/docs/docs/cmd/teams/tab/tab-list.mdx +1 -2
- package/docs/docs/cmd/viva/engage/engage-community-list.mdx +81 -0
- package/npm-shrinkwrap.json +2215 -717
- package/package.json +20 -21
- package/dist/m365/cli/commands/cli-reconsent.js +0 -29
- package/dist/m365/entra/aadCommands.js +0 -89
- package/docs/docs/cmd/cli/cli-reconsent.mdx +0 -62
- package/docs/docs/cmd/entra/group/group-user-add.mdx +0 -62
- package/docs/docs/cmd/entra/group/group-user-set.mdx +0 -62
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import PeriodBasedReport from '../../../base/PeriodBasedReport.js';
|
|
2
|
-
import aadCommands from '../../aadCommands.js';
|
|
3
2
|
import commands from '../../commands.js';
|
|
4
3
|
class M365GroupReportActivityFileCountsCommand extends PeriodBasedReport {
|
|
5
4
|
get name() {
|
|
@@ -8,9 +7,6 @@ class M365GroupReportActivityFileCountsCommand extends PeriodBasedReport {
|
|
|
8
7
|
get description() {
|
|
9
8
|
return 'Get the total number of files and how many of them were active across all group sites associated with an Microsoft 365 Group';
|
|
10
9
|
}
|
|
11
|
-
alias() {
|
|
12
|
-
return [aadCommands.M365GROUP_REPORT_ACTIVITYFILECOUNTS];
|
|
13
|
-
}
|
|
14
10
|
get usageEndpoint() {
|
|
15
11
|
return 'getOffice365GroupsActivityFileCounts';
|
|
16
12
|
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import PeriodBasedReport from '../../../base/PeriodBasedReport.js';
|
|
2
|
-
import aadCommands from '../../aadCommands.js';
|
|
3
2
|
import commands from '../../commands.js';
|
|
4
3
|
class M365GroupReportActivityGroupCountsCommand extends PeriodBasedReport {
|
|
5
4
|
get name() {
|
|
@@ -8,9 +7,6 @@ class M365GroupReportActivityGroupCountsCommand extends PeriodBasedReport {
|
|
|
8
7
|
get description() {
|
|
9
8
|
return 'Get the daily total number of groups and how many of them were active based on email conversations, Viva Engage posts, and SharePoint file activities';
|
|
10
9
|
}
|
|
11
|
-
alias() {
|
|
12
|
-
return [aadCommands.M365GROUP_REPORT_ACTIVITYGROUPCOUNTS];
|
|
13
|
-
}
|
|
14
10
|
get usageEndpoint() {
|
|
15
11
|
return 'getOffice365GroupsActivityGroupCounts';
|
|
16
12
|
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import PeriodBasedReport from '../../../base/PeriodBasedReport.js';
|
|
2
|
-
import aadCommands from '../../aadCommands.js';
|
|
3
2
|
import commands from '../../commands.js';
|
|
4
3
|
class M365GroupReportActivityStorageCommand extends PeriodBasedReport {
|
|
5
4
|
get name() {
|
|
@@ -8,9 +7,6 @@ class M365GroupReportActivityStorageCommand extends PeriodBasedReport {
|
|
|
8
7
|
get description() {
|
|
9
8
|
return 'Get the total storage used across all group mailboxes and group sites';
|
|
10
9
|
}
|
|
11
|
-
alias() {
|
|
12
|
-
return [aadCommands.M365GROUP_REPORT_ACTIVITYSTORAGE];
|
|
13
|
-
}
|
|
14
10
|
get usageEndpoint() {
|
|
15
11
|
return 'getOffice365GroupsActivityStorage';
|
|
16
12
|
}
|
|
@@ -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 _EntraM365GroupSetCommand_instances, _EntraM365GroupSetCommand_initTelemetry, _EntraM365GroupSetCommand_initOptions, _EntraM365GroupSetCommand_initTypes, _EntraM365GroupSetCommand_initValidators;
|
|
6
|
+
var _EntraM365GroupSetCommand_instances, _EntraM365GroupSetCommand_initTelemetry, _EntraM365GroupSetCommand_initOptions, _EntraM365GroupSetCommand_initOptionSets, _EntraM365GroupSetCommand_initTypes, _EntraM365GroupSetCommand_initValidators;
|
|
7
7
|
import { setTimeout } from 'timers/promises';
|
|
8
8
|
import fs from 'fs';
|
|
9
9
|
import path from 'path';
|
|
@@ -12,9 +12,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 { entraGroup } from '../../../../utils/entraGroup.js';
|
|
15
|
-
import aadCommands from '../../aadCommands.js';
|
|
16
15
|
import { accessToken } from '../../../../utils/accessToken.js';
|
|
17
16
|
import auth from '../../../../Auth.js';
|
|
17
|
+
import { entraUser } from '../../../../utils/entraUser.js';
|
|
18
|
+
import { formatting } from '../../../../utils/formatting.js';
|
|
19
|
+
import { odata } from '../../../../utils/odata.js';
|
|
18
20
|
class EntraM365GroupSetCommand extends GraphCommand {
|
|
19
21
|
get name() {
|
|
20
22
|
return commands.M365GROUP_SET;
|
|
@@ -22,41 +24,39 @@ class EntraM365GroupSetCommand extends GraphCommand {
|
|
|
22
24
|
get description() {
|
|
23
25
|
return 'Updates Microsoft 365 Group properties';
|
|
24
26
|
}
|
|
25
|
-
alias() {
|
|
26
|
-
return [aadCommands.M365GROUP_SET];
|
|
27
|
-
}
|
|
28
27
|
constructor() {
|
|
29
28
|
super();
|
|
30
29
|
_EntraM365GroupSetCommand_instances.add(this);
|
|
31
30
|
this.pollingInterval = 500;
|
|
32
31
|
__classPrivateFieldGet(this, _EntraM365GroupSetCommand_instances, "m", _EntraM365GroupSetCommand_initTelemetry).call(this);
|
|
33
32
|
__classPrivateFieldGet(this, _EntraM365GroupSetCommand_instances, "m", _EntraM365GroupSetCommand_initOptions).call(this);
|
|
34
|
-
__classPrivateFieldGet(this, _EntraM365GroupSetCommand_instances, "m", _EntraM365GroupSetCommand_initTypes).call(this);
|
|
35
33
|
__classPrivateFieldGet(this, _EntraM365GroupSetCommand_instances, "m", _EntraM365GroupSetCommand_initValidators).call(this);
|
|
34
|
+
__classPrivateFieldGet(this, _EntraM365GroupSetCommand_instances, "m", _EntraM365GroupSetCommand_initOptionSets).call(this);
|
|
35
|
+
__classPrivateFieldGet(this, _EntraM365GroupSetCommand_instances, "m", _EntraM365GroupSetCommand_initTypes).call(this);
|
|
36
36
|
}
|
|
37
37
|
async commandAction(logger, args) {
|
|
38
|
-
await this.showDeprecationWarning(logger, aadCommands.M365GROUP_SET, commands.M365GROUP_SET);
|
|
39
38
|
try {
|
|
40
39
|
if ((args.options.allowExternalSenders !== undefined || args.options.autoSubscribeNewMembers !== undefined) && accessToken.isAppOnlyAccessToken(auth.connection.accessTokens[auth.defaultResource].accessToken)) {
|
|
41
40
|
throw `Option 'allowExternalSenders' and 'autoSubscribeNewMembers' can only be used when using delegated permissions.`;
|
|
42
41
|
}
|
|
43
|
-
const
|
|
42
|
+
const groupId = args.options.id || await entraGroup.getGroupIdByDisplayName(args.options.displayName);
|
|
43
|
+
const isUnifiedGroup = await entraGroup.isUnifiedGroup(groupId);
|
|
44
44
|
if (!isUnifiedGroup) {
|
|
45
|
-
throw Error(`Specified group with id '${
|
|
45
|
+
throw Error(`Specified group with id '${groupId}' is not a Microsoft 365 group.`);
|
|
46
46
|
}
|
|
47
47
|
if (this.verbose) {
|
|
48
|
-
await logger.logToStderr(`Updating Microsoft 365 Group ${args.options.id}...`);
|
|
48
|
+
await logger.logToStderr(`Updating Microsoft 365 Group ${args.options.id || args.options.displayName}...`);
|
|
49
49
|
}
|
|
50
|
-
if (args.options.
|
|
50
|
+
if (args.options.newDisplayName || args.options.description !== undefined || args.options.isPrivate !== undefined) {
|
|
51
51
|
const update = {
|
|
52
|
-
displayName: args.options.
|
|
52
|
+
displayName: args.options.newDisplayName,
|
|
53
53
|
description: args.options.description !== '' ? args.options.description : null
|
|
54
54
|
};
|
|
55
55
|
if (args.options.isPrivate !== undefined) {
|
|
56
56
|
update.visibility = args.options.isPrivate ? 'Private' : 'Public';
|
|
57
57
|
}
|
|
58
58
|
const requestOptions = {
|
|
59
|
-
url: `${this.resource}/v1.0/groups/${
|
|
59
|
+
url: `${this.resource}/v1.0/groups/${groupId}`,
|
|
60
60
|
headers: {
|
|
61
61
|
'accept': 'application/json;odata.metadata=none'
|
|
62
62
|
},
|
|
@@ -74,7 +74,7 @@ class EntraM365GroupSetCommand extends GraphCommand {
|
|
|
74
74
|
hideFromOutlookClients: args.options.hideFromOutlookClients
|
|
75
75
|
};
|
|
76
76
|
const requestOptions = {
|
|
77
|
-
url: `${this.resource}/v1.0/groups/${
|
|
77
|
+
url: `${this.resource}/v1.0/groups/${groupId}`,
|
|
78
78
|
headers: {
|
|
79
79
|
accept: 'application/json;odata.metadata=none'
|
|
80
80
|
},
|
|
@@ -89,7 +89,7 @@ class EntraM365GroupSetCommand extends GraphCommand {
|
|
|
89
89
|
await logger.logToStderr(`Setting group logo ${fullPath}...`);
|
|
90
90
|
}
|
|
91
91
|
const requestOptions = {
|
|
92
|
-
url: `${this.resource}/v1.0/groups/${
|
|
92
|
+
url: `${this.resource}/v1.0/groups/${groupId}/photo/$value`,
|
|
93
93
|
headers: {
|
|
94
94
|
'content-type': this.getImageContentType(fullPath)
|
|
95
95
|
},
|
|
@@ -100,59 +100,13 @@ class EntraM365GroupSetCommand extends GraphCommand {
|
|
|
100
100
|
else if (this.debug) {
|
|
101
101
|
await logger.logToStderr('logoPath not set. Skipping');
|
|
102
102
|
}
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
}
|
|
108
|
-
const requestOptions = {
|
|
109
|
-
url: `${this.resource}/v1.0/users?$filter=${owners.map(o => `userPrincipalName eq '${o}'`).join(' or ')}&$select=id`,
|
|
110
|
-
headers: {
|
|
111
|
-
'content-type': 'application/json'
|
|
112
|
-
},
|
|
113
|
-
responseType: 'json'
|
|
114
|
-
};
|
|
115
|
-
const res = await request.get(requestOptions);
|
|
116
|
-
await Promise.all(res.value.map(u => request.post({
|
|
117
|
-
url: `${this.resource}/v1.0/groups/${args.options.id}/owners/$ref`,
|
|
118
|
-
headers: {
|
|
119
|
-
'content-type': 'application/json'
|
|
120
|
-
},
|
|
121
|
-
responseType: 'json',
|
|
122
|
-
data: {
|
|
123
|
-
"@odata.id": `https://graph.microsoft.com/v1.0/users/${u.id}`
|
|
124
|
-
}
|
|
125
|
-
})));
|
|
126
|
-
}
|
|
127
|
-
else if (this.debug) {
|
|
128
|
-
await logger.logToStderr('Owners not set. Skipping');
|
|
129
|
-
}
|
|
130
|
-
if (args.options.members) {
|
|
131
|
-
const members = args.options.members.split(',').map(o => o.trim());
|
|
132
|
-
if (this.verbose) {
|
|
133
|
-
await logger.logToStderr('Retrieving user information to set group members...');
|
|
134
|
-
}
|
|
135
|
-
const requestOptions = {
|
|
136
|
-
url: `${this.resource}/v1.0/users?$filter=${members.map(o => `userPrincipalName eq '${o}'`).join(' or ')}&$select=id`,
|
|
137
|
-
headers: {
|
|
138
|
-
'content-type': 'application/json'
|
|
139
|
-
},
|
|
140
|
-
responseType: 'json'
|
|
141
|
-
};
|
|
142
|
-
const res = await request.get(requestOptions);
|
|
143
|
-
await Promise.all(res.value.map(u => request.post({
|
|
144
|
-
url: `${this.resource}/v1.0/groups/${args.options.id}/members/$ref`,
|
|
145
|
-
headers: {
|
|
146
|
-
'content-type': 'application/json'
|
|
147
|
-
},
|
|
148
|
-
responseType: 'json',
|
|
149
|
-
data: {
|
|
150
|
-
"@odata.id": `https://graph.microsoft.com/v1.0/users/${u.id}`
|
|
151
|
-
}
|
|
152
|
-
})));
|
|
103
|
+
const ownerIds = await this.getUserIds(logger, args.options.ownerIds, args.options.ownerUserNames);
|
|
104
|
+
const memberIds = await this.getUserIds(logger, args.options.memberIds, args.options.memberUserNames);
|
|
105
|
+
if (ownerIds.length > 0) {
|
|
106
|
+
await this.updateUsers(logger, groupId, 'owners', ownerIds);
|
|
153
107
|
}
|
|
154
|
-
|
|
155
|
-
await
|
|
108
|
+
if (memberIds.length > 0) {
|
|
109
|
+
await this.updateUsers(logger, groupId, 'members', memberIds);
|
|
156
110
|
}
|
|
157
111
|
}
|
|
158
112
|
catch (err) {
|
|
@@ -184,14 +138,99 @@ class EntraM365GroupSetCommand extends GraphCommand {
|
|
|
184
138
|
return 'image/jpeg';
|
|
185
139
|
}
|
|
186
140
|
}
|
|
141
|
+
async getUserIds(logger, userIds, userNames) {
|
|
142
|
+
if (userIds) {
|
|
143
|
+
return formatting.splitAndTrim(userIds);
|
|
144
|
+
}
|
|
145
|
+
if (userNames) {
|
|
146
|
+
if (this.verbose) {
|
|
147
|
+
await logger.logToStderr(`Retrieving user IDs...`);
|
|
148
|
+
}
|
|
149
|
+
return entraUser.getUserIdsByUpns(formatting.splitAndTrim(userNames));
|
|
150
|
+
}
|
|
151
|
+
return [];
|
|
152
|
+
}
|
|
153
|
+
async updateUsers(logger, groupId, role, userIds) {
|
|
154
|
+
const groupUsers = await odata.getAllItems(`${this.resource}/v1.0/groups/${groupId}/${role}/microsoft.graph.user?$select=id`);
|
|
155
|
+
const userIdsToAdd = userIds.filter(userId => !groupUsers.some(groupUser => groupUser.id === userId));
|
|
156
|
+
const userIdsToRemove = groupUsers.filter(groupUser => !userIds.some(userId => groupUser.id === userId)).map(user => user.id);
|
|
157
|
+
if (this.verbose) {
|
|
158
|
+
await logger.logToStderr(`Adding ${userIdsToAdd.length} ${role}...`);
|
|
159
|
+
}
|
|
160
|
+
for (let i = 0; i < userIdsToAdd.length; i += 400) {
|
|
161
|
+
const userIdsBatch = userIdsToAdd.slice(i, i + 400);
|
|
162
|
+
const batchRequestOptions = this.getBatchRequestOptions();
|
|
163
|
+
// only 20 requests per one batch are allowed
|
|
164
|
+
for (let j = 0; j < userIdsBatch.length; j += 20) {
|
|
165
|
+
// only 20 users can be added in one request
|
|
166
|
+
const userIdsChunk = userIdsBatch.slice(j, j + 20);
|
|
167
|
+
batchRequestOptions.data.requests.push({
|
|
168
|
+
id: j + 1,
|
|
169
|
+
method: 'PATCH',
|
|
170
|
+
url: `/groups/${groupId}`,
|
|
171
|
+
headers: {
|
|
172
|
+
'content-type': 'application/json;odata.metadata=none',
|
|
173
|
+
accept: 'application/json;odata.metadata=none'
|
|
174
|
+
},
|
|
175
|
+
body: {
|
|
176
|
+
[`${role}@odata.bind`]: userIdsChunk.map(u => `${this.resource}/v1.0/directoryObjects/${u}`)
|
|
177
|
+
}
|
|
178
|
+
});
|
|
179
|
+
}
|
|
180
|
+
const res = await request.post(batchRequestOptions);
|
|
181
|
+
for (const response of res.responses) {
|
|
182
|
+
if (response.status !== 204) {
|
|
183
|
+
throw response.body;
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
if (this.verbose) {
|
|
188
|
+
await logger.logToStderr(`Removing ${userIdsToRemove.length} ${role}...`);
|
|
189
|
+
}
|
|
190
|
+
for (let i = 0; i < userIdsToRemove.length; i += 20) {
|
|
191
|
+
const userIdsBatch = userIdsToRemove.slice(i, i + 20);
|
|
192
|
+
const batchRequestOptions = this.getBatchRequestOptions();
|
|
193
|
+
userIdsBatch.map(userId => {
|
|
194
|
+
batchRequestOptions.data.requests.push({
|
|
195
|
+
id: userId,
|
|
196
|
+
method: 'DELETE',
|
|
197
|
+
url: `/groups/${groupId}/${role}/${userId}/$ref`
|
|
198
|
+
});
|
|
199
|
+
});
|
|
200
|
+
const res = await request.post(batchRequestOptions);
|
|
201
|
+
for (const response of res.responses) {
|
|
202
|
+
if (response.status !== 204) {
|
|
203
|
+
throw response.body;
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
getBatchRequestOptions() {
|
|
209
|
+
const requestOptions = {
|
|
210
|
+
url: `${this.resource}/v1.0/$batch`,
|
|
211
|
+
headers: {
|
|
212
|
+
'content-type': 'application/json;odata.metadata=none',
|
|
213
|
+
accept: 'application/json;odata.metadata=none'
|
|
214
|
+
},
|
|
215
|
+
responseType: 'json',
|
|
216
|
+
data: {
|
|
217
|
+
requests: []
|
|
218
|
+
}
|
|
219
|
+
};
|
|
220
|
+
return requestOptions;
|
|
221
|
+
}
|
|
187
222
|
}
|
|
188
223
|
_EntraM365GroupSetCommand_instances = new WeakSet(), _EntraM365GroupSetCommand_initTelemetry = function _EntraM365GroupSetCommand_initTelemetry() {
|
|
189
224
|
this.telemetry.push((args) => {
|
|
190
225
|
Object.assign(this.telemetryProperties, {
|
|
226
|
+
id: typeof args.options.id !== 'undefined',
|
|
191
227
|
displayName: typeof args.options.displayName !== 'undefined',
|
|
228
|
+
newDisplayName: typeof args.options.newDisplayName !== 'undefined',
|
|
192
229
|
description: typeof args.options.description !== 'undefined',
|
|
193
|
-
|
|
194
|
-
|
|
230
|
+
ownerIds: typeof args.options.ownerIds !== 'undefined',
|
|
231
|
+
ownerUserNames: typeof args.options.ownerUserNames !== 'undefined',
|
|
232
|
+
memberIds: typeof args.options.memberIds !== 'undefined',
|
|
233
|
+
memberUserNames: typeof args.options.memberUserNames !== 'undefined',
|
|
195
234
|
isPrivate: !!args.options.isPrivate,
|
|
196
235
|
logoPath: typeof args.options.logoPath !== 'undefined',
|
|
197
236
|
allowExternalSenders: !!args.options.allowExternalSenders,
|
|
@@ -202,15 +241,21 @@ _EntraM365GroupSetCommand_instances = new WeakSet(), _EntraM365GroupSetCommand_i
|
|
|
202
241
|
});
|
|
203
242
|
}, _EntraM365GroupSetCommand_initOptions = function _EntraM365GroupSetCommand_initOptions() {
|
|
204
243
|
this.options.unshift({
|
|
205
|
-
option: '-i, --id
|
|
244
|
+
option: '-i, --id [id]'
|
|
206
245
|
}, {
|
|
207
246
|
option: '-n, --displayName [displayName]'
|
|
247
|
+
}, {
|
|
248
|
+
option: '--newDisplayName [newDisplayName]'
|
|
208
249
|
}, {
|
|
209
250
|
option: '-d, --description [description]'
|
|
210
251
|
}, {
|
|
211
|
-
option: '--
|
|
252
|
+
option: '--ownerIds [ownerIds]'
|
|
212
253
|
}, {
|
|
213
|
-
option: '--
|
|
254
|
+
option: '--ownerUserNames [ownerUserNames]'
|
|
255
|
+
}, {
|
|
256
|
+
option: '--memberIds [memberIds]'
|
|
257
|
+
}, {
|
|
258
|
+
option: '--memberUserNames [memberUserNames]'
|
|
214
259
|
}, {
|
|
215
260
|
option: '--isPrivate [isPrivate]',
|
|
216
261
|
autocomplete: ['true', 'false']
|
|
@@ -229,36 +274,64 @@ _EntraM365GroupSetCommand_instances = new WeakSet(), _EntraM365GroupSetCommand_i
|
|
|
229
274
|
option: '--hideFromOutlookClients [hideFromOutlookClients]',
|
|
230
275
|
autocomplete: ['true', 'false']
|
|
231
276
|
});
|
|
277
|
+
}, _EntraM365GroupSetCommand_initOptionSets = function _EntraM365GroupSetCommand_initOptionSets() {
|
|
278
|
+
this.optionSets.push({ options: ['id', 'displayName'] });
|
|
279
|
+
this.optionSets.push({
|
|
280
|
+
options: ['ownerIds', 'ownerUserNames'],
|
|
281
|
+
runsWhen: (args) => {
|
|
282
|
+
return args.options.ownerIds !== undefined || args.options.ownerUserNames !== undefined;
|
|
283
|
+
}
|
|
284
|
+
});
|
|
285
|
+
this.optionSets.push({
|
|
286
|
+
options: ['memberIds', 'memberUserNames'],
|
|
287
|
+
runsWhen: (args) => {
|
|
288
|
+
return args.options.memberIds !== undefined || args.options.memberUserNames !== undefined;
|
|
289
|
+
}
|
|
290
|
+
});
|
|
232
291
|
}, _EntraM365GroupSetCommand_initTypes = function _EntraM365GroupSetCommand_initTypes() {
|
|
233
292
|
this.types.boolean.push('isPrivate', 'allowEternalSenders', 'autoSubscribeNewMembers', 'hideFromAddressLists', 'hideFromOutlookClients');
|
|
234
|
-
this.types.string.push('id', 'displayName', 'description', '
|
|
293
|
+
this.types.string.push('id', 'displayName', 'newDisplayName', 'description', 'ownerIds', 'ownerUserNames', 'memberIds', 'memberUserNames', 'logoPath');
|
|
235
294
|
}, _EntraM365GroupSetCommand_initValidators = function _EntraM365GroupSetCommand_initValidators() {
|
|
236
295
|
this.validators.push(async (args) => {
|
|
237
|
-
if (!args.options.
|
|
296
|
+
if (!args.options.newDisplayName &&
|
|
238
297
|
args.options.description === undefined &&
|
|
239
|
-
|
|
240
|
-
|
|
298
|
+
args.options.ownerIds === undefined &&
|
|
299
|
+
args.options.ownerUserNames === undefined &&
|
|
300
|
+
args.options.memberIds === undefined &&
|
|
301
|
+
args.options.memberUserNames === undefined &&
|
|
241
302
|
args.options.isPrivate === undefined &&
|
|
242
|
-
|
|
303
|
+
args.options.logoPath === undefined &&
|
|
243
304
|
args.options.allowExternalSenders === undefined &&
|
|
244
305
|
args.options.autoSubscribeNewMembers === undefined &&
|
|
245
306
|
args.options.hideFromAddressLists === undefined &&
|
|
246
307
|
args.options.hideFromOutlookClients === undefined) {
|
|
247
308
|
return 'Specify at least one option to update.';
|
|
248
309
|
}
|
|
249
|
-
if (!validation.isValidGuid(args.options.id)) {
|
|
310
|
+
if (args.options.id && !validation.isValidGuid(args.options.id)) {
|
|
250
311
|
return `${args.options.id} is not a valid GUID`;
|
|
251
312
|
}
|
|
252
|
-
if (args.options.
|
|
253
|
-
const
|
|
254
|
-
if (
|
|
255
|
-
return `
|
|
313
|
+
if (args.options.ownerIds) {
|
|
314
|
+
const isValidGUIDArrayResult = validation.isValidGuidArray(args.options.ownerIds);
|
|
315
|
+
if (isValidGUIDArrayResult !== true) {
|
|
316
|
+
return `The following GUIDs are invalid for the option 'ownerIds': ${isValidGUIDArrayResult}.`;
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
if (args.options.ownerUserNames) {
|
|
320
|
+
const isValidUPNArrayResult = validation.isValidUserPrincipalNameArray(args.options.ownerUserNames);
|
|
321
|
+
if (isValidUPNArrayResult !== true) {
|
|
322
|
+
return `The following user principal names are invalid for the option 'ownerUserNames': ${isValidUPNArrayResult}.`;
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
if (args.options.memberIds) {
|
|
326
|
+
const isValidGUIDArrayResult = validation.isValidGuidArray(args.options.memberIds);
|
|
327
|
+
if (isValidGUIDArrayResult !== true) {
|
|
328
|
+
return `The following GUIDs are invalid for the option 'memberIds': ${isValidGUIDArrayResult}.`;
|
|
256
329
|
}
|
|
257
330
|
}
|
|
258
|
-
if (args.options.
|
|
259
|
-
const
|
|
260
|
-
if (
|
|
261
|
-
return `
|
|
331
|
+
if (args.options.memberUserNames) {
|
|
332
|
+
const isValidUPNArrayResult = validation.isValidUserPrincipalNameArray(args.options.memberUserNames);
|
|
333
|
+
if (isValidUPNArrayResult !== true) {
|
|
334
|
+
return `The following user principal names are invalid for the option 'memberUserNames': ${isValidUPNArrayResult}.`;
|
|
262
335
|
}
|
|
263
336
|
}
|
|
264
337
|
if (args.options.logoPath) {
|
|
@@ -10,7 +10,6 @@ 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';
|
|
13
|
-
import aadCommands from '../../aadCommands.js';
|
|
14
13
|
import commands from '../../commands.js';
|
|
15
14
|
class EntraM365GroupTeamifyCommand extends GraphCommand {
|
|
16
15
|
get name() {
|
|
@@ -19,9 +18,6 @@ class EntraM365GroupTeamifyCommand extends GraphCommand {
|
|
|
19
18
|
get description() {
|
|
20
19
|
return 'Creates a new Microsoft Teams team under existing Microsoft 365 group';
|
|
21
20
|
}
|
|
22
|
-
alias() {
|
|
23
|
-
return [aadCommands.M365GROUP_TEAMIFY];
|
|
24
|
-
}
|
|
25
21
|
constructor() {
|
|
26
22
|
super();
|
|
27
23
|
_EntraM365GroupTeamifyCommand_instances.add(this);
|
|
@@ -54,7 +50,6 @@ class EntraM365GroupTeamifyCommand extends GraphCommand {
|
|
|
54
50
|
return groupItem.id;
|
|
55
51
|
}
|
|
56
52
|
async commandAction(logger, args) {
|
|
57
|
-
await this.showDeprecationWarning(logger, aadCommands.M365GROUP_TEAMIFY, commands.M365GROUP_TEAMIFY);
|
|
58
53
|
try {
|
|
59
54
|
const groupId = await this.getGroupId(args.options);
|
|
60
55
|
const isUnifiedGroup = await entraGroup.isUnifiedGroup(groupId);
|
|
@@ -9,8 +9,6 @@ import { entraGroup } from '../../../../utils/entraGroup.js';
|
|
|
9
9
|
import { validation } from '../../../../utils/validation.js';
|
|
10
10
|
import { formatting } from '../../../../utils/formatting.js';
|
|
11
11
|
import GraphCommand from '../../../base/GraphCommand.js';
|
|
12
|
-
import teamsCommands from '../../../teams/commands.js';
|
|
13
|
-
import aadCommands from '../../aadCommands.js';
|
|
14
12
|
import { entraUser } from '../../../../utils/entraUser.js';
|
|
15
13
|
import commands from '../../commands.js';
|
|
16
14
|
class EntraM365GroupUserAddCommand extends GraphCommand {
|
|
@@ -20,9 +18,6 @@ class EntraM365GroupUserAddCommand extends GraphCommand {
|
|
|
20
18
|
get description() {
|
|
21
19
|
return 'Adds user to specified Microsoft 365 Group or Microsoft Teams team';
|
|
22
20
|
}
|
|
23
|
-
alias() {
|
|
24
|
-
return [teamsCommands.USER_ADD, aadCommands.M365GROUP_USER_ADD];
|
|
25
|
-
}
|
|
26
21
|
constructor() {
|
|
27
22
|
super();
|
|
28
23
|
_EntraM365GroupUserAddCommand_instances.add(this);
|
|
@@ -34,20 +29,15 @@ class EntraM365GroupUserAddCommand extends GraphCommand {
|
|
|
34
29
|
__classPrivateFieldGet(this, _EntraM365GroupUserAddCommand_instances, "m", _EntraM365GroupUserAddCommand_initTypes).call(this);
|
|
35
30
|
}
|
|
36
31
|
async commandAction(logger, args) {
|
|
37
|
-
await this.showDeprecationWarning(logger, aadCommands.M365GROUP_USER_ADD, commands.M365GROUP_USER_ADD);
|
|
38
|
-
if (args.options.userName) {
|
|
39
|
-
await this.warn(logger, `Option 'userName' is deprecated. Please use 'ids' or 'userNames' instead.`);
|
|
40
|
-
}
|
|
41
32
|
try {
|
|
42
|
-
const userNames = args.options.userNames || args.options.userName;
|
|
43
33
|
const providedGroupId = await this.getGroupId(logger, args);
|
|
44
34
|
const isUnifiedGroup = await entraGroup.isUnifiedGroup(providedGroupId);
|
|
45
35
|
if (!isUnifiedGroup) {
|
|
46
36
|
throw Error(`Specified group with id '${providedGroupId}' is not a Microsoft 365 group.`);
|
|
47
37
|
}
|
|
48
|
-
const userIds = await this.getUserIds(logger, args.options.ids, userNames);
|
|
38
|
+
const userIds = await this.getUserIds(logger, args.options.ids, args.options.userNames);
|
|
49
39
|
if (this.verbose) {
|
|
50
|
-
await logger.logToStderr(`Adding user(s) ${args.options.ids || userNames} to group ${args.options.groupId || args.options.groupName || args.options.teamId || args.options.teamName}...`);
|
|
40
|
+
await logger.logToStderr(`Adding user(s) ${args.options.ids || args.options.userNames} to group ${args.options.groupId || args.options.groupName || args.options.teamId || args.options.teamName}...`);
|
|
51
41
|
}
|
|
52
42
|
await this.addUsers(providedGroupId, userIds, args.options.role);
|
|
53
43
|
}
|
|
@@ -122,14 +112,11 @@ _EntraM365GroupUserAddCommand_instances = new WeakSet(), _EntraM365GroupUserAddC
|
|
|
122
112
|
teamName: typeof args.options.teamName !== 'undefined',
|
|
123
113
|
groupName: typeof args.options.groupName !== 'undefined',
|
|
124
114
|
ids: typeof args.options.ids !== 'undefined',
|
|
125
|
-
userNames: typeof args.options.userNames !== 'undefined'
|
|
126
|
-
userName: typeof args.options.userName !== 'undefined'
|
|
115
|
+
userNames: typeof args.options.userNames !== 'undefined'
|
|
127
116
|
});
|
|
128
117
|
});
|
|
129
118
|
}, _EntraM365GroupUserAddCommand_initOptions = function _EntraM365GroupUserAddCommand_initOptions() {
|
|
130
119
|
this.options.unshift({
|
|
131
|
-
option: '-n, --userName [userName]'
|
|
132
|
-
}, {
|
|
133
120
|
option: '--ids [ids]'
|
|
134
121
|
}, {
|
|
135
122
|
option: '--userNames [userNames]'
|
|
@@ -172,9 +159,9 @@ _EntraM365GroupUserAddCommand_instances = new WeakSet(), _EntraM365GroupUserAddC
|
|
|
172
159
|
});
|
|
173
160
|
}, _EntraM365GroupUserAddCommand_initOptionSets = function _EntraM365GroupUserAddCommand_initOptionSets() {
|
|
174
161
|
this.optionSets.push({ options: ['groupId', 'groupName', 'teamId', 'teamName'] });
|
|
175
|
-
this.optionSets.push({ options: ['
|
|
162
|
+
this.optionSets.push({ options: ['ids', 'userNames'] });
|
|
176
163
|
}, _EntraM365GroupUserAddCommand_initTypes = function _EntraM365GroupUserAddCommand_initTypes() {
|
|
177
|
-
this.types.string.push('
|
|
164
|
+
this.types.string.push('ids', 'userNames', 'groupId', 'groupName', 'teamId', 'teamName', 'role');
|
|
178
165
|
};
|
|
179
166
|
export default new EntraM365GroupUserAddCommand();
|
|
180
167
|
//# sourceMappingURL=m365group-user-add.js.map
|
|
@@ -9,7 +9,6 @@ import { validation } from '../../../../utils/validation.js';
|
|
|
9
9
|
import GraphCommand from '../../../base/GraphCommand.js';
|
|
10
10
|
import commands from '../../commands.js';
|
|
11
11
|
import { entraGroup } from '../../../../utils/entraGroup.js';
|
|
12
|
-
import aadCommands from '../../aadCommands.js';
|
|
13
12
|
class EntraM365GroupUserListCommand extends GraphCommand {
|
|
14
13
|
get name() {
|
|
15
14
|
return commands.M365GROUP_USER_LIST;
|
|
@@ -17,9 +16,6 @@ class EntraM365GroupUserListCommand extends GraphCommand {
|
|
|
17
16
|
get description() {
|
|
18
17
|
return "Lists users for the specified Microsoft 365 group";
|
|
19
18
|
}
|
|
20
|
-
alias() {
|
|
21
|
-
return [aadCommands.M365GROUP_USER_LIST];
|
|
22
|
-
}
|
|
23
19
|
constructor() {
|
|
24
20
|
super();
|
|
25
21
|
_EntraM365GroupUserListCommand_instances.add(this);
|
|
@@ -29,7 +25,6 @@ class EntraM365GroupUserListCommand extends GraphCommand {
|
|
|
29
25
|
__classPrivateFieldGet(this, _EntraM365GroupUserListCommand_instances, "m", _EntraM365GroupUserListCommand_initValidators).call(this);
|
|
30
26
|
}
|
|
31
27
|
async commandAction(logger, args) {
|
|
32
|
-
await this.showDeprecationWarning(logger, aadCommands.M365GROUP_USER_LIST, commands.M365GROUP_USER_LIST);
|
|
33
28
|
try {
|
|
34
29
|
const groupId = await this.getGroupId(args.options, logger);
|
|
35
30
|
const isUnifiedGroup = await entraGroup.isUnifiedGroup(groupId);
|