@pnp/cli-microsoft365 10.0.0-beta.48e9f7d → 10.0.0-beta.558f289
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 +17 -16
- 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/cli/cli.js +14 -0
- package/dist/config.js +61 -5
- package/dist/m365/base/PowerAutomateCommand.js +1 -1
- package/dist/m365/base/SpoCommand.js +1 -1
- package/dist/m365/cli/commands/cli-consent.js +2 -2
- package/dist/m365/cli/commands/cli-doctor.js +4 -4
- package/dist/m365/cli/commands/config/config-set.js +12 -4
- package/dist/m365/cli/commands.js +1 -2
- package/dist/m365/commands/login.js +133 -61
- package/dist/m365/commands/setup.js +256 -33
- package/dist/m365/commands/setupPresets.js +2 -4
- package/dist/m365/connection/commands/connection-list.js +4 -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 +51 -292
- 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/folder/folder-sharinglink-set.js +90 -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-publish.js +54 -0
- 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/SPOTenantSitePropertiesEnumerable.js +2 -0
- package/dist/m365/spo/commands/tenant/TenantSiteProperties.js +2 -0
- package/dist/m365/spo/commands/{site/site-list.js → tenant/tenant-site-list.js} +15 -12
- 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 +11 -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/cache/cache-remove.js +74 -34
- 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/engage/engage-community-user-list.js +98 -0
- package/dist/m365/viva/commands.js +2 -0
- package/dist/request.js +46 -61
- package/dist/settingsNames.js +6 -1
- package/dist/telemetryRunner.js +2 -2
- package/dist/utils/entraApp.js +283 -0
- 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/vivaEngage.js +61 -0
- package/dist/utils/zod.js +12 -3
- package/docs/docs/_clisettings.mdx +6 -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 +17 -6
- 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/folder/folder-sharinglink-set.mdx +116 -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-publish.mdx +41 -0
- 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-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/{site/site-list.mdx → tenant/tenant-site-list.mdx} +19 -11
- 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/cache/cache-remove.mdx +10 -1
- 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/docs/docs/cmd/viva/engage/engage-community-user-list.mdx +123 -0
- package/npm-shrinkwrap.json +2215 -717
- package/package.json +20 -21
- package/dist/m365/cli/commands/cli-reconsent.js +0 -30
- 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
|
@@ -6,12 +6,44 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
6
6
|
var _SetupCommand_instances, _SetupCommand_initTelemetry, _SetupCommand_initOptions, _SetupCommand_initValidators;
|
|
7
7
|
import chalk from 'chalk';
|
|
8
8
|
import os from 'os';
|
|
9
|
+
import auth, { AuthType } from '../../Auth.js';
|
|
9
10
|
import { cli } from '../../cli/cli.js';
|
|
11
|
+
import config from '../../config.js';
|
|
12
|
+
import { settingsNames } from '../../settingsNames.js';
|
|
13
|
+
import { accessToken } from '../../utils/accessToken.js';
|
|
14
|
+
import { entraApp } from '../../utils/entraApp.js';
|
|
10
15
|
import { CheckStatus, formatting } from '../../utils/formatting.js';
|
|
11
16
|
import { pid } from '../../utils/pid.js';
|
|
17
|
+
import { validation } from '../../utils/validation.js';
|
|
12
18
|
import AnonymousCommand from '../base/AnonymousCommand.js';
|
|
13
19
|
import commands from './commands.js';
|
|
14
20
|
import { interactivePreset, powerShellPreset, scriptingPreset } from './setupPresets.js';
|
|
21
|
+
export var CliUsageMode;
|
|
22
|
+
(function (CliUsageMode) {
|
|
23
|
+
CliUsageMode["Interactively"] = "interactively";
|
|
24
|
+
CliUsageMode["Scripting"] = "scripting";
|
|
25
|
+
})(CliUsageMode || (CliUsageMode = {}));
|
|
26
|
+
export var CliExperience;
|
|
27
|
+
(function (CliExperience) {
|
|
28
|
+
CliExperience["Beginner"] = "beginner";
|
|
29
|
+
CliExperience["Proficient"] = "proficient";
|
|
30
|
+
})(CliExperience || (CliExperience = {}));
|
|
31
|
+
export var EntraAppConfig;
|
|
32
|
+
(function (EntraAppConfig) {
|
|
33
|
+
EntraAppConfig["Create"] = "create";
|
|
34
|
+
EntraAppConfig["UseExisting"] = "useExisting";
|
|
35
|
+
EntraAppConfig["Skip"] = "skip";
|
|
36
|
+
})(EntraAppConfig || (EntraAppConfig = {}));
|
|
37
|
+
export var NewEntraAppScopes;
|
|
38
|
+
(function (NewEntraAppScopes) {
|
|
39
|
+
NewEntraAppScopes["Minimal"] = "minimal";
|
|
40
|
+
NewEntraAppScopes["All"] = "all";
|
|
41
|
+
})(NewEntraAppScopes || (NewEntraAppScopes = {}));
|
|
42
|
+
export var HelpMode;
|
|
43
|
+
(function (HelpMode) {
|
|
44
|
+
HelpMode["Full"] = "full";
|
|
45
|
+
HelpMode["Options"] = "options";
|
|
46
|
+
})(HelpMode || (HelpMode = {}));
|
|
15
47
|
class SetupCommand extends AnonymousCommand {
|
|
16
48
|
get name() {
|
|
17
49
|
return commands.SETUP;
|
|
@@ -35,11 +67,11 @@ class SetupCommand extends AnonymousCommand {
|
|
|
35
67
|
}
|
|
36
68
|
else if (args.options.scripting) {
|
|
37
69
|
Object.assign(settings, scriptingPreset);
|
|
38
|
-
if (pid.isPowerShell()) {
|
|
39
|
-
Object.assign(settings, powerShellPreset);
|
|
40
|
-
}
|
|
41
70
|
}
|
|
42
|
-
|
|
71
|
+
if (pid.isPowerShell()) {
|
|
72
|
+
Object.assign(settings, powerShellPreset);
|
|
73
|
+
}
|
|
74
|
+
await this.configureSettings({ preferences: {}, settings, silent: true, logger });
|
|
43
75
|
return;
|
|
44
76
|
}
|
|
45
77
|
await logger.logToStderr(`Welcome to the CLI for Microsoft 365 setup!`);
|
|
@@ -47,15 +79,45 @@ class SetupCommand extends AnonymousCommand {
|
|
|
47
79
|
await logger.logToStderr(`Please, answer the following questions and we'll define a set of settings to best match how you intend to use the CLI.`);
|
|
48
80
|
await logger.logToStderr('');
|
|
49
81
|
const preferences = {};
|
|
82
|
+
if (!args.options.skipApp) {
|
|
83
|
+
const entraAppConfig = {
|
|
84
|
+
message: 'CLI for Microsoft 365 requires a Microsoft Entra app. Do you want to create a new app registration or use an existing one?',
|
|
85
|
+
choices: [
|
|
86
|
+
{ name: 'Create a new app registration', value: EntraAppConfig.Create },
|
|
87
|
+
{ name: 'Use an existing app registration', value: EntraAppConfig.UseExisting },
|
|
88
|
+
{ name: 'Skip configuring app registration', value: EntraAppConfig.Skip }
|
|
89
|
+
]
|
|
90
|
+
};
|
|
91
|
+
preferences.entraApp = await cli.promptForSelection(entraAppConfig);
|
|
92
|
+
switch (preferences.entraApp) {
|
|
93
|
+
case EntraAppConfig.Create:
|
|
94
|
+
const newEntraAppScopesConfig = {
|
|
95
|
+
message: 'What scopes should the new app registration have?',
|
|
96
|
+
choices: [
|
|
97
|
+
{ name: 'User.Read (you will need to add the necessary permissions yourself)', value: NewEntraAppScopes.Minimal },
|
|
98
|
+
{ name: 'All (easy way to use all CLI commands)', value: NewEntraAppScopes.All }
|
|
99
|
+
]
|
|
100
|
+
};
|
|
101
|
+
preferences.newEntraAppScopes = await cli.promptForSelection(newEntraAppScopesConfig);
|
|
102
|
+
break;
|
|
103
|
+
case EntraAppConfig.UseExisting:
|
|
104
|
+
const existingApp = await this.configureExistingEntraApp(logger);
|
|
105
|
+
Object.assign(preferences, existingApp);
|
|
106
|
+
break;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
else {
|
|
110
|
+
preferences.entraApp = EntraAppConfig.Skip;
|
|
111
|
+
}
|
|
50
112
|
const usageModeConfig = {
|
|
51
113
|
message: 'How do you plan to use the CLI?',
|
|
52
114
|
choices: [
|
|
53
|
-
{ name: 'Interactively', value:
|
|
54
|
-
{ name: 'Scripting', value:
|
|
115
|
+
{ name: 'Interactively', value: CliUsageMode.Interactively },
|
|
116
|
+
{ name: 'Scripting', value: CliUsageMode.Scripting }
|
|
55
117
|
]
|
|
56
118
|
};
|
|
57
119
|
preferences.usageMode = await cli.promptForSelection(usageModeConfig);
|
|
58
|
-
if (preferences.usageMode ===
|
|
120
|
+
if (preferences.usageMode === CliUsageMode.Scripting) {
|
|
59
121
|
const usedInPowerShellConfig = {
|
|
60
122
|
message: 'Are you going to use the CLI in PowerShell?',
|
|
61
123
|
default: pid.isPowerShell()
|
|
@@ -65,33 +127,149 @@ class SetupCommand extends AnonymousCommand {
|
|
|
65
127
|
const experienceConfig = {
|
|
66
128
|
message: 'How experienced are you in using the CLI?',
|
|
67
129
|
choices: [
|
|
68
|
-
{ name: 'Beginner', value:
|
|
69
|
-
{ name: 'Proficient', value:
|
|
130
|
+
{ name: 'Beginner', value: CliExperience.Beginner },
|
|
131
|
+
{ name: 'Proficient', value: CliExperience.Proficient }
|
|
70
132
|
]
|
|
71
133
|
};
|
|
72
134
|
preferences.experience = await cli.promptForSelection(experienceConfig);
|
|
73
135
|
const summaryConfig = {
|
|
74
|
-
message: this.getSummaryMessage(
|
|
136
|
+
message: this.getSummaryMessage(preferences)
|
|
75
137
|
};
|
|
76
138
|
preferences.summary = await cli.promptForConfirmation(summaryConfig);
|
|
77
|
-
if (preferences.summary) {
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
139
|
+
if (!preferences.summary) {
|
|
140
|
+
return;
|
|
141
|
+
}
|
|
142
|
+
// used only for testing. Normally, we'd get the settings from the answers
|
|
143
|
+
/* c8 ignore next 3 */
|
|
144
|
+
if (!settings) {
|
|
145
|
+
settings = this.getSettings(preferences);
|
|
146
|
+
}
|
|
147
|
+
await logger.logToStderr('');
|
|
148
|
+
await logger.logToStderr('Configuring settings...');
|
|
149
|
+
await logger.logToStderr('');
|
|
150
|
+
await this.configureSettings({ preferences, settings, silent: false, logger });
|
|
151
|
+
if (!this.verbose) {
|
|
85
152
|
await logger.logToStderr('');
|
|
86
|
-
await
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
153
|
+
await logger.logToStderr(chalk.green('DONE'));
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
async configureExistingEntraApp(logger) {
|
|
157
|
+
await logger.logToStderr('Please provide the details of the existing app registration.');
|
|
158
|
+
let clientCertificateFile;
|
|
159
|
+
let clientCertificateBase64Encoded;
|
|
160
|
+
let clientCertificatePassword;
|
|
161
|
+
const clientId = await cli.promptForInput({
|
|
162
|
+
message: 'Client ID:',
|
|
163
|
+
/* c8 ignore next */
|
|
164
|
+
validate: value => validation.isValidGuid(value) ? true : 'The specified value is not a valid GUID.'
|
|
165
|
+
});
|
|
166
|
+
const tenantId = await cli.promptForInput({
|
|
167
|
+
message: 'Tenant ID (leave common if the app is multitenant):',
|
|
168
|
+
default: 'common',
|
|
169
|
+
/* c8 ignore next */
|
|
170
|
+
validate: value => value === 'common' || validation.isValidGuid(value) ? true : `Tenant ID must be a valid GUID or 'common'.`
|
|
171
|
+
});
|
|
172
|
+
const clientSecret = await cli.promptForInput({
|
|
173
|
+
message: 'Client secret (leave empty if you use a certificate or a public client):'
|
|
174
|
+
});
|
|
175
|
+
if (!clientSecret) {
|
|
176
|
+
clientCertificateFile = await cli.promptForInput({
|
|
177
|
+
message: `Path to the client certificate file (leave empty if you want to specify a base64-encoded certificate string):`
|
|
178
|
+
});
|
|
179
|
+
if (!clientCertificateFile) {
|
|
180
|
+
clientCertificateBase64Encoded = await cli.promptForInput({
|
|
181
|
+
message: `Base64-encoded certificate string (leave empty if you don't connect using a certificate):`
|
|
182
|
+
});
|
|
183
|
+
}
|
|
184
|
+
if (clientCertificateFile || clientCertificateBase64Encoded) {
|
|
185
|
+
clientCertificatePassword = await cli.promptForInput({
|
|
186
|
+
message: 'Password for the client certificate (leave empty if the certificate is not password-protected):'
|
|
187
|
+
});
|
|
90
188
|
}
|
|
91
189
|
}
|
|
190
|
+
return {
|
|
191
|
+
clientId,
|
|
192
|
+
tenantId,
|
|
193
|
+
clientSecret,
|
|
194
|
+
clientCertificateFile,
|
|
195
|
+
clientCertificateBase64Encoded,
|
|
196
|
+
clientCertificatePassword
|
|
197
|
+
};
|
|
92
198
|
}
|
|
93
|
-
|
|
199
|
+
async createNewEntraApp(preferences, logger) {
|
|
200
|
+
if (!await cli.promptForConfirmation({
|
|
201
|
+
message: 'CLI for Microsoft 365 will now sign in to your Microsoft 365 tenant as Microsoft Azure CLI to create a new app registration. Continue?',
|
|
202
|
+
default: false
|
|
203
|
+
})) {
|
|
204
|
+
throw 'Cancelled';
|
|
205
|
+
}
|
|
206
|
+
// setup auth
|
|
207
|
+
auth.connection.authType = AuthType.Browser;
|
|
208
|
+
// Microsoft Azure CLI app ID
|
|
209
|
+
auth.connection.appId = '04b07795-8ddb-461a-bbee-02f9e1bf7b46';
|
|
210
|
+
auth.connection.tenant = 'common';
|
|
211
|
+
await auth.ensureAccessToken(auth.defaultResource, logger, this.debug);
|
|
212
|
+
auth.connection.active = true;
|
|
213
|
+
const options = {
|
|
214
|
+
allowPublicClientFlows: true,
|
|
215
|
+
apisDelegated: (preferences.newEntraAppScopes === NewEntraAppScopes.All ? config.allScopes : config.minimalScopes).join(','),
|
|
216
|
+
implicitFlow: false,
|
|
217
|
+
multitenant: false,
|
|
218
|
+
name: 'CLI for M365',
|
|
219
|
+
platform: 'publicClient',
|
|
220
|
+
redirectUris: 'http://localhost,https://localhost,https://login.microsoftonline.com/common/oauth2/nativeclient'
|
|
221
|
+
};
|
|
222
|
+
const apis = await entraApp.resolveApis({
|
|
223
|
+
options,
|
|
224
|
+
logger,
|
|
225
|
+
verbose: this.verbose,
|
|
226
|
+
debug: this.debug
|
|
227
|
+
});
|
|
228
|
+
const appInfo = await entraApp.createAppRegistration({
|
|
229
|
+
options,
|
|
230
|
+
apis,
|
|
231
|
+
logger,
|
|
232
|
+
verbose: this.verbose,
|
|
233
|
+
debug: this.debug
|
|
234
|
+
});
|
|
235
|
+
appInfo.tenantId = accessToken.getTenantIdFromAccessToken(auth.connection.accessTokens[auth.defaultResource].accessToken);
|
|
236
|
+
await entraApp.grantAdminConsent({
|
|
237
|
+
appInfo,
|
|
238
|
+
appPermissions: entraApp.appPermissions,
|
|
239
|
+
adminConsent: true,
|
|
240
|
+
logger,
|
|
241
|
+
debug: this.debug
|
|
242
|
+
});
|
|
243
|
+
return appInfo;
|
|
244
|
+
}
|
|
245
|
+
getSummaryMessage(preferences) {
|
|
94
246
|
const messageLines = [`Based on your preferences, we'll configure the following settings:`];
|
|
247
|
+
switch (preferences.entraApp) {
|
|
248
|
+
case EntraAppConfig.Create:
|
|
249
|
+
messageLines.push(`- Entra app: Create a new app registration with ${preferences.newEntraAppScopes} scopes`);
|
|
250
|
+
break;
|
|
251
|
+
case EntraAppConfig.UseExisting:
|
|
252
|
+
messageLines.push(`- Entra app: use existing`);
|
|
253
|
+
messageLines.push(` - Client ID: ${preferences.clientId}`);
|
|
254
|
+
messageLines.push(` - Tenant ID: ${preferences.tenantId}`);
|
|
255
|
+
if (preferences.clientSecret) {
|
|
256
|
+
messageLines.push(` - Client secret: ${preferences.clientSecret}`);
|
|
257
|
+
}
|
|
258
|
+
if (preferences.clientCertificateFile) {
|
|
259
|
+
messageLines.push(` - Client certificate file: ${preferences.clientCertificateFile}`);
|
|
260
|
+
}
|
|
261
|
+
if (preferences.clientCertificateBase64Encoded) {
|
|
262
|
+
messageLines.push(` - Client certificate base64-encoded: ${preferences.clientCertificateBase64Encoded}`);
|
|
263
|
+
}
|
|
264
|
+
if (preferences.clientCertificatePassword) {
|
|
265
|
+
messageLines.push(` - Client certificate password: ${preferences.clientCertificatePassword}`);
|
|
266
|
+
}
|
|
267
|
+
break;
|
|
268
|
+
case EntraAppConfig.Skip:
|
|
269
|
+
messageLines.push(`- Entra app: skip`);
|
|
270
|
+
break;
|
|
271
|
+
}
|
|
272
|
+
const settings = this.getSettings(preferences);
|
|
95
273
|
for (const [key, value] of Object.entries(settings)) {
|
|
96
274
|
messageLines.push(`- ${key}: ${value}`);
|
|
97
275
|
}
|
|
@@ -101,10 +279,10 @@ class SetupCommand extends AnonymousCommand {
|
|
|
101
279
|
getSettings(answers) {
|
|
102
280
|
const settings = {};
|
|
103
281
|
switch (answers.usageMode) {
|
|
104
|
-
case
|
|
282
|
+
case CliUsageMode.Interactively:
|
|
105
283
|
Object.assign(settings, interactivePreset);
|
|
106
284
|
break;
|
|
107
|
-
case
|
|
285
|
+
case CliUsageMode.Scripting:
|
|
108
286
|
Object.assign(settings, scriptingPreset);
|
|
109
287
|
break;
|
|
110
288
|
}
|
|
@@ -112,16 +290,60 @@ class SetupCommand extends AnonymousCommand {
|
|
|
112
290
|
Object.assign(settings, powerShellPreset);
|
|
113
291
|
}
|
|
114
292
|
switch (answers.experience) {
|
|
115
|
-
case
|
|
116
|
-
settings.helpMode =
|
|
293
|
+
case CliExperience.Beginner:
|
|
294
|
+
settings.helpMode = HelpMode.Full;
|
|
117
295
|
break;
|
|
118
|
-
case
|
|
119
|
-
settings.helpMode =
|
|
296
|
+
case CliExperience.Proficient:
|
|
297
|
+
settings.helpMode = HelpMode.Options;
|
|
298
|
+
break;
|
|
299
|
+
}
|
|
300
|
+
switch (answers.entraApp) {
|
|
301
|
+
case EntraAppConfig.Create:
|
|
302
|
+
settings.authType = 'browser';
|
|
303
|
+
break;
|
|
304
|
+
case EntraAppConfig.UseExisting:
|
|
305
|
+
if (answers.clientSecret) {
|
|
306
|
+
settings.authType = 'secret';
|
|
307
|
+
break;
|
|
308
|
+
}
|
|
309
|
+
if (answers.clientCertificateFile || answers.clientCertificateBase64Encoded) {
|
|
310
|
+
settings.authType = 'certificate';
|
|
311
|
+
break;
|
|
312
|
+
}
|
|
313
|
+
settings.authType = 'browser';
|
|
120
314
|
break;
|
|
121
315
|
}
|
|
122
316
|
return settings;
|
|
123
317
|
}
|
|
124
|
-
async configureSettings(settings, silent, logger) {
|
|
318
|
+
async configureSettings({ preferences, settings, silent, logger }) {
|
|
319
|
+
switch (preferences.entraApp) {
|
|
320
|
+
case EntraAppConfig.Create:
|
|
321
|
+
if (this.verbose) {
|
|
322
|
+
await logger.logToStderr('Creating a new Entra app...');
|
|
323
|
+
}
|
|
324
|
+
const appSettings = await this.createNewEntraApp(preferences, logger);
|
|
325
|
+
Object.assign(settings, {
|
|
326
|
+
clientId: appSettings.appId,
|
|
327
|
+
tenantId: appSettings.tenantId
|
|
328
|
+
});
|
|
329
|
+
cli.getConfig().delete(settingsNames.clientSecret);
|
|
330
|
+
cli.getConfig().delete(settingsNames.clientCertificateFile);
|
|
331
|
+
cli.getConfig().delete(settingsNames.clientCertificateBase64Encoded);
|
|
332
|
+
cli.getConfig().delete(settingsNames.clientCertificatePassword);
|
|
333
|
+
break;
|
|
334
|
+
case EntraAppConfig.UseExisting:
|
|
335
|
+
Object.assign(settings, {
|
|
336
|
+
clientId: preferences.clientId,
|
|
337
|
+
tenantId: preferences.tenantId,
|
|
338
|
+
clientSecret: preferences.clientSecret,
|
|
339
|
+
clientCertificateFile: preferences.clientCertificateFile,
|
|
340
|
+
clientCertificateBase64Encoded: preferences.clientCertificateBase64Encoded,
|
|
341
|
+
clientCertificatePassword: preferences.clientCertificatePassword
|
|
342
|
+
});
|
|
343
|
+
break;
|
|
344
|
+
case EntraAppConfig.Skip:
|
|
345
|
+
break;
|
|
346
|
+
}
|
|
125
347
|
if (this.debug) {
|
|
126
348
|
await logger.logToStderr('Configuring settings...');
|
|
127
349
|
await logger.logToStderr(JSON.stringify(settings, null, 2));
|
|
@@ -137,13 +359,14 @@ class SetupCommand extends AnonymousCommand {
|
|
|
137
359
|
_SetupCommand_instances = new WeakSet(), _SetupCommand_initTelemetry = function _SetupCommand_initTelemetry() {
|
|
138
360
|
this.telemetry.push((args) => {
|
|
139
361
|
const properties = {
|
|
140
|
-
interactive: args.options.interactive,
|
|
141
|
-
scripting: args.options.scripting
|
|
362
|
+
interactive: !!args.options.interactive,
|
|
363
|
+
scripting: !!args.options.scripting,
|
|
364
|
+
skipApp: !!args.options.skipApp
|
|
142
365
|
};
|
|
143
366
|
Object.assign(this.telemetryProperties, properties);
|
|
144
367
|
});
|
|
145
368
|
}, _SetupCommand_initOptions = function _SetupCommand_initOptions() {
|
|
146
|
-
this.options.unshift({ option: '--interactive' }, { option: '--scripting' });
|
|
369
|
+
this.options.unshift({ option: '--interactive' }, { option: '--scripting' }, { option: '--skipApp' });
|
|
147
370
|
}, _SetupCommand_initValidators = function _SetupCommand_initValidators() {
|
|
148
371
|
this.validators.push(async (args) => {
|
|
149
372
|
if (args.options.interactive && args.options.scripting) {
|
|
@@ -4,8 +4,7 @@ export const interactivePreset = {
|
|
|
4
4
|
output: 'text',
|
|
5
5
|
printErrorsAsPlainText: true,
|
|
6
6
|
prompt: true,
|
|
7
|
-
showHelpOnFailure: true
|
|
8
|
-
showSpinner: true
|
|
7
|
+
showHelpOnFailure: true
|
|
9
8
|
};
|
|
10
9
|
export const scriptingPreset = {
|
|
11
10
|
autoOpenLinksInBrowser: false,
|
|
@@ -13,8 +12,7 @@ export const scriptingPreset = {
|
|
|
13
12
|
output: 'json',
|
|
14
13
|
printErrorsAsPlainText: false,
|
|
15
14
|
prompt: false,
|
|
16
|
-
showHelpOnFailure: false
|
|
17
|
-
showSpinner: false
|
|
15
|
+
showHelpOnFailure: false
|
|
18
16
|
};
|
|
19
17
|
export const powerShellPreset = {
|
|
20
18
|
errorOutput: 'stdout'
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import auth, { AuthType } from '../../../Auth.js';
|
|
2
|
-
import commands from '../commands.js';
|
|
3
|
-
import Command, { CommandError } from '../../../Command.js';
|
|
4
1
|
import assert from 'assert';
|
|
2
|
+
import auth from '../../../Auth.js';
|
|
3
|
+
import Command, { CommandError } from '../../../Command.js';
|
|
4
|
+
import commands from '../commands.js';
|
|
5
5
|
class ConnectionListCommand extends Command {
|
|
6
6
|
get name() {
|
|
7
7
|
return commands.LIST;
|
|
@@ -19,7 +19,7 @@ class ConnectionListCommand extends Command {
|
|
|
19
19
|
return {
|
|
20
20
|
name: connection.name,
|
|
21
21
|
connectedAs: connection.identityName,
|
|
22
|
-
authType:
|
|
22
|
+
authType: connection.authType,
|
|
23
23
|
active: isCurrentConnection
|
|
24
24
|
};
|
|
25
25
|
}).sort((a, b) => {
|
|
@@ -7,7 +7,6 @@ var _EntraAdministrativeUnitAddCommand_instances, _EntraAdministrativeUnitAddCom
|
|
|
7
7
|
import request from "../../../../request.js";
|
|
8
8
|
import GraphCommand from "../../../base/GraphCommand.js";
|
|
9
9
|
import commands from "../../commands.js";
|
|
10
|
-
import aadCommands from "../../aadCommands.js";
|
|
11
10
|
class EntraAdministrativeUnitAddCommand extends GraphCommand {
|
|
12
11
|
get name() {
|
|
13
12
|
return commands.ADMINISTRATIVEUNIT_ADD;
|
|
@@ -15,9 +14,6 @@ class EntraAdministrativeUnitAddCommand extends GraphCommand {
|
|
|
15
14
|
get description() {
|
|
16
15
|
return 'Creates an administrative unit';
|
|
17
16
|
}
|
|
18
|
-
alias() {
|
|
19
|
-
return [aadCommands.ADMINISTRATIVEUNIT_ADD];
|
|
20
|
-
}
|
|
21
17
|
constructor() {
|
|
22
18
|
super();
|
|
23
19
|
_EntraAdministrativeUnitAddCommand_instances.add(this);
|
|
@@ -25,7 +21,6 @@ class EntraAdministrativeUnitAddCommand extends GraphCommand {
|
|
|
25
21
|
__classPrivateFieldGet(this, _EntraAdministrativeUnitAddCommand_instances, "m", _EntraAdministrativeUnitAddCommand_initOptions).call(this);
|
|
26
22
|
}
|
|
27
23
|
async commandAction(logger, args) {
|
|
28
|
-
await this.showDeprecationWarning(logger, aadCommands.ADMINISTRATIVEUNIT_ADD, commands.ADMINISTRATIVEUNIT_ADD);
|
|
29
24
|
const requestOptions = {
|
|
30
25
|
url: `${this.resource}/v1.0/directory/administrativeUnits`,
|
|
31
26
|
headers: {
|
|
@@ -9,7 +9,6 @@ import request from "../../../../request.js";
|
|
|
9
9
|
import GraphCommand from "../../../base/GraphCommand.js";
|
|
10
10
|
import commands from "../../commands.js";
|
|
11
11
|
import { entraAdministrativeUnit } from "../../../../utils/entraAdministrativeUnit.js";
|
|
12
|
-
import aadCommands from "../../aadCommands.js";
|
|
13
12
|
class EntraAdministrativeUnitGetCommand extends GraphCommand {
|
|
14
13
|
get name() {
|
|
15
14
|
return commands.ADMINISTRATIVEUNIT_GET;
|
|
@@ -17,9 +16,6 @@ class EntraAdministrativeUnitGetCommand extends GraphCommand {
|
|
|
17
16
|
get description() {
|
|
18
17
|
return 'Gets information about a specific administrative unit';
|
|
19
18
|
}
|
|
20
|
-
alias() {
|
|
21
|
-
return [aadCommands.ADMINISTRATIVEUNIT_GET];
|
|
22
|
-
}
|
|
23
19
|
constructor() {
|
|
24
20
|
super();
|
|
25
21
|
_EntraAdministrativeUnitGetCommand_instances.add(this);
|
|
@@ -30,7 +26,6 @@ class EntraAdministrativeUnitGetCommand extends GraphCommand {
|
|
|
30
26
|
__classPrivateFieldGet(this, _EntraAdministrativeUnitGetCommand_instances, "m", _EntraAdministrativeUnitGetCommand_initTypes).call(this);
|
|
31
27
|
}
|
|
32
28
|
async commandAction(logger, args) {
|
|
33
|
-
await this.showDeprecationWarning(logger, aadCommands.ADMINISTRATIVEUNIT_GET, commands.ADMINISTRATIVEUNIT_GET);
|
|
34
29
|
let administrativeUnit;
|
|
35
30
|
try {
|
|
36
31
|
if (args.options.id) {
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { odata } from '../../../../utils/odata.js';
|
|
2
2
|
import GraphCommand from '../../../base/GraphCommand.js';
|
|
3
3
|
import commands from '../../commands.js';
|
|
4
|
-
import aadCommands from '../../aadCommands.js';
|
|
5
4
|
class EntraAdministrativeUnitListCommand extends GraphCommand {
|
|
6
5
|
get name() {
|
|
7
6
|
return commands.ADMINISTRATIVEUNIT_LIST;
|
|
@@ -9,14 +8,10 @@ class EntraAdministrativeUnitListCommand extends GraphCommand {
|
|
|
9
8
|
get description() {
|
|
10
9
|
return 'Retrieves a list of administrative units';
|
|
11
10
|
}
|
|
12
|
-
alias() {
|
|
13
|
-
return [aadCommands.ADMINISTRATIVEUNIT_LIST];
|
|
14
|
-
}
|
|
15
11
|
defaultProperties() {
|
|
16
12
|
return ['id', 'displayName', 'visibility'];
|
|
17
13
|
}
|
|
18
14
|
async commandAction(logger) {
|
|
19
|
-
await this.showDeprecationWarning(logger, aadCommands.ADMINISTRATIVEUNIT_LIST, commands.ADMINISTRATIVEUNIT_LIST);
|
|
20
15
|
try {
|
|
21
16
|
const results = await odata.getAllItems(`${this.resource}/v1.0/directory/administrativeUnits`);
|
|
22
17
|
await logger.log(results);
|
|
@@ -12,7 +12,6 @@ import GraphCommand from "../../../base/GraphCommand.js";
|
|
|
12
12
|
import commands from "../../commands.js";
|
|
13
13
|
import request from "../../../../request.js";
|
|
14
14
|
import { entraDevice } from "../../../../utils/entraDevice.js";
|
|
15
|
-
import aadCommands from "../../aadCommands.js";
|
|
16
15
|
class EntraAdministrativeUnitMemberAddCommand extends GraphCommand {
|
|
17
16
|
get name() {
|
|
18
17
|
return commands.ADMINISTRATIVEUNIT_MEMBER_ADD;
|
|
@@ -20,9 +19,6 @@ class EntraAdministrativeUnitMemberAddCommand extends GraphCommand {
|
|
|
20
19
|
get description() {
|
|
21
20
|
return 'Adds a member (user, group, device) to an administrative unit';
|
|
22
21
|
}
|
|
23
|
-
alias() {
|
|
24
|
-
return [aadCommands.ADMINISTRATIVEUNIT_MEMBER_ADD];
|
|
25
|
-
}
|
|
26
22
|
constructor() {
|
|
27
23
|
super();
|
|
28
24
|
_EntraAdministrativeUnitMemberAddCommand_instances.add(this);
|
|
@@ -32,7 +28,6 @@ class EntraAdministrativeUnitMemberAddCommand extends GraphCommand {
|
|
|
32
28
|
__classPrivateFieldGet(this, _EntraAdministrativeUnitMemberAddCommand_instances, "m", _EntraAdministrativeUnitMemberAddCommand_initOptionSets).call(this);
|
|
33
29
|
}
|
|
34
30
|
async commandAction(logger, args) {
|
|
35
|
-
await this.showDeprecationWarning(logger, aadCommands.ADMINISTRATIVEUNIT_MEMBER_ADD, commands.ADMINISTRATIVEUNIT_MEMBER_ADD);
|
|
36
31
|
let administrativeUnitId = args.options.administrativeUnitId;
|
|
37
32
|
let memberType;
|
|
38
33
|
let memberId;
|
|
@@ -9,7 +9,6 @@ import commands from '../../commands.js';
|
|
|
9
9
|
import { validation } from '../../../../utils/validation.js';
|
|
10
10
|
import { entraAdministrativeUnit } from '../../../../utils/entraAdministrativeUnit.js';
|
|
11
11
|
import request from '../../../../request.js';
|
|
12
|
-
import aadCommands from '../../aadCommands.js';
|
|
13
12
|
class EntraAdministrativeUnitMemberGetCommand extends GraphCommand {
|
|
14
13
|
get name() {
|
|
15
14
|
return commands.ADMINISTRATIVEUNIT_MEMBER_GET;
|
|
@@ -17,9 +16,6 @@ class EntraAdministrativeUnitMemberGetCommand extends GraphCommand {
|
|
|
17
16
|
get description() {
|
|
18
17
|
return 'Retrieve a specific member (user, group, or device) of an administrative unit';
|
|
19
18
|
}
|
|
20
|
-
alias() {
|
|
21
|
-
return [aadCommands.ADMINISTRATIVEUNIT_MEMBER_GET];
|
|
22
|
-
}
|
|
23
19
|
constructor() {
|
|
24
20
|
super();
|
|
25
21
|
_EntraAdministrativeUnitMemberGetCommand_instances.add(this);
|
|
@@ -29,7 +25,6 @@ class EntraAdministrativeUnitMemberGetCommand extends GraphCommand {
|
|
|
29
25
|
__classPrivateFieldGet(this, _EntraAdministrativeUnitMemberGetCommand_instances, "m", _EntraAdministrativeUnitMemberGetCommand_initOptionSets).call(this);
|
|
30
26
|
}
|
|
31
27
|
async commandAction(logger, args) {
|
|
32
|
-
await this.showDeprecationWarning(logger, aadCommands.ADMINISTRATIVEUNIT_MEMBER_GET, commands.ADMINISTRATIVEUNIT_MEMBER_GET);
|
|
33
28
|
let administrativeUnitId = args.options.administrativeUnitId;
|
|
34
29
|
try {
|
|
35
30
|
if (args.options.administrativeUnitName) {
|
|
@@ -9,7 +9,6 @@ import GraphCommand from '../../../base/GraphCommand.js';
|
|
|
9
9
|
import commands from '../../commands.js';
|
|
10
10
|
import { entraAdministrativeUnit } from '../../../../utils/entraAdministrativeUnit.js';
|
|
11
11
|
import { validation } from '../../../../utils/validation.js';
|
|
12
|
-
import aadCommands from '../../aadCommands.js';
|
|
13
12
|
class EntraAdministrativeUnitMemberListCommand extends GraphCommand {
|
|
14
13
|
get name() {
|
|
15
14
|
return commands.ADMINISTRATIVEUNIT_MEMBER_LIST;
|
|
@@ -17,9 +16,6 @@ class EntraAdministrativeUnitMemberListCommand extends GraphCommand {
|
|
|
17
16
|
get description() {
|
|
18
17
|
return 'Retrieves members (users, groups, or devices) of an administrative unit.';
|
|
19
18
|
}
|
|
20
|
-
alias() {
|
|
21
|
-
return [aadCommands.ADMINISTRATIVEUNIT_MEMBER_LIST];
|
|
22
|
-
}
|
|
23
19
|
defaultProperties() {
|
|
24
20
|
return ['id', 'displayName'];
|
|
25
21
|
}
|
|
@@ -32,7 +28,6 @@ class EntraAdministrativeUnitMemberListCommand extends GraphCommand {
|
|
|
32
28
|
__classPrivateFieldGet(this, _EntraAdministrativeUnitMemberListCommand_instances, "m", _EntraAdministrativeUnitMemberListCommand_initOptionSets).call(this);
|
|
33
29
|
}
|
|
34
30
|
async commandAction(logger, args) {
|
|
35
|
-
await this.showDeprecationWarning(logger, aadCommands.ADMINISTRATIVEUNIT_MEMBER_LIST, commands.ADMINISTRATIVEUNIT_MEMBER_LIST);
|
|
36
31
|
let administrativeUnitId = args.options.administrativeUnitId;
|
|
37
32
|
try {
|
|
38
33
|
if (args.options.administrativeUnitName) {
|
|
@@ -10,7 +10,6 @@ import request from "../../../../request.js";
|
|
|
10
10
|
import GraphCommand from "../../../base/GraphCommand.js";
|
|
11
11
|
import commands from "../../commands.js";
|
|
12
12
|
import { cli } from "../../../../cli/cli.js";
|
|
13
|
-
import aadCommands from '../../aadCommands.js';
|
|
14
13
|
class EntraAdministrativeUnitRemoveCommand extends GraphCommand {
|
|
15
14
|
get name() {
|
|
16
15
|
return commands.ADMINISTRATIVEUNIT_REMOVE;
|
|
@@ -18,9 +17,6 @@ class EntraAdministrativeUnitRemoveCommand extends GraphCommand {
|
|
|
18
17
|
get description() {
|
|
19
18
|
return 'Removes an administrative unit';
|
|
20
19
|
}
|
|
21
|
-
alias() {
|
|
22
|
-
return [aadCommands.ADMINISTRATIVEUNIT_REMOVE];
|
|
23
|
-
}
|
|
24
20
|
constructor() {
|
|
25
21
|
super();
|
|
26
22
|
_EntraAdministrativeUnitRemoveCommand_instances.add(this);
|
|
@@ -31,7 +27,6 @@ class EntraAdministrativeUnitRemoveCommand extends GraphCommand {
|
|
|
31
27
|
__classPrivateFieldGet(this, _EntraAdministrativeUnitRemoveCommand_instances, "m", _EntraAdministrativeUnitRemoveCommand_initTypes).call(this);
|
|
32
28
|
}
|
|
33
29
|
async commandAction(logger, args) {
|
|
34
|
-
await this.showDeprecationWarning(logger, aadCommands.ADMINISTRATIVEUNIT_REMOVE, commands.ADMINISTRATIVEUNIT_REMOVE);
|
|
35
30
|
const removeAdministrativeUnit = async () => {
|
|
36
31
|
try {
|
|
37
32
|
let administrativeUnitId = args.options.id;
|