@pnp/cli-microsoft365 7.3.0-beta.6e32b20 → 7.3.0-beta.9479ed4
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/allCommands.json +1 -1
- package/allCommandsFull.json +1 -1
- package/dist/Auth.js +7 -5
- package/dist/Command.js +10 -13
- package/dist/api.js +2 -3
- package/dist/autocomplete.js +4 -6
- package/dist/chili/chili.js +1 -2
- package/dist/cli/cli.js +880 -0
- package/dist/index.js +2 -2
- package/dist/m365/aad/commands/administrativeunit/administrativeunit-member-add.js +137 -0
- package/dist/m365/aad/commands/administrativeunit/administrativeunit-member-get.js +112 -0
- package/dist/m365/aad/commands/administrativeunit/administrativeunit-member-list.js +138 -0
- package/dist/m365/aad/commands/administrativeunit/administrativeunit-remove.js +2 -2
- package/dist/m365/aad/commands/app/app-get.js +2 -2
- package/dist/m365/aad/commands/app/app-permission-add.js +237 -0
- package/dist/m365/aad/commands/app/app-remove.js +3 -3
- package/dist/m365/aad/commands/app/app-role-add.js +2 -2
- package/dist/m365/aad/commands/app/app-role-list.js +2 -2
- package/dist/m365/aad/commands/app/app-role-remove.js +4 -4
- package/dist/m365/aad/commands/app/app-set.js +2 -2
- package/dist/m365/aad/commands/approleassignment/approleassignment-add.js +2 -2
- package/dist/m365/aad/commands/approleassignment/approleassignment-remove.js +2 -2
- package/dist/m365/aad/commands/group/group-list.js +2 -2
- package/dist/m365/aad/commands/group/group-remove.js +2 -2
- package/dist/m365/aad/commands/groupsetting/groupsetting-remove.js +2 -2
- package/dist/m365/aad/commands/m365group/m365group-recyclebinitem-clear.js +2 -2
- package/dist/m365/aad/commands/m365group/m365group-recyclebinitem-remove.js +3 -3
- package/dist/m365/aad/commands/m365group/m365group-recyclebinitem-restore.js +2 -2
- package/dist/m365/aad/commands/m365group/m365group-remove.js +2 -2
- package/dist/m365/aad/commands/m365group/m365group-teamify.js +2 -2
- package/dist/m365/aad/commands/m365group/m365group-user-remove.js +2 -2
- package/dist/m365/aad/commands/oauth2grant/oauth2grant-remove.js +2 -2
- package/dist/m365/aad/commands/siteclassification/siteclassification-disable.js +2 -2
- package/dist/m365/aad/commands/sp/sp-add.js +2 -2
- package/dist/m365/aad/commands/sp/sp-get.js +2 -2
- package/dist/m365/aad/commands/user/user-get.js +2 -2
- package/dist/m365/aad/commands/user/user-license-remove.js +2 -2
- package/dist/m365/aad/commands/user/user-recyclebinitem-clear.js +2 -2
- package/dist/m365/aad/commands/user/user-recyclebinitem-remove.js +2 -2
- package/dist/m365/aad/commands/user/user-remove.js +2 -2
- package/dist/m365/aad/commands.js +5 -1
- package/dist/m365/app/commands/app-get.js +2 -2
- package/dist/m365/app/commands/app-open.js +2 -2
- package/dist/m365/app/commands/permission/permission-list.js +2 -2
- package/dist/m365/base/AppCommand.js +2 -2
- package/dist/m365/base/PowerAutomateCommand.js +18 -0
- package/dist/m365/booking/commands/business/business-get.js +2 -2
- package/dist/m365/cli/commands/cli-doctor.js +2 -2
- package/dist/m365/cli/commands/cli-reconsent.js +2 -2
- package/dist/m365/cli/commands/config/config-get.js +2 -2
- package/dist/m365/cli/commands/config/config-list.js +2 -2
- package/dist/m365/cli/commands/config/config-reset.js +3 -3
- package/dist/m365/cli/commands/config/config-set.js +4 -4
- package/dist/m365/commands/docs.js +2 -2
- package/dist/m365/commands/login.js +4 -4
- package/dist/m365/commands/setup.js +8 -8
- package/dist/m365/context/commands/context-remove.js +2 -2
- package/dist/m365/context/commands/option/option-remove.js +2 -2
- package/dist/m365/external/commands/connection/connection-doctor.js +1 -2
- package/dist/m365/external/commands/connection/connection-remove.js +3 -3
- package/dist/m365/external/commands/connection/connection-schema-add.js +36 -3
- package/dist/m365/flow/commands/environment/environment-get.js +3 -3
- package/dist/m365/flow/commands/environment/environment-list.js +3 -3
- package/dist/m365/flow/commands/flow-disable.js +3 -3
- package/dist/m365/flow/commands/flow-enable.js +3 -3
- package/dist/m365/flow/commands/flow-get.js +3 -3
- package/dist/m365/flow/commands/flow-list.js +14 -12
- package/dist/m365/flow/commands/flow-remove.js +5 -5
- package/dist/m365/flow/commands/owner/owner-ensure.js +3 -3
- package/dist/m365/flow/commands/owner/owner-list.js +5 -5
- package/dist/m365/flow/commands/owner/owner-remove.js +5 -5
- package/dist/m365/flow/commands/run/run-cancel.js +5 -5
- package/dist/m365/flow/commands/run/run-get.js +3 -3
- package/dist/m365/flow/commands/run/run-list.js +8 -7
- package/dist/m365/flow/commands/run/run-resubmit.js +6 -6
- package/dist/m365/graph/commands/changelog/changelog-list.js +3 -3
- package/dist/m365/graph/commands/schemaextension/schemaextension-remove.js +2 -2
- package/dist/m365/outlook/commands/message/message-list.js +2 -2
- package/dist/m365/outlook/commands/message/message-move.js +2 -2
- package/dist/m365/pa/commands/app/app-consent-set.js +2 -2
- package/dist/m365/pa/commands/app/app-get.js +2 -2
- package/dist/m365/pa/commands/app/app-permission-remove.js +2 -2
- package/dist/m365/pa/commands/app/app-remove.js +2 -2
- package/dist/m365/planner/commands/bucket/bucket-get.js +2 -2
- package/dist/m365/planner/commands/bucket/bucket-remove.js +3 -3
- package/dist/m365/planner/commands/bucket/bucket-set.js +2 -2
- package/dist/m365/planner/commands/plan/plan-remove.js +2 -2
- package/dist/m365/planner/commands/roster/roster-member-remove.js +3 -3
- package/dist/m365/planner/commands/roster/roster-remove.js +2 -2
- package/dist/m365/planner/commands/task/task-checklistitem-add.js +2 -2
- package/dist/m365/planner/commands/task/task-checklistitem-list.js +2 -2
- package/dist/m365/planner/commands/task/task-checklistitem-remove.js +2 -2
- package/dist/m365/planner/commands/task/task-get.js +3 -3
- package/dist/m365/planner/commands/task/task-reference-remove.js +2 -2
- package/dist/m365/planner/commands/task/task-remove.js +4 -4
- package/dist/m365/pp/commands/aibuildermodel/aibuildermodel-get.js +2 -2
- package/dist/m365/pp/commands/aibuildermodel/aibuildermodel-remove.js +3 -3
- package/dist/m365/pp/commands/card/card-clone.js +2 -2
- package/dist/m365/pp/commands/card/card-get.js +2 -2
- package/dist/m365/pp/commands/card/card-remove.js +3 -3
- package/dist/m365/pp/commands/chatbot/chatbot-get.js +2 -2
- package/dist/m365/pp/commands/chatbot/chatbot-remove.js +3 -3
- package/dist/m365/pp/commands/dataverse/dataverse-table-remove.js +2 -2
- package/dist/m365/pp/commands/dataverse/dataverse-table-row-remove.js +2 -2
- package/dist/m365/pp/commands/managementapp/managementapp-add.js +2 -2
- package/dist/m365/pp/commands/solution/solution-get.js +2 -2
- package/dist/m365/pp/commands/solution/solution-list.js +2 -2
- package/dist/m365/pp/commands/solution/solution-publish.js +2 -2
- package/dist/m365/pp/commands/solution/solution-publisher-remove.js +3 -3
- package/dist/m365/pp/commands/solution/solution-remove.js +3 -3
- package/dist/m365/purview/commands/retentionevent/retentionevent-remove.js +2 -2
- package/dist/m365/purview/commands/retentioneventtype/retentioneventtype-remove.js +2 -2
- package/dist/m365/purview/commands/retentionlabel/retentionlabel-remove.js +2 -2
- package/dist/m365/spfx/commands/project/project-permissions-grant.js +2 -2
- package/dist/m365/spo/commands/app/app-add.js +2 -2
- package/dist/m365/spo/commands/app/app-remove.js +2 -2
- package/dist/m365/spo/commands/app/app-retract.js +2 -2
- package/dist/m365/spo/commands/app/app-uninstall.js +2 -2
- package/dist/m365/spo/commands/applicationcustomizer/applicationcustomizer-get.js +2 -2
- package/dist/m365/spo/commands/applicationcustomizer/applicationcustomizer-remove.js +3 -3
- package/dist/m365/spo/commands/applicationcustomizer/applicationcustomizer-set.js +2 -2
- package/dist/m365/spo/commands/cdn/cdn-origin-remove.js +2 -2
- package/dist/m365/spo/commands/commandset/commandset-get.js +2 -2
- package/dist/m365/spo/commands/commandset/commandset-remove.js +3 -3
- package/dist/m365/spo/commands/commandset/commandset-set.js +2 -2
- package/dist/m365/spo/commands/contenttype/contenttype-add.js +2 -2
- package/dist/m365/spo/commands/contenttype/contenttype-field-remove.js +2 -2
- package/dist/m365/spo/commands/contenttype/contenttype-remove.js +2 -2
- package/dist/m365/spo/commands/customaction/customaction-add.js +1 -1
- package/dist/m365/spo/commands/customaction/customaction-clear.js +2 -2
- package/dist/m365/spo/commands/customaction/customaction-get.js +3 -3
- package/dist/m365/spo/commands/customaction/customaction-remove.js +3 -3
- package/dist/m365/spo/commands/eventreceiver/eventreceiver-get.js +2 -2
- package/dist/m365/spo/commands/eventreceiver/eventreceiver-remove.js +3 -3
- package/dist/m365/spo/commands/field/field-remove.js +2 -2
- package/dist/m365/spo/commands/file/file-add.js +1 -1
- package/dist/m365/spo/commands/file/file-checkout-undo.js +2 -2
- package/dist/m365/spo/commands/file/file-remove.js +2 -2
- package/dist/m365/spo/commands/file/file-rename.js +2 -2
- package/dist/m365/spo/commands/file/file-retentionlabel-remove.js +2 -2
- package/dist/m365/spo/commands/file/file-roleassignment-add.js +5 -5
- package/dist/m365/spo/commands/file/file-roleassignment-remove.js +5 -5
- package/dist/m365/spo/commands/file/file-roleinheritance-break.js +3 -3
- package/dist/m365/spo/commands/file/file-roleinheritance-reset.js +3 -3
- package/dist/m365/spo/commands/file/file-sharinginfo-get.js +2 -2
- package/dist/m365/spo/commands/file/file-sharinglink-clear.js +3 -3
- package/dist/m365/spo/commands/file/file-sharinglink-list.js +2 -2
- package/dist/m365/spo/commands/file/file-sharinglink-remove.js +2 -2
- package/dist/m365/spo/commands/file/file-version-clear.js +2 -2
- package/dist/m365/spo/commands/file/file-version-remove.js +2 -2
- package/dist/m365/spo/commands/file/file-version-restore.js +2 -2
- package/dist/m365/spo/commands/folder/folder-remove.js +2 -2
- package/dist/m365/spo/commands/folder/folder-retentionlabel-remove.js +2 -2
- package/dist/m365/spo/commands/folder/folder-roleassignment-add.js +4 -4
- package/dist/m365/spo/commands/folder/folder-roleassignment-remove.js +4 -4
- package/dist/m365/spo/commands/folder/folder-roleinheritance-break.js +2 -2
- package/dist/m365/spo/commands/folder/folder-roleinheritance-reset.js +2 -2
- package/dist/m365/spo/commands/group/group-list.js +2 -2
- package/dist/m365/spo/commands/group/group-member-remove.js +9 -9
- package/dist/m365/spo/commands/group/group-remove.js +2 -2
- package/dist/m365/spo/commands/group/group-set.js +2 -2
- package/dist/m365/spo/commands/homesite/homesite-remove.js +2 -2
- package/dist/m365/spo/commands/hubsite/hubsite-connect.js +2 -2
- package/dist/m365/spo/commands/hubsite/hubsite-disconnect.js +3 -3
- package/dist/m365/spo/commands/hubsite/hubsite-get.js +4 -4
- package/dist/m365/spo/commands/hubsite/hubsite-rights-revoke.js +2 -2
- package/dist/m365/spo/commands/hubsite/hubsite-unregister.js +2 -2
- package/dist/m365/spo/commands/knowledgehub/knowledgehub-remove.js +2 -2
- package/dist/m365/spo/commands/list/list-contenttype-remove.js +2 -2
- package/dist/m365/spo/commands/list/list-remove.js +2 -2
- package/dist/m365/spo/commands/list/list-retentionlabel-remove.js +2 -2
- package/dist/m365/spo/commands/list/list-roleassignment-remove.js +4 -4
- package/dist/m365/spo/commands/list/list-roleinheritance-break.js +2 -2
- package/dist/m365/spo/commands/list/list-roleinheritance-reset.js +2 -2
- package/dist/m365/spo/commands/list/list-view-field-remove.js +2 -2
- package/dist/m365/spo/commands/list/list-view-remove.js +2 -2
- package/dist/m365/spo/commands/list/list-webhook-remove.js +2 -2
- package/dist/m365/spo/commands/listitem/listitem-attachment-remove.js +2 -2
- package/dist/m365/spo/commands/listitem/listitem-batch-add.js +18 -7
- package/dist/m365/spo/commands/listitem/listitem-list.js +2 -2
- package/dist/m365/spo/commands/listitem/listitem-remove.js +2 -2
- package/dist/m365/spo/commands/listitem/listitem-retentionlabel-remove.js +2 -2
- package/dist/m365/spo/commands/listitem/listitem-roleassignment-add.js +4 -4
- package/dist/m365/spo/commands/listitem/listitem-roleassignment-remove.js +4 -4
- package/dist/m365/spo/commands/listitem/listitem-roleinheritance-break.js +2 -2
- package/dist/m365/spo/commands/listitem/listitem-roleinheritance-reset.js +2 -2
- package/dist/m365/spo/commands/navigation/navigation-node-remove.js +2 -2
- package/dist/m365/spo/commands/orgassetslibrary/orgassetslibrary-remove.js +2 -2
- package/dist/m365/spo/commands/orgnewssite/orgnewssite-remove.js +2 -2
- package/dist/m365/spo/commands/page/page-add.js +10 -31
- package/dist/m365/spo/commands/page/page-column-get.js +2 -2
- package/dist/m365/spo/commands/page/page-column-list.js +2 -2
- package/dist/m365/spo/commands/page/page-remove.js +2 -2
- package/dist/m365/spo/commands/page/page-section-get.js +2 -2
- package/dist/m365/spo/commands/page/page-section-list.js +2 -2
- package/dist/m365/spo/commands/page/page-set.js +5 -5
- package/dist/m365/spo/commands/propertybag/propertybag-remove.js +2 -2
- package/dist/m365/spo/commands/roledefinition/roledefinition-remove.js +2 -2
- package/dist/m365/spo/commands/serviceprincipal/serviceprincipal-permissionrequest-approve.js +2 -2
- package/dist/m365/spo/commands/serviceprincipal/serviceprincipal-set.js +2 -2
- package/dist/m365/spo/commands/site/site-apppermission-remove.js +2 -2
- package/dist/m365/spo/commands/site/site-hubsite-disconnect.js +2 -2
- package/dist/m365/spo/commands/site/site-recyclebinitem-clear.js +2 -2
- package/dist/m365/spo/commands/site/site-recyclebinitem-move.js +2 -2
- package/dist/m365/spo/commands/site/site-recyclebinitem-remove.js +2 -2
- package/dist/m365/spo/commands/site/site-remove.js +2 -2
- package/dist/m365/spo/commands/site/site-set.js +3 -3
- package/dist/m365/spo/commands/sitedesign/sitedesign-get.js +2 -2
- package/dist/m365/spo/commands/sitedesign/sitedesign-remove.js +2 -2
- package/dist/m365/spo/commands/sitedesign/sitedesign-rights-revoke.js +2 -2
- package/dist/m365/spo/commands/sitedesign/sitedesign-task-remove.js +2 -2
- package/dist/m365/spo/commands/sitescript/sitescript-remove.js +2 -2
- package/dist/m365/spo/commands/spo-search.js +2 -2
- package/dist/m365/spo/commands/storageentity/storageentity-remove.js +2 -2
- package/dist/m365/spo/commands/tenant/tenant-appcatalog-add.js +5 -5
- package/dist/m365/spo/commands/tenant/tenant-applicationcustomizer-add.js +5 -5
- package/dist/m365/spo/commands/tenant/tenant-applicationcustomizer-get.js +2 -2
- package/dist/m365/spo/commands/tenant/tenant-applicationcustomizer-remove.js +3 -3
- package/dist/m365/spo/commands/tenant/tenant-applicationcustomizer-set.js +4 -4
- package/dist/m365/spo/commands/tenant/tenant-commandset-add.js +5 -5
- package/dist/m365/spo/commands/tenant/tenant-commandset-get.js +2 -2
- package/dist/m365/spo/commands/tenant/tenant-commandset-remove.js +3 -3
- package/dist/m365/spo/commands/tenant/tenant-recyclebinitem-remove.js +2 -2
- package/dist/m365/spo/commands/term/term-get.js +2 -2
- package/dist/m365/spo/commands/term/term-list.js +2 -2
- package/dist/m365/spo/commands/theme/theme-remove.js +2 -2
- package/dist/m365/spo/commands/user/user-remove.js +2 -2
- package/dist/m365/spo/commands/userprofile/userprofile-get.js +2 -2
- package/dist/m365/spo/commands/web/web-remove.js +2 -2
- package/dist/m365/spo/commands/web/web-roleassignment-add.js +4 -4
- package/dist/m365/spo/commands/web/web-roleassignment-remove.js +4 -4
- package/dist/m365/spo/commands/web/web-roleinheritance-break.js +2 -2
- package/dist/m365/spo/commands/web/web-roleinheritance-reset.js +2 -2
- package/dist/m365/teams/commands/app/app-install.js +32 -5
- package/dist/m365/teams/commands/app/app-remove.js +3 -3
- package/dist/m365/teams/commands/app/app-uninstall.js +2 -2
- package/dist/m365/teams/commands/app/app-update.js +2 -2
- package/dist/m365/teams/commands/cache/cache-remove.js +2 -2
- package/dist/m365/teams/commands/channel/channel-add.js +2 -2
- package/dist/m365/teams/commands/channel/channel-member-add.js +2 -2
- package/dist/m365/teams/commands/channel/channel-member-remove.js +3 -3
- package/dist/m365/teams/commands/channel/channel-member-set.js +2 -2
- package/dist/m365/teams/commands/channel/channel-remove.js +2 -2
- package/dist/m365/teams/commands/chat/chat-get.js +3 -3
- package/dist/m365/teams/commands/chat/chat-member-remove.js +2 -2
- package/dist/m365/teams/commands/chat/chat-message-send.js +3 -3
- package/dist/m365/teams/commands/meeting/meeting-attendancereport-list.js +2 -2
- package/dist/m365/teams/commands/tab/tab-remove.js +2 -2
- package/dist/m365/teams/commands/team/team-app-list.js +3 -3
- package/dist/m365/teams/commands/team/team-remove.js +2 -2
- package/dist/m365/teams/commands/user/user-app-add.js +23 -5
- package/dist/m365/teams/commands/user/user-app-list.js +2 -2
- package/dist/m365/teams/commands/user/user-app-remove.js +3 -3
- package/dist/m365/tenant/commands/people/people-profilecardproperty-remove.js +2 -2
- package/dist/m365/todo/commands/list/list-remove.js +2 -2
- package/dist/m365/todo/commands/task/task-get.js +2 -2
- package/dist/m365/todo/commands/task/task-list.js +2 -2
- package/dist/m365/todo/commands/task/task-remove.js +2 -2
- package/dist/m365/viva/commands/connections/connections-app-create.js +2 -2
- package/dist/m365/yammer/commands/group/group-user-remove.js +2 -2
- package/dist/m365/yammer/commands/message/message-like-set.js +2 -2
- package/dist/m365/yammer/commands/message/message-remove.js +2 -2
- package/dist/m365/yammer/commands/yammer-search.js +2 -2
- package/dist/telemetry.js +2 -2
- package/dist/utils/aadAdministrativeUnit.js +5 -5
- package/dist/utils/aadDevice.js +25 -0
- package/dist/utils/aadGroup.js +3 -3
- package/dist/utils/prompt.js +4 -7
- package/docs/docs/cmd/aad/administrativeunit/administrativeunit-member-add.mdx +93 -0
- package/docs/docs/cmd/aad/administrativeunit/administrativeunit-member-get.mdx +130 -0
- package/docs/docs/cmd/aad/administrativeunit/administrativeunit-member-list.mdx +312 -0
- package/docs/docs/cmd/aad/app/app-permission-add.mdx +62 -0
- package/docs/docs/cmd/aad/user/user-password-validate.mdx +2 -2
- package/docs/docs/cmd/adaptivecard/adaptivecard-send.mdx +1 -1
- package/docs/docs/cmd/external/connection/connection-doctor.mdx +3 -0
- package/docs/docs/cmd/external/connection/connection-schema-add.mdx +14 -1
- package/docs/docs/cmd/flow/environment/environment-get.mdx +1 -1
- package/docs/docs/cmd/flow/environment/environment-list.mdx +1 -1
- package/docs/docs/cmd/flow/flow-disable.mdx +1 -1
- package/docs/docs/cmd/flow/flow-enable.mdx +1 -1
- package/docs/docs/cmd/flow/flow-export.mdx +1 -1
- package/docs/docs/cmd/flow/flow-get.mdx +1 -1
- package/docs/docs/cmd/flow/flow-list.mdx +1 -1
- package/docs/docs/cmd/flow/run/run-cancel.mdx +1 -1
- package/docs/docs/cmd/flow/run/run-get.mdx +1 -1
- package/docs/docs/cmd/flow/run/run-list.mdx +1 -1
- package/docs/docs/cmd/flow/run/run-resubmit.mdx +1 -1
- package/docs/docs/cmd/graph/changelog/changelog-list.mdx +1 -1
- package/docs/docs/cmd/graph/schemaextension/schemaextension-add.mdx +1 -1
- package/docs/docs/cmd/graph/schemaextension/schemaextension-set.mdx +1 -1
- package/docs/docs/cmd/pa/app/app-get.mdx +1 -1
- package/docs/docs/cmd/pa/app/app-list.mdx +1 -1
- package/docs/docs/cmd/pa/connector/connector-export.mdx +1 -1
- package/docs/docs/cmd/pa/connector/connector-list.mdx +1 -1
- package/docs/docs/cmd/pa/environment/environment-get.mdx +1 -1
- package/docs/docs/cmd/pa/environment/environment-list.mdx +1 -1
- package/docs/docs/cmd/planner/bucket/bucket-add.mdx +1 -1
- package/docs/docs/cmd/planner/bucket/bucket-get.mdx +1 -1
- package/docs/docs/cmd/planner/bucket/bucket-list.mdx +1 -1
- package/docs/docs/cmd/planner/bucket/bucket-remove.mdx +1 -1
- package/docs/docs/cmd/planner/bucket/bucket-set.mdx +1 -1
- package/docs/docs/cmd/planner/plan/plan-get.mdx +1 -1
- package/docs/docs/cmd/planner/plan/plan-list.mdx +1 -1
- package/docs/docs/cmd/planner/plan/plan-set.mdx +1 -1
- package/docs/docs/cmd/planner/roster/roster-add.mdx +2 -2
- package/docs/docs/cmd/planner/roster/roster-get.mdx +1 -1
- package/docs/docs/cmd/planner/roster/roster-member-add.mdx +1 -1
- package/docs/docs/cmd/planner/roster/roster-member-get.mdx +1 -1
- package/docs/docs/cmd/planner/roster/roster-member-list.mdx +1 -1
- package/docs/docs/cmd/planner/roster/roster-member-remove.mdx +2 -2
- package/docs/docs/cmd/planner/roster/roster-plan-list.mdx +1 -1
- package/docs/docs/cmd/planner/roster/roster-remove.mdx +2 -2
- package/docs/docs/cmd/planner/task/task-add.mdx +1 -1
- package/docs/docs/cmd/planner/task/task-list.mdx +2 -2
- package/docs/docs/cmd/planner/task/task-remove.mdx +1 -1
- package/docs/docs/cmd/planner/task/task-set.mdx +1 -1
- package/docs/docs/cmd/pp/environment/environment-get.mdx +1 -1
- package/docs/docs/cmd/pp/environment/environment-list.mdx +1 -1
- package/docs/docs/cmd/pp/tenant/tenant-settings-list.mdx +1 -1
- package/docs/docs/cmd/pp/tenant/tenant-settings-set.mdx +1 -1
- package/docs/docs/cmd/purview/retentionevent/retentionevent-add.mdx +1 -1
- package/docs/docs/cmd/purview/retentionevent/retentionevent-get.mdx +1 -1
- package/docs/docs/cmd/purview/retentionevent/retentionevent-list.mdx +1 -1
- package/docs/docs/cmd/purview/retentionevent/retentionevent-remove.mdx +1 -1
- package/docs/docs/cmd/purview/retentioneventtype/retentioneventtype-add.mdx +1 -1
- package/docs/docs/cmd/purview/retentioneventtype/retentioneventtype-get.mdx +1 -1
- package/docs/docs/cmd/purview/retentioneventtype/retentioneventtype-list.mdx +1 -1
- package/docs/docs/cmd/purview/retentioneventtype/retentioneventtype-remove.mdx +1 -1
- package/docs/docs/cmd/purview/retentioneventtype/retentioneventtype-set.mdx +1 -1
- package/docs/docs/cmd/purview/retentionlabel/retentionlabel-add.mdx +1 -1
- package/docs/docs/cmd/purview/retentionlabel/retentionlabel-get.mdx +1 -1
- package/docs/docs/cmd/purview/retentionlabel/retentionlabel-list.mdx +1 -1
- package/docs/docs/cmd/purview/retentionlabel/retentionlabel-remove.mdx +1 -1
- package/docs/docs/cmd/purview/retentionlabel/retentionlabel-set.mdx +1 -1
- package/docs/docs/cmd/purview/sensitivitylabel/sensitivitylabel-get.mdx +2 -2
- package/docs/docs/cmd/purview/sensitivitylabel/sensitivitylabel-list.mdx +2 -2
- package/docs/docs/cmd/purview/sensitivitylabel/sensitivitylabel-policysettings-list.mdx +2 -2
- package/docs/docs/cmd/spfx/project/project-externalize.mdx +1 -1
- package/docs/docs/cmd/spo/applicationcustomizer/applicationcustomizer-add.mdx +1 -1
- package/docs/docs/cmd/spo/applicationcustomizer/applicationcustomizer-set.mdx +1 -1
- package/docs/docs/cmd/spo/commandset/commandset-add.mdx +1 -1
- package/docs/docs/cmd/spo/commandset/commandset-set.mdx +1 -1
- package/docs/docs/cmd/spo/contenttype/contenttype-set.mdx +1 -1
- package/docs/docs/cmd/spo/customaction/customaction-add.mdx +1 -1
- package/docs/docs/cmd/spo/customaction/customaction-set.mdx +1 -1
- package/docs/docs/cmd/spo/eventreceiver/eventreceiver-remove.mdx +1 -1
- package/docs/docs/cmd/spo/field/field-set.mdx +1 -1
- package/docs/docs/cmd/spo/list/list-sensitivitylabel-ensure.mdx +1 -1
- package/docs/docs/cmd/spo/list/list-view-set.mdx +1 -1
- package/docs/docs/cmd/spo/listitem/listitem-add.mdx +1 -1
- package/docs/docs/cmd/spo/listitem/listitem-batch-add.mdx +26 -4
- package/docs/docs/cmd/spo/listitem/listitem-set.mdx +1 -1
- package/docs/docs/cmd/spo/page/page-clientsidewebpart-add.mdx +1 -1
- package/docs/docs/cmd/spo/page/page-control-set.mdx +1 -1
- package/docs/docs/cmd/spo/page/page-set.mdx +1 -1
- package/docs/docs/cmd/spo/site/site-groupify.mdx +1 -1
- package/docs/docs/cmd/spo/site/site-recyclebinitem-clear.mdx +1 -1
- package/docs/docs/cmd/spo/site/site-recyclebinitem-remove.mdx +1 -1
- package/docs/docs/cmd/spo/tenant/tenant-applicationcustomizer-add.mdx +1 -1
- package/docs/docs/cmd/spo/tenant/tenant-applicationcustomizer-set.mdx +1 -1
- package/docs/docs/cmd/spo/tenant/tenant-commandset-add.mdx +1 -1
- package/docs/docs/cmd/spo/tenant/tenant-commandset-set.mdx +1 -1
- package/docs/docs/cmd/spo/term/term-add.mdx +1 -1
- package/docs/docs/cmd/spo/term/term-group-add.mdx +1 -1
- package/docs/docs/cmd/spo/term/term-set-add.mdx +1 -1
- package/docs/docs/cmd/teams/app/app-install.mdx +11 -2
- package/docs/docs/cmd/teams/meeting/meeting-transcript-list.mdx +2 -2
- package/docs/docs/cmd/teams/user/user-app-add.mdx +12 -3
- package/docs/docs/cmd/teams/user/user-app-remove.mdx +2 -2
- package/docs/docs/cmd/tenant/people/people-profilecardproperty-add.mdx +1 -1
- package/docs/docs/cmd/tenant/people/people-profilecardproperty-remove.mdx +1 -1
- package/docs/docs/cmd/tenant/people/people-profilecardproperty-set.mdx +1 -1
- package/docs/docs/cmd/yammer/group/group-list.mdx +1 -1
- package/docs/docs/cmd/yammer/group/group-user-add.mdx +1 -1
- package/docs/docs/cmd/yammer/group/group-user-remove.mdx +1 -1
- package/docs/docs/cmd/yammer/message/message-add.mdx +1 -1
- package/docs/docs/cmd/yammer/message/message-get.mdx +1 -1
- package/docs/docs/cmd/yammer/message/message-like-set.mdx +1 -1
- package/docs/docs/cmd/yammer/message/message-list.mdx +1 -1
- package/docs/docs/cmd/yammer/message/message-remove.mdx +1 -1
- package/docs/docs/cmd/yammer/network/network-list.mdx +1 -1
- package/docs/docs/cmd/yammer/user/user-get.mdx +1 -1
- package/docs/docs/cmd/yammer/user/user-list.mdx +1 -1
- package/docs/docs/cmd/yammer/yammer-search.mdx +1 -1
- package/npm-shrinkwrap.json +1008 -406
- package/package.json +25 -24
- package/dist/cli/Cli.js +0 -858
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import {
|
|
2
|
+
import { cli } from './cli/cli.js';
|
|
3
3
|
import { app } from './utils/app.js';
|
|
4
4
|
// required to make console.log() in combination with piped output synchronous
|
|
5
5
|
// on Windows/in PowerShell so that the output is not trimmed by calling
|
|
@@ -13,5 +13,5 @@ if (!process.env.CLIMICROSOFT365_NOUPDATE) {
|
|
|
13
13
|
updateNotifier.default({ pkg: app.packageJson() }).notify({ defer: false });
|
|
14
14
|
});
|
|
15
15
|
}
|
|
16
|
-
|
|
16
|
+
cli.execute(process.argv.slice(2));
|
|
17
17
|
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
2
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
3
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
4
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
5
|
+
};
|
|
6
|
+
var _AadAdministrativeUnitMemberAddCommand_instances, _AadAdministrativeUnitMemberAddCommand_initTelemetry, _AadAdministrativeUnitMemberAddCommand_initOptions, _AadAdministrativeUnitMemberAddCommand_initValidators, _AadAdministrativeUnitMemberAddCommand_initOptionSets;
|
|
7
|
+
import { aadAdministrativeUnit } from "../../../../utils/aadAdministrativeUnit.js";
|
|
8
|
+
import { aadGroup } from "../../../../utils/aadGroup.js";
|
|
9
|
+
import { aadUser } from "../../../../utils/aadUser.js";
|
|
10
|
+
import { validation } from "../../../../utils/validation.js";
|
|
11
|
+
import GraphCommand from "../../../base/GraphCommand.js";
|
|
12
|
+
import commands from "../../commands.js";
|
|
13
|
+
import request from "../../../../request.js";
|
|
14
|
+
import { aadDevice } from "../../../../utils/aadDevice.js";
|
|
15
|
+
class AadAdministrativeUnitMemberAddCommand extends GraphCommand {
|
|
16
|
+
get name() {
|
|
17
|
+
return commands.ADMINISTRATIVEUNIT_MEMBER_ADD;
|
|
18
|
+
}
|
|
19
|
+
get description() {
|
|
20
|
+
return 'Adds a member (user, group, device) to an administrative unit';
|
|
21
|
+
}
|
|
22
|
+
constructor() {
|
|
23
|
+
super();
|
|
24
|
+
_AadAdministrativeUnitMemberAddCommand_instances.add(this);
|
|
25
|
+
__classPrivateFieldGet(this, _AadAdministrativeUnitMemberAddCommand_instances, "m", _AadAdministrativeUnitMemberAddCommand_initTelemetry).call(this);
|
|
26
|
+
__classPrivateFieldGet(this, _AadAdministrativeUnitMemberAddCommand_instances, "m", _AadAdministrativeUnitMemberAddCommand_initOptions).call(this);
|
|
27
|
+
__classPrivateFieldGet(this, _AadAdministrativeUnitMemberAddCommand_instances, "m", _AadAdministrativeUnitMemberAddCommand_initValidators).call(this);
|
|
28
|
+
__classPrivateFieldGet(this, _AadAdministrativeUnitMemberAddCommand_instances, "m", _AadAdministrativeUnitMemberAddCommand_initOptionSets).call(this);
|
|
29
|
+
}
|
|
30
|
+
async commandAction(logger, args) {
|
|
31
|
+
let administrativeUnitId = args.options.administrativeUnitId;
|
|
32
|
+
let memberType;
|
|
33
|
+
let memberId;
|
|
34
|
+
try {
|
|
35
|
+
if (args.options.administrativeUnitName) {
|
|
36
|
+
if (this.verbose) {
|
|
37
|
+
await logger.logToStderr(`Retrieving Administrative Unit Id...`);
|
|
38
|
+
}
|
|
39
|
+
administrativeUnitId = (await aadAdministrativeUnit.getAdministrativeUnitByDisplayName(args.options.administrativeUnitName)).id;
|
|
40
|
+
}
|
|
41
|
+
if (args.options.userId || args.options.userName) {
|
|
42
|
+
memberType = 'users';
|
|
43
|
+
memberId = args.options.userId;
|
|
44
|
+
if (args.options.userName) {
|
|
45
|
+
if (this.verbose) {
|
|
46
|
+
await logger.logToStderr(`Retrieving User Id...`);
|
|
47
|
+
}
|
|
48
|
+
memberId = await aadUser.getUserIdByUpn(args.options.userName);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
else if (args.options.groupId || args.options.groupName) {
|
|
52
|
+
memberType = 'groups';
|
|
53
|
+
memberId = args.options.groupId;
|
|
54
|
+
if (args.options.groupName) {
|
|
55
|
+
if (this.verbose) {
|
|
56
|
+
await logger.logToStderr(`Retrieving Group Id...`);
|
|
57
|
+
}
|
|
58
|
+
memberId = await aadGroup.getGroupIdByDisplayName(args.options.groupName);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
else if (args.options.deviceId || args.options.deviceName) {
|
|
62
|
+
memberType = 'devices';
|
|
63
|
+
memberId = args.options.deviceId;
|
|
64
|
+
if (args.options.deviceName) {
|
|
65
|
+
if (this.verbose) {
|
|
66
|
+
await logger.logToStderr(`Device with name ${args.options.deviceName} retrieved, returned id: ${memberId}`);
|
|
67
|
+
}
|
|
68
|
+
memberId = (await aadDevice.getDeviceByDisplayName(args.options.deviceName)).id;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
const requestOptions = {
|
|
72
|
+
url: `${this.resource}/v1.0/directory/administrativeUnits/${administrativeUnitId}/members/$ref`,
|
|
73
|
+
headers: {
|
|
74
|
+
'accept': 'application/json;odata.metadata=none'
|
|
75
|
+
},
|
|
76
|
+
data: {
|
|
77
|
+
"@odata.id": `https://graph.microsoft.com/v1.0/${memberType}/${memberId}`
|
|
78
|
+
}
|
|
79
|
+
};
|
|
80
|
+
await request.post(requestOptions);
|
|
81
|
+
}
|
|
82
|
+
catch (err) {
|
|
83
|
+
this.handleRejectedODataJsonPromise(err);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
_AadAdministrativeUnitMemberAddCommand_instances = new WeakSet(), _AadAdministrativeUnitMemberAddCommand_initTelemetry = function _AadAdministrativeUnitMemberAddCommand_initTelemetry() {
|
|
88
|
+
this.telemetry.push((args) => {
|
|
89
|
+
Object.assign(this.telemetryProperties, {
|
|
90
|
+
userId: typeof args.options.userId !== 'undefined',
|
|
91
|
+
userName: typeof args.options.userName !== 'undefined',
|
|
92
|
+
groupId: typeof args.options.groupId !== 'undefined',
|
|
93
|
+
groupName: typeof args.options.groupName !== 'undefined',
|
|
94
|
+
deviceId: typeof args.options.deviceId !== 'undefined',
|
|
95
|
+
deviceName: typeof args.options.deviceName !== 'undefined'
|
|
96
|
+
});
|
|
97
|
+
});
|
|
98
|
+
}, _AadAdministrativeUnitMemberAddCommand_initOptions = function _AadAdministrativeUnitMemberAddCommand_initOptions() {
|
|
99
|
+
this.options.unshift({
|
|
100
|
+
option: '-i, --administrativeUnitId [administrativeUnitId]'
|
|
101
|
+
}, {
|
|
102
|
+
option: '-n, --administrativeUnitName [administrativeUnitName]'
|
|
103
|
+
}, {
|
|
104
|
+
option: "--userId [userId]"
|
|
105
|
+
}, {
|
|
106
|
+
option: "--userName [userName]"
|
|
107
|
+
}, {
|
|
108
|
+
option: "--groupId [groupId]"
|
|
109
|
+
}, {
|
|
110
|
+
option: "--groupName [groupName]"
|
|
111
|
+
}, {
|
|
112
|
+
option: "--deviceId [deviceId]"
|
|
113
|
+
}, {
|
|
114
|
+
option: "--deviceName [deviceName]"
|
|
115
|
+
});
|
|
116
|
+
}, _AadAdministrativeUnitMemberAddCommand_initValidators = function _AadAdministrativeUnitMemberAddCommand_initValidators() {
|
|
117
|
+
this.validators.push(async (args) => {
|
|
118
|
+
if (args.options.administrativeUnitId && !validation.isValidGuid(args.options.administrativeUnitId)) {
|
|
119
|
+
return `${args.options.administrativeUnitId} is not a valid GUID`;
|
|
120
|
+
}
|
|
121
|
+
if (args.options.userId && !validation.isValidGuid(args.options.userId)) {
|
|
122
|
+
return `${args.options.userId} is not a valid GUID`;
|
|
123
|
+
}
|
|
124
|
+
if (args.options.groupId && !validation.isValidGuid(args.options.groupId)) {
|
|
125
|
+
return `${args.options.groupId} is not a valid GUID`;
|
|
126
|
+
}
|
|
127
|
+
if (args.options.deviceId && !validation.isValidGuid(args.options.deviceId)) {
|
|
128
|
+
return `${args.options.deviceId} is not a valid GUID`;
|
|
129
|
+
}
|
|
130
|
+
return true;
|
|
131
|
+
});
|
|
132
|
+
}, _AadAdministrativeUnitMemberAddCommand_initOptionSets = function _AadAdministrativeUnitMemberAddCommand_initOptionSets() {
|
|
133
|
+
this.optionSets.push({ options: ['administrativeUnitId', 'administrativeUnitName'] });
|
|
134
|
+
this.optionSets.push({ options: ['userId', 'userName', 'groupId', 'groupName', 'deviceId', 'deviceName'] });
|
|
135
|
+
};
|
|
136
|
+
export default new AadAdministrativeUnitMemberAddCommand();
|
|
137
|
+
//# sourceMappingURL=administrativeunit-member-add.js.map
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
2
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
3
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
4
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
5
|
+
};
|
|
6
|
+
var _AadAdministrativeUnitMemberGetCommand_instances, _AadAdministrativeUnitMemberGetCommand_initTelemetry, _AadAdministrativeUnitMemberGetCommand_initOptions, _AadAdministrativeUnitMemberGetCommand_initValidators, _AadAdministrativeUnitMemberGetCommand_initOptionSets;
|
|
7
|
+
import GraphCommand from '../../../base/GraphCommand.js';
|
|
8
|
+
import commands from '../../commands.js';
|
|
9
|
+
import { validation } from '../../../../utils/validation.js';
|
|
10
|
+
import { aadAdministrativeUnit } from '../../../../utils/aadAdministrativeUnit.js';
|
|
11
|
+
import request from '../../../../request.js';
|
|
12
|
+
class AadAdministrativeUnitMemberGetCommand extends GraphCommand {
|
|
13
|
+
get name() {
|
|
14
|
+
return commands.ADMINISTRATIVEUNIT_MEMBER_GET;
|
|
15
|
+
}
|
|
16
|
+
get description() {
|
|
17
|
+
return 'Retrieve a specific member (user, group, or device) of an administrative unit';
|
|
18
|
+
}
|
|
19
|
+
constructor() {
|
|
20
|
+
super();
|
|
21
|
+
_AadAdministrativeUnitMemberGetCommand_instances.add(this);
|
|
22
|
+
__classPrivateFieldGet(this, _AadAdministrativeUnitMemberGetCommand_instances, "m", _AadAdministrativeUnitMemberGetCommand_initTelemetry).call(this);
|
|
23
|
+
__classPrivateFieldGet(this, _AadAdministrativeUnitMemberGetCommand_instances, "m", _AadAdministrativeUnitMemberGetCommand_initOptions).call(this);
|
|
24
|
+
__classPrivateFieldGet(this, _AadAdministrativeUnitMemberGetCommand_instances, "m", _AadAdministrativeUnitMemberGetCommand_initValidators).call(this);
|
|
25
|
+
__classPrivateFieldGet(this, _AadAdministrativeUnitMemberGetCommand_instances, "m", _AadAdministrativeUnitMemberGetCommand_initOptionSets).call(this);
|
|
26
|
+
}
|
|
27
|
+
async commandAction(logger, args) {
|
|
28
|
+
let administrativeUnitId = args.options.administrativeUnitId;
|
|
29
|
+
try {
|
|
30
|
+
if (args.options.administrativeUnitName) {
|
|
31
|
+
if (this.verbose) {
|
|
32
|
+
await logger.logToStderr(`Retrieving Administrative Unit Id...`);
|
|
33
|
+
}
|
|
34
|
+
administrativeUnitId = (await aadAdministrativeUnit.getAdministrativeUnitByDisplayName(args.options.administrativeUnitName)).id;
|
|
35
|
+
}
|
|
36
|
+
const url = this.getRequestUrl(administrativeUnitId, args.options.id, args.options);
|
|
37
|
+
const requestOptions = {
|
|
38
|
+
url: url,
|
|
39
|
+
headers: {
|
|
40
|
+
accept: 'application/json;odata.metadata=minimal'
|
|
41
|
+
},
|
|
42
|
+
responseType: 'json'
|
|
43
|
+
};
|
|
44
|
+
const result = await request.get(requestOptions);
|
|
45
|
+
const odataType = result['@odata.type'];
|
|
46
|
+
if (odataType) {
|
|
47
|
+
result.type = odataType.replace('#microsoft.graph.', '');
|
|
48
|
+
}
|
|
49
|
+
delete result['@odata.type'];
|
|
50
|
+
delete result['@odata.context'];
|
|
51
|
+
await logger.log(result);
|
|
52
|
+
}
|
|
53
|
+
catch (err) {
|
|
54
|
+
this.handleRejectedODataJsonPromise(err);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
getRequestUrl(administrativeUnitId, memberId, options) {
|
|
58
|
+
const queryParameters = [];
|
|
59
|
+
if (options.properties) {
|
|
60
|
+
const allProperties = options.properties.split(',');
|
|
61
|
+
const selectProperties = allProperties.filter(prop => !prop.includes('/'));
|
|
62
|
+
const expandProperties = allProperties.filter(prop => prop.includes('/'));
|
|
63
|
+
if (selectProperties.length > 0) {
|
|
64
|
+
queryParameters.push(`$select=${selectProperties}`);
|
|
65
|
+
}
|
|
66
|
+
if (expandProperties.length > 0) {
|
|
67
|
+
const fieldExpands = expandProperties.map(p => {
|
|
68
|
+
const properties = p.split('/');
|
|
69
|
+
return `${properties[0]}($select=${properties[1]})`;
|
|
70
|
+
});
|
|
71
|
+
queryParameters.push(`$expand=${fieldExpands.join(',')}`);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
const queryString = queryParameters.length > 0
|
|
75
|
+
? `?${queryParameters.join('&')}`
|
|
76
|
+
: '';
|
|
77
|
+
return `${this.resource}/v1.0/directory/administrativeUnits/${administrativeUnitId}/members/${memberId}${queryString}`;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
_AadAdministrativeUnitMemberGetCommand_instances = new WeakSet(), _AadAdministrativeUnitMemberGetCommand_initTelemetry = function _AadAdministrativeUnitMemberGetCommand_initTelemetry() {
|
|
81
|
+
this.telemetry.push((args) => {
|
|
82
|
+
Object.assign(this.telemetryProperties, {
|
|
83
|
+
administrativeUnitId: typeof args.options.administrativeUnitId !== 'undefined',
|
|
84
|
+
administrativeUnitName: typeof args.options.administrativeUnitName !== 'undefined',
|
|
85
|
+
properties: typeof args.options.properties !== 'undefined'
|
|
86
|
+
});
|
|
87
|
+
});
|
|
88
|
+
}, _AadAdministrativeUnitMemberGetCommand_initOptions = function _AadAdministrativeUnitMemberGetCommand_initOptions() {
|
|
89
|
+
this.options.unshift({
|
|
90
|
+
option: '-i, --id <id>'
|
|
91
|
+
}, {
|
|
92
|
+
option: '-u, --administrativeUnitId [administrativeUnitId]'
|
|
93
|
+
}, {
|
|
94
|
+
option: '-n, --administrativeUnitName [administrativeUnitName]'
|
|
95
|
+
}, {
|
|
96
|
+
option: '-p, --properties [properties]'
|
|
97
|
+
});
|
|
98
|
+
}, _AadAdministrativeUnitMemberGetCommand_initValidators = function _AadAdministrativeUnitMemberGetCommand_initValidators() {
|
|
99
|
+
this.validators.push(async (args) => {
|
|
100
|
+
if (args.options.id && !validation.isValidGuid(args.options.id)) {
|
|
101
|
+
return `${args.options.id} is not a valid GUID`;
|
|
102
|
+
}
|
|
103
|
+
if (args.options.administrativeUnitId && !validation.isValidGuid(args.options.administrativeUnitId)) {
|
|
104
|
+
return `${args.options.administrativeUnitId} is not a valid GUID`;
|
|
105
|
+
}
|
|
106
|
+
return true;
|
|
107
|
+
});
|
|
108
|
+
}, _AadAdministrativeUnitMemberGetCommand_initOptionSets = function _AadAdministrativeUnitMemberGetCommand_initOptionSets() {
|
|
109
|
+
this.optionSets.push({ options: ['administrativeUnitId', 'administrativeUnitName'] });
|
|
110
|
+
};
|
|
111
|
+
export default new AadAdministrativeUnitMemberGetCommand();
|
|
112
|
+
//# sourceMappingURL=administrativeunit-member-get.js.map
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
2
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
3
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
4
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
5
|
+
};
|
|
6
|
+
var _AadAdministrativeUnitMemberListCommand_instances, _AadAdministrativeUnitMemberListCommand_initTelemetry, _AadAdministrativeUnitMemberListCommand_initOptions, _AadAdministrativeUnitMemberListCommand_initValidators, _AadAdministrativeUnitMemberListCommand_initOptionSets;
|
|
7
|
+
import { odata } from '../../../../utils/odata.js';
|
|
8
|
+
import GraphCommand from '../../../base/GraphCommand.js';
|
|
9
|
+
import commands from '../../commands.js';
|
|
10
|
+
import { aadAdministrativeUnit } from '../../../../utils/aadAdministrativeUnit.js';
|
|
11
|
+
import { validation } from '../../../../utils/validation.js';
|
|
12
|
+
class AadAdministrativeUnitMemberListCommand extends GraphCommand {
|
|
13
|
+
get name() {
|
|
14
|
+
return commands.ADMINISTRATIVEUNIT_MEMBER_LIST;
|
|
15
|
+
}
|
|
16
|
+
get description() {
|
|
17
|
+
return 'Retrieves members (users, groups, or devices) of an administrative unit.';
|
|
18
|
+
}
|
|
19
|
+
defaultProperties() {
|
|
20
|
+
return ['id', 'displayName'];
|
|
21
|
+
}
|
|
22
|
+
constructor() {
|
|
23
|
+
super();
|
|
24
|
+
_AadAdministrativeUnitMemberListCommand_instances.add(this);
|
|
25
|
+
__classPrivateFieldGet(this, _AadAdministrativeUnitMemberListCommand_instances, "m", _AadAdministrativeUnitMemberListCommand_initTelemetry).call(this);
|
|
26
|
+
__classPrivateFieldGet(this, _AadAdministrativeUnitMemberListCommand_instances, "m", _AadAdministrativeUnitMemberListCommand_initOptions).call(this);
|
|
27
|
+
__classPrivateFieldGet(this, _AadAdministrativeUnitMemberListCommand_instances, "m", _AadAdministrativeUnitMemberListCommand_initValidators).call(this);
|
|
28
|
+
__classPrivateFieldGet(this, _AadAdministrativeUnitMemberListCommand_instances, "m", _AadAdministrativeUnitMemberListCommand_initOptionSets).call(this);
|
|
29
|
+
}
|
|
30
|
+
async commandAction(logger, args) {
|
|
31
|
+
let administrativeUnitId = args.options.administrativeUnitId;
|
|
32
|
+
try {
|
|
33
|
+
if (args.options.administrativeUnitName) {
|
|
34
|
+
administrativeUnitId = (await aadAdministrativeUnit.getAdministrativeUnitByDisplayName(args.options.administrativeUnitName)).id;
|
|
35
|
+
}
|
|
36
|
+
let results;
|
|
37
|
+
const endpoint = this.getRequestUrl(administrativeUnitId, args.options);
|
|
38
|
+
if (args.options.type) {
|
|
39
|
+
if (args.options.filter) {
|
|
40
|
+
// While using the filter, we need to specify the ConsistencyLevel header.
|
|
41
|
+
// Can be refactored when the header is no longer necessary.
|
|
42
|
+
const requestOptions = {
|
|
43
|
+
url: endpoint,
|
|
44
|
+
headers: {
|
|
45
|
+
accept: 'application/json;odata.metadata=none',
|
|
46
|
+
ConsistencyLevel: 'eventual'
|
|
47
|
+
},
|
|
48
|
+
responseType: 'json'
|
|
49
|
+
};
|
|
50
|
+
results = await odata.getAllItems(requestOptions);
|
|
51
|
+
}
|
|
52
|
+
else {
|
|
53
|
+
results = await odata.getAllItems(endpoint);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
else {
|
|
57
|
+
results = await odata.getAllItems(endpoint, 'minimal');
|
|
58
|
+
results.forEach(c => {
|
|
59
|
+
const odataType = c['@odata.type'];
|
|
60
|
+
if (odataType) {
|
|
61
|
+
c.type = odataType.replace('#microsoft.graph.', '');
|
|
62
|
+
}
|
|
63
|
+
delete c['@odata.type'];
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
await logger.log(results);
|
|
67
|
+
}
|
|
68
|
+
catch (err) {
|
|
69
|
+
this.handleRejectedODataJsonPromise(err);
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
getRequestUrl(administrativeUnitId, options) {
|
|
73
|
+
const queryParameters = [];
|
|
74
|
+
if (options.properties) {
|
|
75
|
+
const allProperties = options.properties.split(',');
|
|
76
|
+
const selectProperties = allProperties.filter(prop => !prop.includes('/'));
|
|
77
|
+
const expandProperties = allProperties.filter(prop => prop.includes('/'));
|
|
78
|
+
if (selectProperties.length > 0) {
|
|
79
|
+
queryParameters.push(`$select=${selectProperties}`);
|
|
80
|
+
}
|
|
81
|
+
if (expandProperties.length > 0) {
|
|
82
|
+
const fieldExpands = expandProperties.map(p => `${p.split('/')[0]}($select=${p.split('/')[1]})`);
|
|
83
|
+
queryParameters.push(`$expand=${fieldExpands.join(',')}`);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
if (options.filter) {
|
|
87
|
+
queryParameters.push(`$filter=${options.filter}`);
|
|
88
|
+
queryParameters.push('$count=true');
|
|
89
|
+
}
|
|
90
|
+
const queryString = queryParameters.length > 0
|
|
91
|
+
? `?${queryParameters.join('&')}`
|
|
92
|
+
: '';
|
|
93
|
+
return options.type
|
|
94
|
+
? `${this.resource}/v1.0/directory/administrativeUnits/${administrativeUnitId}/members/microsoft.graph.${options.type}${queryString}`
|
|
95
|
+
: `${this.resource}/v1.0/directory/administrativeUnits/${administrativeUnitId}/members${queryString}`;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
_AadAdministrativeUnitMemberListCommand_instances = new WeakSet(), _AadAdministrativeUnitMemberListCommand_initTelemetry = function _AadAdministrativeUnitMemberListCommand_initTelemetry() {
|
|
99
|
+
this.telemetry.push((args) => {
|
|
100
|
+
Object.assign(this.telemetryProperties, {
|
|
101
|
+
type: typeof args.options.type !== 'undefined',
|
|
102
|
+
properties: typeof args.options.properties !== 'undefined',
|
|
103
|
+
filter: typeof args.options.filter !== 'undefined'
|
|
104
|
+
});
|
|
105
|
+
});
|
|
106
|
+
}, _AadAdministrativeUnitMemberListCommand_initOptions = function _AadAdministrativeUnitMemberListCommand_initOptions() {
|
|
107
|
+
this.options.unshift({
|
|
108
|
+
option: '-i, --administrativeUnitId [administrativeUnitId]'
|
|
109
|
+
}, {
|
|
110
|
+
option: '-n, --administrativeUnitName [administrativeUnitName]'
|
|
111
|
+
}, {
|
|
112
|
+
option: '-t, --type [type]',
|
|
113
|
+
autocomplete: ['user', 'group', 'device']
|
|
114
|
+
}, {
|
|
115
|
+
option: '-p, --properties [properties]'
|
|
116
|
+
}, {
|
|
117
|
+
option: '-f, --filter [filter]'
|
|
118
|
+
});
|
|
119
|
+
}, _AadAdministrativeUnitMemberListCommand_initValidators = function _AadAdministrativeUnitMemberListCommand_initValidators() {
|
|
120
|
+
this.validators.push(async (args) => {
|
|
121
|
+
if (args.options.administrativeUnitId && !validation.isValidGuid(args.options.administrativeUnitId)) {
|
|
122
|
+
return `${args.options.administrativeUnitId} is not a valid GUID`;
|
|
123
|
+
}
|
|
124
|
+
if (args.options.type) {
|
|
125
|
+
if (['user', 'group', 'device'].every(type => type !== args.options.type)) {
|
|
126
|
+
return `${args.options.type} is not a valid type value. Allowed values user|group|device`;
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
if (args.options.filter && !args.options.type) {
|
|
130
|
+
return 'Filter can be specified only if type is set';
|
|
131
|
+
}
|
|
132
|
+
return true;
|
|
133
|
+
});
|
|
134
|
+
}, _AadAdministrativeUnitMemberListCommand_initOptionSets = function _AadAdministrativeUnitMemberListCommand_initOptionSets() {
|
|
135
|
+
this.optionSets.push({ options: ['administrativeUnitId', 'administrativeUnitName'] });
|
|
136
|
+
};
|
|
137
|
+
export default new AadAdministrativeUnitMemberListCommand();
|
|
138
|
+
//# sourceMappingURL=administrativeunit-member-list.js.map
|
|
@@ -9,7 +9,7 @@ import { validation } from "../../../../utils/validation.js";
|
|
|
9
9
|
import request from "../../../../request.js";
|
|
10
10
|
import GraphCommand from "../../../base/GraphCommand.js";
|
|
11
11
|
import commands from "../../commands.js";
|
|
12
|
-
import {
|
|
12
|
+
import { cli } from "../../../../cli/cli.js";
|
|
13
13
|
class AadAdministrativeUnitRemoveCommand extends GraphCommand {
|
|
14
14
|
get name() {
|
|
15
15
|
return commands.ADMINISTRATIVEUNIT_REMOVE;
|
|
@@ -50,7 +50,7 @@ class AadAdministrativeUnitRemoveCommand extends GraphCommand {
|
|
|
50
50
|
await removeAdministrativeUnit();
|
|
51
51
|
}
|
|
52
52
|
else {
|
|
53
|
-
const result = await
|
|
53
|
+
const result = await cli.promptForConfirmation({ message: `Are you sure you want to remove administrative unit '${args.options.id || args.options.displayName}'?` });
|
|
54
54
|
if (result) {
|
|
55
55
|
await removeAdministrativeUnit();
|
|
56
56
|
}
|
|
@@ -10,7 +10,7 @@ import { formatting } from '../../../../utils/formatting.js';
|
|
|
10
10
|
import { validation } from '../../../../utils/validation.js';
|
|
11
11
|
import GraphCommand from '../../../base/GraphCommand.js';
|
|
12
12
|
import commands from '../../commands.js';
|
|
13
|
-
import {
|
|
13
|
+
import { cli } from '../../../../cli/cli.js';
|
|
14
14
|
class AadAppGetCommand extends GraphCommand {
|
|
15
15
|
get name() {
|
|
16
16
|
return commands.APP_GET;
|
|
@@ -61,7 +61,7 @@ class AadAppGetCommand extends GraphCommand {
|
|
|
61
61
|
throw `No Azure AD application registration with ${applicationIdentifier} found`;
|
|
62
62
|
}
|
|
63
63
|
const resultAsKeyValuePair = formatting.convertArrayToHashTable('id', res.value);
|
|
64
|
-
const result = await
|
|
64
|
+
const result = await cli.handleMultipleResultsFound(`Multiple Azure AD application registration with name '${name}' found.`, resultAsKeyValuePair);
|
|
65
65
|
return result.id;
|
|
66
66
|
}
|
|
67
67
|
async getAppInfo(appObjectId) {
|