@pnp/cli-microsoft365 7.6.0-beta.c74fe4b → 7.6.0-beta.fc0eacc
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 +3 -0
- package/README.md +1 -1
- package/allCommands.json +1 -1
- package/allCommandsFull.json +1 -1
- package/dist/Auth.js +12 -10
- package/dist/AuthServer.js +1 -1
- package/dist/config.js +2 -2
- package/dist/m365/app/commands/app-get.js +1 -1
- package/dist/m365/app/commands/app-open.js +1 -1
- package/dist/m365/app/commands/permission/permission-add.js +2 -2
- package/dist/m365/app/commands/permission/permission-list.js +2 -2
- package/dist/m365/base/PeriodBasedReport.js +3 -0
- package/dist/m365/cli/commands/cli-consent.js +2 -2
- package/dist/m365/cli/commands/cli-reconsent.js +3 -3
- package/dist/m365/commands/login.js +1 -1
- package/dist/m365/entra/commands/administrativeunit/administrativeunit-add.js +1 -0
- package/dist/m365/entra/commands/administrativeunit/administrativeunit-get.js +1 -0
- package/dist/m365/entra/commands/administrativeunit/administrativeunit-list.js +1 -0
- package/dist/m365/entra/commands/administrativeunit/administrativeunit-member-add.js +1 -0
- package/dist/m365/entra/commands/administrativeunit/administrativeunit-member-get.js +1 -0
- package/dist/m365/entra/commands/administrativeunit/administrativeunit-member-list.js +1 -0
- package/dist/m365/entra/commands/administrativeunit/administrativeunit-remove.js +1 -0
- package/dist/m365/entra/commands/app/app-add.js +7 -6
- package/dist/m365/entra/commands/app/app-get.js +4 -3
- package/dist/m365/entra/commands/app/app-list.js +1 -0
- package/dist/m365/entra/commands/app/app-permission-add.js +3 -2
- package/dist/m365/entra/commands/app/app-permission-list.js +1 -1
- package/dist/m365/entra/commands/app/app-remove.js +5 -4
- package/dist/m365/entra/commands/app/app-role-add.js +6 -5
- package/dist/m365/entra/commands/app/app-role-list.js +4 -3
- package/dist/m365/entra/commands/app/app-role-remove.js +6 -5
- package/dist/m365/entra/commands/app/app-set.js +8 -7
- package/dist/m365/entra/commands/approleassignment/approleassignment-add.js +2 -1
- package/dist/m365/entra/commands/approleassignment/approleassignment-list.js +1 -0
- package/dist/m365/entra/commands/approleassignment/approleassignment-remove.js +1 -0
- package/dist/m365/entra/commands/enterpriseapp/enterpriseapp-add.js +1 -0
- package/dist/m365/entra/commands/enterpriseapp/enterpriseapp-get.js +1 -0
- package/dist/m365/entra/commands/enterpriseapp/enterpriseapp-list.js +1 -0
- package/dist/m365/entra/commands/group/group-get.js +1 -0
- package/dist/m365/entra/commands/group/group-list.js +1 -0
- package/dist/m365/entra/commands/group/group-remove.js +1 -0
- package/dist/m365/entra/commands/group/group-user-list.js +1 -0
- package/dist/m365/entra/commands/groupsetting/groupsetting-add.js +1 -0
- package/dist/m365/entra/commands/groupsetting/groupsetting-get.js +1 -0
- package/dist/m365/entra/commands/groupsetting/groupsetting-list.js +1 -0
- package/dist/m365/entra/commands/groupsetting/groupsetting-remove.js +1 -0
- package/dist/m365/entra/commands/groupsetting/groupsetting-set.js +1 -0
- package/dist/m365/entra/commands/groupsettingtemplate/groupsettingtemplate-get.js +1 -0
- package/dist/m365/entra/commands/groupsettingtemplate/groupsettingtemplate-list.js +1 -0
- package/dist/m365/entra/commands/license/license-list.js +1 -0
- package/dist/m365/entra/commands/m365group/m365group-add.js +1 -0
- package/dist/m365/entra/commands/m365group/m365group-conversation-list.js +1 -0
- package/dist/m365/entra/commands/m365group/m365group-conversation-post-list.js +1 -0
- package/dist/m365/entra/commands/m365group/m365group-get.js +1 -0
- package/dist/m365/entra/commands/m365group/m365group-list.js +1 -0
- package/dist/m365/entra/commands/m365group/m365group-recyclebinitem-clear.js +1 -0
- package/dist/m365/entra/commands/m365group/m365group-recyclebinitem-list.js +1 -0
- package/dist/m365/entra/commands/m365group/m365group-recyclebinitem-remove.js +1 -0
- package/dist/m365/entra/commands/m365group/m365group-recyclebinitem-restore.js +1 -0
- package/dist/m365/entra/commands/m365group/m365group-remove.js +1 -0
- package/dist/m365/entra/commands/m365group/m365group-renew.js +1 -0
- package/dist/m365/entra/commands/m365group/m365group-set.js +1 -0
- package/dist/m365/entra/commands/m365group/m365group-teamify.js +1 -0
- package/dist/m365/entra/commands/m365group/m365group-user-add.js +1 -0
- package/dist/m365/entra/commands/m365group/m365group-user-list.js +1 -0
- package/dist/m365/entra/commands/m365group/m365group-user-remove.js +1 -0
- package/dist/m365/entra/commands/m365group/m365group-user-set.js +1 -0
- package/dist/m365/entra/commands/oauth2grant/oauth2grant-add.js +1 -0
- package/dist/m365/entra/commands/oauth2grant/oauth2grant-list.js +1 -0
- package/dist/m365/entra/commands/oauth2grant/oauth2grant-remove.js +1 -0
- package/dist/m365/entra/commands/oauth2grant/oauth2grant-set.js +1 -0
- package/dist/m365/entra/commands/policy/policy-list.js +1 -0
- package/dist/m365/entra/commands/siteclassification/siteclassification-disable.js +1 -0
- package/dist/m365/entra/commands/siteclassification/siteclassification-enable.js +1 -0
- package/dist/m365/entra/commands/siteclassification/siteclassification-get.js +1 -0
- package/dist/m365/entra/commands/siteclassification/siteclassification-set.js +1 -0
- package/dist/m365/entra/commands/user/user-add.js +1 -0
- package/dist/m365/entra/commands/user/user-get.js +1 -0
- package/dist/m365/entra/commands/user/user-guest-add.js +1 -0
- package/dist/m365/entra/commands/user/user-hibp.js +1 -0
- package/dist/m365/entra/commands/user/user-license-add.js +1 -0
- package/dist/m365/entra/commands/user/user-license-list.js +1 -0
- package/dist/m365/entra/commands/user/user-license-remove.js +1 -0
- package/dist/m365/entra/commands/user/user-list.js +1 -0
- package/dist/m365/entra/commands/user/user-password-validate.js +1 -0
- package/dist/m365/entra/commands/user/user-recyclebinitem-clear.js +1 -0
- package/dist/m365/entra/commands/user/user-recyclebinitem-list.js +1 -0
- package/dist/m365/entra/commands/user/user-recyclebinitem-remove.js +2 -1
- package/dist/m365/entra/commands/user/user-recyclebinitem-restore.js +1 -0
- package/dist/m365/entra/commands/user/user-remove.js +1 -0
- package/dist/m365/entra/commands/user/user-set.js +1 -0
- package/dist/m365/entra/commands/user/user-signin-list.js +1 -0
- package/dist/m365/outlook/commands/message/message-remove.js +113 -0
- package/dist/m365/outlook/commands.js +1 -0
- package/dist/m365/pp/commands/managementapp/managementapp-add.js +7 -7
- package/dist/m365/spfx/commands/project/DeployWorkflow.js +111 -0
- package/dist/m365/spfx/commands/project/project-azuredevops-pipeline-add.js +183 -0
- package/dist/m365/spfx/commands/project/project-azuredevops-pipeline-model.js +2 -0
- package/dist/m365/spfx/commands/project/project-github-workflow-add.js +6 -4
- package/dist/m365/spfx/commands.js +1 -0
- package/dist/m365/spo/commands/folder/FolderColor.js +19 -0
- package/dist/m365/spo/commands/folder/folder-add.js +46 -17
- package/dist/m365/spo/commands/folder/folder-set.js +118 -0
- package/dist/m365/spo/commands/group/group-member-add.js +2 -2
- package/dist/m365/spo/commands/group/group-member-remove.js +1 -1
- package/dist/m365/spo/commands/site/site-apppermission-add.js +2 -2
- package/dist/m365/spo/commands/site/site-recyclebinitem-restore.js +66 -27
- package/dist/m365/spo/commands/tenant/tenant-settings-set.js +1 -1
- package/dist/m365/spo/commands/user/user-remove.js +93 -16
- package/dist/m365/spo/commands.js +1 -0
- package/dist/m365/teams/commands/report/report-directroutingcalls.js +3 -0
- package/dist/m365/teams/commands/report/report-pstncalls.js +3 -0
- package/dist/m365/teams/commands/tab/tab-get.js +1 -1
- package/dist/m365/teams/commands/team/team-add.js +132 -3
- package/dist/m365/tenant/commands/report/report-office365activationcounts.js +3 -0
- package/dist/m365/tenant/commands/report/report-office365activationsusercounts.js +3 -0
- package/dist/m365/tenant/commands/report/report-office365activationsuserdetail.js +3 -0
- package/dist/utils/entraUser.js +36 -0
- package/dist/utils/spo.js +1 -1
- package/docs/docs/cmd/app/app-get.mdx +10 -10
- package/docs/docs/cmd/app/app-open.mdx +6 -6
- package/docs/docs/cmd/app/permission/permission-add.mdx +2 -2
- package/docs/docs/cmd/app/permission/permission-list.mdx +5 -5
- package/docs/docs/cmd/cli/cli-consent.mdx +2 -2
- package/docs/docs/cmd/cli/cli-reconsent.mdx +6 -6
- package/docs/docs/cmd/entra/app/app-permission-add.mdx +6 -6
- package/docs/docs/cmd/entra/approleassignment/approleassignment-add.mdx +1 -1
- package/docs/docs/cmd/entra/approleassignment/approleassignment-list.mdx +4 -4
- package/docs/docs/cmd/entra/enterpriseapp/enterpriseapp-add.mdx +1 -1
- package/docs/docs/cmd/entra/enterpriseapp/enterpriseapp-get.mdx +1 -1
- package/docs/docs/cmd/entra/group/group-user-add.mdx +7 -7
- package/docs/docs/cmd/entra/m365group/m365group-report-activitycounts.mdx +8 -0
- package/docs/docs/cmd/entra/m365group/m365group-report-activitydetail.mdx +8 -0
- package/docs/docs/cmd/entra/m365group/m365group-report-activityfilecounts.mdx +8 -0
- package/docs/docs/cmd/entra/m365group/m365group-report-activitygroupcounts.mdx +8 -0
- package/docs/docs/cmd/entra/m365group/m365group-report-activitystorage.mdx +8 -0
- package/docs/docs/cmd/entra/oauth2grant/oauth2grant-add.mdx +1 -1
- package/docs/docs/cmd/entra/oauth2grant/oauth2grant-list.mdx +1 -1
- package/docs/docs/cmd/entra/oauth2grant/oauth2grant-remove.mdx +1 -1
- package/docs/docs/cmd/entra/oauth2grant/oauth2grant-set.mdx +1 -1
- package/docs/docs/cmd/external/connection/connection-add.mdx +2 -2
- package/docs/docs/cmd/file/file-add.mdx +1 -1
- package/docs/docs/cmd/graph/schemaextension/schemaextension-add.mdx +2 -2
- package/docs/docs/cmd/graph/schemaextension/schemaextension-set.mdx +1 -1
- package/docs/docs/cmd/login.mdx +18 -18
- package/docs/docs/cmd/onedrive/report/report-activityfilecounts.mdx +8 -0
- package/docs/docs/cmd/onedrive/report/report-activityusercounts.mdx +8 -0
- package/docs/docs/cmd/onedrive/report/report-activityuserdetail.mdx +8 -0
- package/docs/docs/cmd/onedrive/report/report-usageaccountcounts.mdx +8 -0
- package/docs/docs/cmd/onedrive/report/report-usageaccountdetail.mdx +8 -0
- package/docs/docs/cmd/onedrive/report/report-usagefilecounts.mdx +6 -0
- package/docs/docs/cmd/onedrive/report/report-usagestorage.mdx +8 -0
- package/docs/docs/cmd/outlook/message/message-remove.mdx +67 -0
- package/docs/docs/cmd/outlook/report/report-mailactivitycounts.mdx +8 -0
- package/docs/docs/cmd/outlook/report/report-mailactivityusercounts.mdx +8 -0
- package/docs/docs/cmd/outlook/report/report-mailactivityuserdetail.mdx +8 -0
- package/docs/docs/cmd/outlook/report/report-mailappusageappsusercounts.mdx +7 -0
- package/docs/docs/cmd/outlook/report/report-mailappusageusercounts.mdx +8 -0
- package/docs/docs/cmd/outlook/report/report-mailappusageuserdetail.mdx +8 -0
- package/docs/docs/cmd/outlook/report/report-mailappusageversionsusercounts.mdx +8 -0
- package/docs/docs/cmd/outlook/report/report-mailboxusagedetail.mdx +8 -0
- package/docs/docs/cmd/outlook/report/report-mailboxusagemailboxcount.mdx +6 -0
- package/docs/docs/cmd/outlook/report/report-mailboxusagequotastatusmailboxcounts.mdx +8 -0
- package/docs/docs/cmd/outlook/report/report-mailboxusagestorage.mdx +8 -0
- package/docs/docs/cmd/pa/app/app-owner-set.mdx +1 -1
- package/docs/docs/cmd/pa/app/app-permission-ensure.mdx +3 -3
- package/docs/docs/cmd/pa/app/app-permission-remove.mdx +3 -3
- package/docs/docs/cmd/planner/plan/plan-add.mdx +1 -1
- package/docs/docs/cmd/planner/roster/roster-add.mdx +5 -5
- package/docs/docs/cmd/planner/roster/roster-get.mdx +7 -7
- package/docs/docs/cmd/planner/roster/roster-member-add.mdx +4 -4
- package/docs/docs/cmd/planner/roster/roster-member-get.mdx +4 -4
- package/docs/docs/cmd/planner/roster/roster-member-list.mdx +2 -2
- package/docs/docs/cmd/planner/roster/roster-member-remove.mdx +5 -5
- 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-get.mdx +1 -1
- package/docs/docs/cmd/planner/task/task-list.mdx +1 -1
- 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/managementapp/managementapp-add.mdx +9 -9
- package/docs/docs/cmd/purview/auditlog/auditlog-list.mdx +1 -1
- package/docs/docs/cmd/purview/sensitivitylabel/sensitivitylabel-get.mdx +1 -1
- package/docs/docs/cmd/purview/sensitivitylabel/sensitivitylabel-list.mdx +1 -1
- package/docs/docs/cmd/purview/sensitivitylabel/sensitivitylabel-policysettings-list.mdx +1 -1
- package/docs/docs/cmd/request.mdx +1 -1
- package/docs/docs/cmd/skype/report/report-activitycounts.mdx +8 -0
- package/docs/docs/cmd/skype/report/report-activityusercounts.mdx +8 -0
- package/docs/docs/cmd/skype/report/report-activityuserdetail.mdx +8 -0
- package/docs/docs/cmd/spfx/project/project-azuredevops-pipeline-add.mdx +87 -0
- package/docs/docs/cmd/spfx/project/project-github-workflow-add.mdx +2 -2
- package/docs/docs/cmd/spo/file/file-roleassignment-add.mdx +3 -3
- package/docs/docs/cmd/spo/file/file-roleassignment-remove.mdx +2 -2
- package/docs/docs/cmd/spo/folder/folder-add.mdx +38 -0
- package/docs/docs/cmd/spo/folder/folder-roleassignment-add.mdx +1 -1
- package/docs/docs/cmd/spo/folder/folder-roleassignment-remove.mdx +1 -1
- package/docs/docs/cmd/spo/folder/folder-set.mdx +88 -0
- package/docs/docs/cmd/spo/group/group-member-add.mdx +2 -2
- package/docs/docs/cmd/spo/group/group-member-remove.mdx +3 -3
- package/docs/docs/cmd/spo/list/list-roleassignment-add.mdx +3 -3
- package/docs/docs/cmd/spo/list/list-roleassignment-remove.mdx +2 -2
- package/docs/docs/cmd/spo/listitem/listitem-roleassignment-add.mdx +8 -8
- package/docs/docs/cmd/spo/listitem/listitem-roleassignment-remove.mdx +2 -2
- package/docs/docs/cmd/spo/report/report-activityfilecounts.mdx +8 -0
- package/docs/docs/cmd/spo/report/report-activitypages.mdx +8 -0
- package/docs/docs/cmd/spo/report/report-activityusercounts.mdx +6 -0
- package/docs/docs/cmd/spo/report/report-activityuserdetail.mdx +6 -0
- package/docs/docs/cmd/spo/report/report-siteusagedetail.mdx +6 -0
- package/docs/docs/cmd/spo/report/report-siteusagefilecounts.mdx +6 -0
- package/docs/docs/cmd/spo/report/report-siteusagepages.mdx +8 -0
- package/docs/docs/cmd/spo/report/report-siteusagesitecounts.mdx +6 -0
- package/docs/docs/cmd/spo/report/report-siteusagestorage.mdx +8 -0
- package/docs/docs/cmd/spo/site/site-apppermission-add.mdx +2 -2
- package/docs/docs/cmd/spo/site/site-apppermission-set.mdx +2 -2
- package/docs/docs/cmd/spo/site/site-recyclebinitem-restore.mdx +29 -5
- package/docs/docs/cmd/spo/tenant/tenant-settings-set.mdx +89 -89
- package/docs/docs/cmd/spo/user/user-ensure.mdx +1 -1
- package/docs/docs/cmd/spo/user/user-remove.mdx +40 -9
- package/docs/docs/cmd/spo/web/web-roleassignment-add.mdx +3 -3
- package/docs/docs/cmd/spo/web/web-roleassignment-remove.mdx +2 -2
- package/docs/docs/cmd/teams/channel/channel-member-remove.mdx +1 -1
- package/docs/docs/cmd/teams/channel/channel-member-set.mdx +1 -1
- package/docs/docs/cmd/teams/chat/chat-member-remove.mdx +3 -3
- package/docs/docs/cmd/teams/report/report-deviceusagedistributionusercounts.mdx +8 -0
- package/docs/docs/cmd/teams/report/report-deviceusageusercounts.mdx +8 -0
- package/docs/docs/cmd/teams/report/report-deviceusageuserdetail.mdx +6 -0
- package/docs/docs/cmd/teams/report/report-directroutingcalls.mdx +7 -1
- package/docs/docs/cmd/teams/report/report-pstncalls.mdx +7 -1
- package/docs/docs/cmd/teams/report/report-useractivitycounts.mdx +8 -0
- package/docs/docs/cmd/teams/report/report-useractivityusercounts.mdx +8 -0
- package/docs/docs/cmd/teams/report/report-useractivityuserdetail.mdx +8 -0
- package/docs/docs/cmd/teams/tab/tab-get.mdx +19 -12
- package/docs/docs/cmd/teams/team/team-add.mdx +28 -4
- package/docs/docs/cmd/tenant/report/report-activeusercounts.mdx +8 -0
- package/docs/docs/cmd/tenant/report/report-activeuserdetail.mdx +6 -0
- package/docs/docs/cmd/tenant/report/report-office365activationcounts.mdx +8 -0
- package/docs/docs/cmd/tenant/report/report-office365activationsusercounts.mdx +8 -0
- package/docs/docs/cmd/tenant/report/report-office365activationsuserdetail.mdx +8 -0
- package/docs/docs/cmd/tenant/report/report-servicesusercounts.mdx +8 -0
- package/docs/docs/cmd/tenant/security/security-alerts-list.mdx +1 -1
- package/docs/docs/cmd/viva/engage/engage-group-list.mdx +1 -1
- package/docs/docs/cmd/viva/engage/engage-group-user-add.mdx +1 -1
- package/docs/docs/cmd/viva/engage/engage-group-user-remove.mdx +1 -1
- package/docs/docs/cmd/viva/engage/engage-message-add.mdx +1 -1
- package/docs/docs/cmd/viva/engage/engage-message-get.mdx +1 -1
- package/docs/docs/cmd/viva/engage/engage-message-like-set.mdx +1 -1
- package/docs/docs/cmd/viva/engage/engage-message-list.mdx +1 -1
- package/docs/docs/cmd/viva/engage/engage-message-remove.mdx +1 -1
- package/docs/docs/cmd/viva/engage/engage-network-list.mdx +1 -1
- package/docs/docs/cmd/viva/engage/engage-report-activitycounts.mdx +8 -0
- package/docs/docs/cmd/viva/engage/engage-report-activityusercounts.mdx +8 -0
- package/docs/docs/cmd/viva/engage/engage-report-activityuserdetail.mdx +6 -0
- package/docs/docs/cmd/viva/engage/engage-report-deviceusagedistributionusercounts.mdx +8 -0
- package/docs/docs/cmd/viva/engage/engage-report-deviceusageusercounts.mdx +8 -0
- package/docs/docs/cmd/viva/engage/engage-report-deviceusageuserdetail.mdx +6 -0
- package/docs/docs/cmd/viva/engage/engage-report-groupsactivitycounts.mdx +8 -0
- package/docs/docs/cmd/viva/engage/engage-report-groupsactivitydetail.mdx +6 -0
- package/docs/docs/cmd/viva/engage/engage-report-groupsactivitygroupcounts.mdx +8 -0
- package/docs/docs/cmd/viva/engage/engage-search.mdx +1 -1
- package/docs/docs/cmd/viva/engage/engage-user-get.mdx +1 -1
- package/docs/docs/cmd/viva/engage/engage-user-list.mdx +1 -1
- package/npm-shrinkwrap.json +62 -58
- package/package.json +11 -11
- package/dist/m365/spo/commands/folder/folder-rename.js +0 -72
- package/docs/docs/cmd/spo/folder/folder-rename.mdx +0 -44
|
@@ -3,12 +3,17 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
3
3
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
4
4
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
5
5
|
};
|
|
6
|
-
var _TeamsTeamAddCommand_instances, _TeamsTeamAddCommand_initTelemetry, _TeamsTeamAddCommand_initOptions, _TeamsTeamAddCommand_initOptionSets;
|
|
6
|
+
var _TeamsTeamAddCommand_instances, _TeamsTeamAddCommand_initTelemetry, _TeamsTeamAddCommand_initOptions, _TeamsTeamAddCommand_initValidators, _TeamsTeamAddCommand_initOptionSets;
|
|
7
7
|
import { setTimeout } from 'timers/promises';
|
|
8
8
|
import request from '../../../../request.js';
|
|
9
9
|
import { entraGroup } from '../../../../utils/entraGroup.js';
|
|
10
10
|
import GraphCommand from '../../../base/GraphCommand.js';
|
|
11
11
|
import commands from '../../commands.js';
|
|
12
|
+
import { validation } from '../../../../utils/validation.js';
|
|
13
|
+
import { accessToken } from '../../../../utils/accessToken.js';
|
|
14
|
+
import auth from '../../../../Auth.js';
|
|
15
|
+
import { entraUser } from '../../../../utils/entraUser.js';
|
|
16
|
+
import { formatting } from '../../../../utils/formatting.js';
|
|
12
17
|
class TeamsTeamAddCommand extends GraphCommand {
|
|
13
18
|
get name() {
|
|
14
19
|
return commands.TEAM_ADD;
|
|
@@ -22,9 +27,14 @@ class TeamsTeamAddCommand extends GraphCommand {
|
|
|
22
27
|
this.pollingInterval = 30000;
|
|
23
28
|
__classPrivateFieldGet(this, _TeamsTeamAddCommand_instances, "m", _TeamsTeamAddCommand_initTelemetry).call(this);
|
|
24
29
|
__classPrivateFieldGet(this, _TeamsTeamAddCommand_instances, "m", _TeamsTeamAddCommand_initOptions).call(this);
|
|
30
|
+
__classPrivateFieldGet(this, _TeamsTeamAddCommand_instances, "m", _TeamsTeamAddCommand_initValidators).call(this);
|
|
25
31
|
__classPrivateFieldGet(this, _TeamsTeamAddCommand_instances, "m", _TeamsTeamAddCommand_initOptionSets).call(this);
|
|
26
32
|
}
|
|
27
33
|
async commandAction(logger, args) {
|
|
34
|
+
const isAppOnlyAccessToken = accessToken.isAppOnlyAccessToken(auth.connection.accessTokens[this.resource].accessToken);
|
|
35
|
+
if (isAppOnlyAccessToken && !args.options.ownerUserNames && !args.options.ownerIds && !args.options.ownerEmails) {
|
|
36
|
+
this.handleError(`Specify at least 'ownerUserNames', 'ownerIds' or 'ownerEmails' when using application permissions.`);
|
|
37
|
+
}
|
|
28
38
|
let requestBody;
|
|
29
39
|
if (args.options.template) {
|
|
30
40
|
if (this.verbose) {
|
|
@@ -54,6 +64,19 @@ class TeamsTeamAddCommand extends GraphCommand {
|
|
|
54
64
|
description: args.options.description
|
|
55
65
|
};
|
|
56
66
|
}
|
|
67
|
+
let members = [];
|
|
68
|
+
if (args.options.ownerEmails || args.options.ownerIds || args.options.ownerUserNames) {
|
|
69
|
+
await this.retrieveMembersToAdd(members, 'owner', args.options.ownerEmails, args.options.ownerIds, args.options.ownerUserNames);
|
|
70
|
+
}
|
|
71
|
+
if (args.options.memberEmails || args.options.memberIds || args.options.memberUserNames) {
|
|
72
|
+
await this.retrieveMembersToAdd(members, 'member', args.options.memberEmails, args.options.memberIds, args.options.memberUserNames);
|
|
73
|
+
}
|
|
74
|
+
// We filter out the first owner here and add it to the request body when we are using application only permissions. This is required or the Graph API will throw an error.
|
|
75
|
+
if (members.length > 0 && members.filter(y => y.roles.includes('owner')).length > 0 && isAppOnlyAccessToken) {
|
|
76
|
+
const groupOwner = members.filter(y => y.roles.includes('owner')).slice(0, 1);
|
|
77
|
+
members = members.filter(y => y !== groupOwner[0]);
|
|
78
|
+
requestBody.members = groupOwner;
|
|
79
|
+
}
|
|
57
80
|
const requestOptionsPost = {
|
|
58
81
|
url: `${this.resource}/v1.0/teams`,
|
|
59
82
|
headers: {
|
|
@@ -72,12 +95,18 @@ class TeamsTeamAddCommand extends GraphCommand {
|
|
|
72
95
|
responseType: 'json'
|
|
73
96
|
};
|
|
74
97
|
const teamsAsyncOperation = await request.get(requestOptions);
|
|
75
|
-
if (!args.options.wait) {
|
|
98
|
+
if (!args.options.wait && members.length === 0) {
|
|
76
99
|
await logger.log(teamsAsyncOperation);
|
|
77
100
|
}
|
|
78
101
|
else {
|
|
79
102
|
await this.waitUntilTeamFinishedProvisioning(teamsAsyncOperation, requestOptions, logger);
|
|
80
103
|
const entraGroup = await this.getEntraGroup(teamsAsyncOperation.targetResourceId, logger);
|
|
104
|
+
if (members.length > 0) {
|
|
105
|
+
if (this.verbose) {
|
|
106
|
+
await logger.logToStderr('Adding members to the team...');
|
|
107
|
+
}
|
|
108
|
+
await this.addMembers(members, entraGroup.id);
|
|
109
|
+
}
|
|
81
110
|
await logger.log(entraGroup);
|
|
82
111
|
}
|
|
83
112
|
}
|
|
@@ -85,6 +114,19 @@ class TeamsTeamAddCommand extends GraphCommand {
|
|
|
85
114
|
this.handleRejectedODataJsonPromise(err);
|
|
86
115
|
}
|
|
87
116
|
}
|
|
117
|
+
async addMembers(members, groupId) {
|
|
118
|
+
for (const member of members) {
|
|
119
|
+
const requestOptions = {
|
|
120
|
+
url: `${this.resource}/v1.0/teams/${groupId}/members`,
|
|
121
|
+
headers: {
|
|
122
|
+
'content-type': 'application/json;odata.metadata=none'
|
|
123
|
+
},
|
|
124
|
+
responseType: 'json',
|
|
125
|
+
data: member
|
|
126
|
+
};
|
|
127
|
+
await request.post(requestOptions);
|
|
128
|
+
}
|
|
129
|
+
}
|
|
88
130
|
async waitUntilTeamFinishedProvisioning(teamsAsyncOperation, requestOptions, logger) {
|
|
89
131
|
if (teamsAsyncOperation.status === 'succeeded') {
|
|
90
132
|
if (this.verbose) {
|
|
@@ -118,6 +160,31 @@ class TeamsTeamAddCommand extends GraphCommand {
|
|
|
118
160
|
}
|
|
119
161
|
return group;
|
|
120
162
|
}
|
|
163
|
+
async retrieveMembersToAdd(members, role, emails, ids, userNames) {
|
|
164
|
+
let itemsToProcess = [];
|
|
165
|
+
if (emails) {
|
|
166
|
+
itemsToProcess = await entraUser.getUserIdsByEmails(formatting.splitAndTrim(emails));
|
|
167
|
+
}
|
|
168
|
+
else if (ids) {
|
|
169
|
+
itemsToProcess = formatting.splitAndTrim(ids);
|
|
170
|
+
}
|
|
171
|
+
else if (userNames) {
|
|
172
|
+
itemsToProcess = await entraUser.getUserIdsByUpns(formatting.splitAndTrim(userNames));
|
|
173
|
+
}
|
|
174
|
+
itemsToProcess.map((item) => {
|
|
175
|
+
const member = members.find((y) => y['user@odata.bind'] === `https://graph.microsoft.com/v1.0/users('${item}')`);
|
|
176
|
+
if (!member) {
|
|
177
|
+
members.push({
|
|
178
|
+
'@odata.type': '#microsoft.graph.aadUserConversationMember',
|
|
179
|
+
'user@odata.bind': `https://graph.microsoft.com/v1.0/users('${item}')`,
|
|
180
|
+
roles: [role]
|
|
181
|
+
});
|
|
182
|
+
}
|
|
183
|
+
else {
|
|
184
|
+
member.roles.push(role);
|
|
185
|
+
}
|
|
186
|
+
});
|
|
187
|
+
}
|
|
121
188
|
}
|
|
122
189
|
_TeamsTeamAddCommand_instances = new WeakSet(), _TeamsTeamAddCommand_initTelemetry = function _TeamsTeamAddCommand_initTelemetry() {
|
|
123
190
|
this.telemetry.push((args) => {
|
|
@@ -125,7 +192,13 @@ _TeamsTeamAddCommand_instances = new WeakSet(), _TeamsTeamAddCommand_initTelemet
|
|
|
125
192
|
name: typeof args.options.name !== 'undefined',
|
|
126
193
|
description: typeof args.options.description !== 'undefined',
|
|
127
194
|
template: typeof args.options.template !== 'undefined',
|
|
128
|
-
wait: !!args.options.wait
|
|
195
|
+
wait: !!args.options.wait,
|
|
196
|
+
ownerUserNames: typeof args.options.ownerUserNames !== 'undefined',
|
|
197
|
+
ownerIds: typeof args.options.ownerIds !== 'undefined',
|
|
198
|
+
ownerEmails: typeof args.options.ownerEmails !== 'undefined',
|
|
199
|
+
memberUserNames: typeof args.options.memberUserNames !== 'undefined',
|
|
200
|
+
memberIds: typeof args.options.memberIds !== 'undefined',
|
|
201
|
+
memberEmails: typeof args.options.memberEmails !== 'undefined'
|
|
129
202
|
});
|
|
130
203
|
});
|
|
131
204
|
}, _TeamsTeamAddCommand_initOptions = function _TeamsTeamAddCommand_initOptions() {
|
|
@@ -137,6 +210,52 @@ _TeamsTeamAddCommand_instances = new WeakSet(), _TeamsTeamAddCommand_initTelemet
|
|
|
137
210
|
option: '--template [template]'
|
|
138
211
|
}, {
|
|
139
212
|
option: '--wait'
|
|
213
|
+
}, {
|
|
214
|
+
option: '--ownerUserNames [ownerUserNames]'
|
|
215
|
+
}, {
|
|
216
|
+
option: '--ownerIds [ownerIds]'
|
|
217
|
+
}, {
|
|
218
|
+
option: '--ownerEmails [ownerEmails]'
|
|
219
|
+
}, {
|
|
220
|
+
option: '--memberUserNames [memberUserNames]'
|
|
221
|
+
}, {
|
|
222
|
+
option: '--memberIds [memberIds]'
|
|
223
|
+
}, {
|
|
224
|
+
option: '--memberEmails [memberEmails]'
|
|
225
|
+
});
|
|
226
|
+
}, _TeamsTeamAddCommand_initValidators = function _TeamsTeamAddCommand_initValidators() {
|
|
227
|
+
this.validators.push(async (args) => {
|
|
228
|
+
if (args.options.ownerUserNames) {
|
|
229
|
+
const isValidUserPrincipalNameArray = validation.isValidUserPrincipalNameArray(formatting.splitAndTrim(args.options.ownerUserNames));
|
|
230
|
+
if (isValidUserPrincipalNameArray !== true) {
|
|
231
|
+
return `Owner username '${isValidUserPrincipalNameArray}' is invalid for option 'ownerUserNames'.`;
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
if (args.options.ownerEmails) {
|
|
235
|
+
const isValidUserPrincipalNameArray = validation.isValidUserPrincipalNameArray(formatting.splitAndTrim(args.options.ownerEmails));
|
|
236
|
+
if (isValidUserPrincipalNameArray !== true) {
|
|
237
|
+
return `Owner email '${isValidUserPrincipalNameArray}' is invalid for option 'ownerEmails'.`;
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
if (args.options.ownerIds && !validation.isValidGuidArray(formatting.splitAndTrim(args.options.ownerIds))) {
|
|
241
|
+
return `The option 'ownerIds' contains one or more invalid GUIDs.`;
|
|
242
|
+
}
|
|
243
|
+
if (args.options.memberUserNames) {
|
|
244
|
+
const isValidUserPrincipalNameArray = validation.isValidUserPrincipalNameArray(formatting.splitAndTrim(args.options.memberUserNames));
|
|
245
|
+
if (isValidUserPrincipalNameArray !== true) {
|
|
246
|
+
return `Member username '${isValidUserPrincipalNameArray}' is invalid for option 'memberUserNames'.`;
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
if (args.options.memberEmails) {
|
|
250
|
+
const isValidUserPrincipalNameArray = validation.isValidUserPrincipalNameArray(formatting.splitAndTrim(args.options.memberEmails));
|
|
251
|
+
if (isValidUserPrincipalNameArray !== true) {
|
|
252
|
+
return `Member email '${isValidUserPrincipalNameArray}' is invalid for option 'memberEmails'.`;
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
if (args.options.memberIds && !validation.isValidGuidArray(formatting.splitAndTrim(args.options.memberIds))) {
|
|
256
|
+
return `The option 'memberIds' contains one or more invalid GUIDs`;
|
|
257
|
+
}
|
|
258
|
+
return true;
|
|
140
259
|
});
|
|
141
260
|
}, _TeamsTeamAddCommand_initOptionSets = function _TeamsTeamAddCommand_initOptionSets() {
|
|
142
261
|
this.optionSets.push({
|
|
@@ -149,6 +268,16 @@ _TeamsTeamAddCommand_instances = new WeakSet(), _TeamsTeamAddCommand_initTelemet
|
|
|
149
268
|
runsWhen: (args) => {
|
|
150
269
|
return !args.options.template;
|
|
151
270
|
}
|
|
271
|
+
}, {
|
|
272
|
+
options: ['ownerUserNames', 'ownerIds', 'ownerEmails'],
|
|
273
|
+
runsWhen: (args) => {
|
|
274
|
+
return args.options.ownerUserNames || args.options.ownerIds || args.options.ownerEmails;
|
|
275
|
+
}
|
|
276
|
+
}, {
|
|
277
|
+
options: ['memberUserNames', 'memberIds', 'memberEmails'],
|
|
278
|
+
runsWhen: (args) => {
|
|
279
|
+
return args.options.memberUserNames || args.options.memberIds || args.options.memberEmails;
|
|
280
|
+
}
|
|
152
281
|
});
|
|
153
282
|
};
|
|
154
283
|
export default new TeamsTeamAddCommand();
|
|
@@ -3,6 +3,9 @@ import { formatting } from '../../../../utils/formatting.js';
|
|
|
3
3
|
import GraphCommand from '../../../base/GraphCommand.js';
|
|
4
4
|
import commands from '../../commands.js';
|
|
5
5
|
class TenantReportOffice365ActivationCountsCommand extends GraphCommand {
|
|
6
|
+
get allowedOutputs() {
|
|
7
|
+
return ['json', 'csv'];
|
|
8
|
+
}
|
|
6
9
|
get name() {
|
|
7
10
|
return commands.REPORT_OFFICE365ACTIVATIONCOUNTS;
|
|
8
11
|
}
|
|
@@ -3,6 +3,9 @@ import { formatting } from '../../../../utils/formatting.js';
|
|
|
3
3
|
import GraphCommand from '../../../base/GraphCommand.js';
|
|
4
4
|
import commands from '../../commands.js';
|
|
5
5
|
class TenantReportOffice365ActivationsUserCountsCommand extends GraphCommand {
|
|
6
|
+
get allowedOutputs() {
|
|
7
|
+
return ['json', 'csv'];
|
|
8
|
+
}
|
|
6
9
|
get name() {
|
|
7
10
|
return commands.REPORT_OFFICE365ACTIVATIONSUSERCOUNTS;
|
|
8
11
|
}
|
|
@@ -3,6 +3,9 @@ import { formatting } from '../../../../utils/formatting.js';
|
|
|
3
3
|
import GraphCommand from '../../../base/GraphCommand.js';
|
|
4
4
|
import commands from '../../commands.js';
|
|
5
5
|
class TenantReportOffice365ActivationsUserDetailCommand extends GraphCommand {
|
|
6
|
+
get allowedOutputs() {
|
|
7
|
+
return ['json', 'csv'];
|
|
8
|
+
}
|
|
6
9
|
get name() {
|
|
7
10
|
return commands.REPORT_OFFICE365ACTIVATIONSUSERDETAIL;
|
|
8
11
|
}
|
package/dist/utils/entraUser.js
CHANGED
|
@@ -74,6 +74,42 @@ export const entraUser = {
|
|
|
74
74
|
}
|
|
75
75
|
return res.value[0].id;
|
|
76
76
|
},
|
|
77
|
+
/**
|
|
78
|
+
* Retrieve the IDs of users by their mail. There is no guarantee that the order of the returned IDs will match the order of the specified mails.
|
|
79
|
+
* @param emails Array of user mails.
|
|
80
|
+
* @returns Array of user IDs.
|
|
81
|
+
*/
|
|
82
|
+
async getUserIdsByEmails(emails) {
|
|
83
|
+
const userIds = [];
|
|
84
|
+
for (let i = 0; i < emails.length; i += 20) {
|
|
85
|
+
const emailsChunk = emails.slice(i, i + 20);
|
|
86
|
+
const requestOptions = {
|
|
87
|
+
url: `${graphResource}/v1.0/$batch`,
|
|
88
|
+
headers: {
|
|
89
|
+
accept: 'application/json;odata.metadata=none'
|
|
90
|
+
},
|
|
91
|
+
responseType: 'json',
|
|
92
|
+
data: {
|
|
93
|
+
requests: emailsChunk.map((email, index) => ({
|
|
94
|
+
id: index + 1,
|
|
95
|
+
method: 'GET',
|
|
96
|
+
url: `/users?$filter=mail eq '${formatting.encodeQueryParameter(email)}'&$select=id`,
|
|
97
|
+
headers: {
|
|
98
|
+
accept: 'application/json;odata.metadata=none'
|
|
99
|
+
}
|
|
100
|
+
}))
|
|
101
|
+
}
|
|
102
|
+
};
|
|
103
|
+
const res = await request.post(requestOptions);
|
|
104
|
+
for (const response of res.responses) {
|
|
105
|
+
if (response.status !== 200) {
|
|
106
|
+
throw Error(`The specified user with mail '${emailsChunk[response.id - 1]}' does not exist.`);
|
|
107
|
+
}
|
|
108
|
+
userIds.push(response.body.id);
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
return userIds;
|
|
112
|
+
},
|
|
77
113
|
/**
|
|
78
114
|
* Retrieve the UPN of a user by its ID.
|
|
79
115
|
* @param id User ID.
|
package/dist/utils/spo.js
CHANGED
|
@@ -4,7 +4,7 @@ import TabItem from '@theme/TabItem';
|
|
|
4
4
|
|
|
5
5
|
# app get
|
|
6
6
|
|
|
7
|
-
Retrieves information about the current
|
|
7
|
+
Retrieves information about the current Microsoft Entra app
|
|
8
8
|
|
|
9
9
|
## Usage
|
|
10
10
|
|
|
@@ -16,26 +16,26 @@ m365 app get [options]
|
|
|
16
16
|
|
|
17
17
|
```md definition-list
|
|
18
18
|
`--appId [appId]`
|
|
19
|
-
: Client ID of the
|
|
19
|
+
: Client ID of the Microsoft Entra app registered in the .m365rc.json file to retrieve information for.
|
|
20
20
|
```
|
|
21
21
|
|
|
22
22
|
<Global />
|
|
23
23
|
|
|
24
24
|
## Remarks
|
|
25
25
|
|
|
26
|
-
Use this command to quickly look up information for the
|
|
26
|
+
Use this command to quickly look up information for the Microsoft Entra application registration registered in the .m365rc.json file in your current project (folder).
|
|
27
27
|
|
|
28
28
|
If you have multiple apps registered in your .m365rc.json file, you can specify the app for which you'd like to retrieve permissions using the `--appId` option. If you don't specify the app using the `--appId` option, you'll be prompted to select one of the applications from your .m365rc.json file.
|
|
29
29
|
|
|
30
30
|
## Examples
|
|
31
31
|
|
|
32
|
-
Retrieve information about your current
|
|
32
|
+
Retrieve information about your current Microsoft Entra app.
|
|
33
33
|
|
|
34
34
|
```sh
|
|
35
35
|
m365 app get
|
|
36
36
|
```
|
|
37
37
|
|
|
38
|
-
Retrieve information about the
|
|
38
|
+
Retrieve information about the Microsoft Entra app with client ID specified in the _.m365rc.json_ file.
|
|
39
39
|
|
|
40
40
|
```sh
|
|
41
41
|
m365 app get --appId e23d235c-fcdf-45d1-ac5f-24ab2ee0695d
|
|
@@ -54,7 +54,7 @@ m365 app get --appId e23d235c-fcdf-45d1-ac5f-24ab2ee0695d
|
|
|
54
54
|
"applicationTemplateId": null,
|
|
55
55
|
"disabledByMicrosoftStatus": null,
|
|
56
56
|
"createdDateTime": "2022-10-28T21:20:57Z",
|
|
57
|
-
"displayName": "My
|
|
57
|
+
"displayName": "My Microsoft Entra app",
|
|
58
58
|
"description": null,
|
|
59
59
|
"groupMembershipClaims": null,
|
|
60
60
|
"identifierUris": [],
|
|
@@ -167,7 +167,7 @@ m365 app get --appId e23d235c-fcdf-45d1-ac5f-24ab2ee0695d
|
|
|
167
167
|
deletedDateTime : null
|
|
168
168
|
description : null
|
|
169
169
|
disabledByMicrosoftStatus : null
|
|
170
|
-
displayName : My
|
|
170
|
+
displayName : My Microsoft Entra app
|
|
171
171
|
groupMembershipClaims : null
|
|
172
172
|
id : b3241f2a-6551-43d4-a72f-0d02ccfeb77f
|
|
173
173
|
identifierUris : []
|
|
@@ -197,7 +197,7 @@ m365 app get --appId e23d235c-fcdf-45d1-ac5f-24ab2ee0695d
|
|
|
197
197
|
|
|
198
198
|
```csv
|
|
199
199
|
id,deletedDateTime,appId,applicationTemplateId,disabledByMicrosoftStatus,createdDateTime,displayName,description,groupMembershipClaims,identifierUris,isDeviceOnlyAuthSupported,isFallbackPublicClient,notes,publisherDomain,serviceManagementReference,signInAudience,tags,tokenEncryptionKeyId,samlMetadataUrl,defaultRedirectUri,certification,optionalClaims,addIns,api,appRoles,info,keyCredentials,parentalControlSettings,passwordCredentials,publicClient,requiredResourceAccess,verifiedPublisher,web,spa
|
|
200
|
-
b3241f2a-6551-43d4-a72f-0d02ccfeb77f,,02f9ff8c-b79e-4552-bdda-4facd74d6df1,,,2022-10-28T21:20:57Z,My
|
|
200
|
+
b3241f2a-6551-43d4-a72f-0d02ccfeb77f,,02f9ff8c-b79e-4552-bdda-4facd74d6df1,,,2022-10-28T21:20:57Z,My Microsoft Entra app,,,[],,,,contoso.onmicrosoft.com,,AzureADMyOrg,[],,,,,,[],"{""acceptMappedClaims"":null,""knownClientApplications"":[],""requestedAccessTokenVersion"":null,""oauth2PermissionScopes"":[],""preAuthorizedApplications"":[]}","[{""allowedMemberTypes"":[""User""],""description"":""Managers"",""displayName"":""Managers"",""id"":""d7c46856-8a66-485a-9047-098eba08b9a3"",""isEnabled"":true,""origin"":""Application"",""value"":""managers""}]","{""logoUrl"":null,""marketingUrl"":null,""privacyStatementUrl"":null,""supportUrl"":null,""termsOfServiceUrl"":null}",[],"{""countriesBlockedForMinors"":[],""legalAgeGroupRule"":""Allow""}",[],"{""redirectUris"":[]}","[{""resourceAppId"":""b55b276d-2b09-4ad2-8de5-f09cf24ffba9"",""resourceAccess"":[{""id"":""162b1576-a2b2-458d-b7b9-04481911b4ef"",""type"":""Role""}]},{""resourceAppId"":""00000005-0000-0ff1-ce00-000000000000"",""resourceAccess"":[{""id"":""8e5870bb-8808-44dc-8e10-c509ed919ddd"",""type"":""Scope""},{""id"":""5db81a03-0de0-432b-b31e-71d57c8d2e0b"",""type"":""Scope""}]}]","{""displayName"":null,""verifiedPublisherId"":null,""addedDateTime"":null}","{""homePageUrl"":null,""logoutUrl"":null,""redirectUris"":[],""implicitGrantSettings"":{""enableAccessTokenIssuance"":false,""enableIdTokenIssuance"":false},""redirectUriSettings"":[]}","{""redirectUris"":[]}"
|
|
201
201
|
```
|
|
202
202
|
|
|
203
203
|
</TabItem>
|
|
@@ -208,14 +208,14 @@ m365 app get --appId e23d235c-fcdf-45d1-ac5f-24ab2ee0695d
|
|
|
208
208
|
|
|
209
209
|
Date: 5/29/2023
|
|
210
210
|
|
|
211
|
-
## My
|
|
211
|
+
## My Microsoft Entra app (b3241f2a-6551-43d4-a72f-0d02ccfeb77f)
|
|
212
212
|
|
|
213
213
|
Property | Value
|
|
214
214
|
---------|-------
|
|
215
215
|
id | b3241f2a-6551-43d4-a72f-0d02ccfeb77f
|
|
216
216
|
appId | 02f9ff8c-b79e-4552-bdda-4facd74d6df1
|
|
217
217
|
createdDateTime | 2022-10-28T21:20:57Z
|
|
218
|
-
displayName | My
|
|
218
|
+
displayName | My Microsoft Entra app
|
|
219
219
|
publisherDomain | contoso.onmicrosoft.com
|
|
220
220
|
signInAudience | AzureADMyOrg
|
|
221
221
|
```
|
|
@@ -4,7 +4,7 @@ import TabItem from '@theme/TabItem';
|
|
|
4
4
|
|
|
5
5
|
# app open
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
Opens Microsoft Entra app in the Microsoft Entra ID portal
|
|
8
8
|
|
|
9
9
|
## Usage
|
|
10
10
|
|
|
@@ -16,10 +16,10 @@ m365 app open [options]
|
|
|
16
16
|
|
|
17
17
|
```md definition-list
|
|
18
18
|
`--appId [appId]`
|
|
19
|
-
: Optional Application (client) ID of the
|
|
19
|
+
: Optional Application (client) ID of the Microsoft Entra application registration to open. Uses the app from the `.m365rc.json` file corresponding to the `appId`. If multiple apps are available, this will evade the prompt to choose an app. If the `appId` is not available in the list of apps, an error is thrown.
|
|
20
20
|
|
|
21
21
|
`--preview`
|
|
22
|
-
: Use to open the url of the
|
|
22
|
+
: Use to open the url of the Microsoft Entra ID preview portal.
|
|
23
23
|
```
|
|
24
24
|
|
|
25
25
|
<Global />
|
|
@@ -32,19 +32,19 @@ Gets the app from the `.m365rc.json` file in the current directory. If the `--ap
|
|
|
32
32
|
|
|
33
33
|
## Examples
|
|
34
34
|
|
|
35
|
-
Prints the URL to the
|
|
35
|
+
Prints the URL to the Microsoft Entra application registration management page on the Azure Portal.
|
|
36
36
|
|
|
37
37
|
```sh
|
|
38
38
|
m365 app open
|
|
39
39
|
```
|
|
40
40
|
|
|
41
|
-
Prints the url of the
|
|
41
|
+
Prints the url of the Microsoft Entra application registration management page on the preview Azure Portal.
|
|
42
42
|
|
|
43
43
|
```sh
|
|
44
44
|
m365 app open --preview
|
|
45
45
|
```
|
|
46
46
|
|
|
47
|
-
Prints the URL to the
|
|
47
|
+
Prints the URL to the Microsoft Entra application registration management page on the Azure Portal, evading a possible choice prompt in the case of multiple saved apps in the `.m365rc.json` file.
|
|
48
48
|
|
|
49
49
|
```sh
|
|
50
50
|
m365 app open --appId d75be2e1-0204-4f95-857d-51a37cf40be8
|
|
@@ -2,7 +2,7 @@ import Global from '/docs/cmd/_global.mdx';
|
|
|
2
2
|
|
|
3
3
|
# app permission add
|
|
4
4
|
|
|
5
|
-
Adds the specified application and/or delegated permissions to the current
|
|
5
|
+
Adds the specified application and/or delegated permissions to the current Microsoft Entra app API permissions
|
|
6
6
|
|
|
7
7
|
## Usage
|
|
8
8
|
|
|
@@ -14,7 +14,7 @@ m365 app permission add [options]
|
|
|
14
14
|
|
|
15
15
|
```md definition-list
|
|
16
16
|
`--appId [appId]`
|
|
17
|
-
: Client ID of the
|
|
17
|
+
: Client ID of the Microsoft Entra app registered in the .m365rc.json file to retrieve API permissions for.
|
|
18
18
|
|
|
19
19
|
`--applicationPermission [applicationPermission]`
|
|
20
20
|
: Space-separated list of application permissions to add.
|
|
@@ -4,7 +4,7 @@ import TabItem from '@theme/TabItem';
|
|
|
4
4
|
|
|
5
5
|
# app permission list
|
|
6
6
|
|
|
7
|
-
Lists API permissions for the current
|
|
7
|
+
Lists API permissions for the current Microsoft Entra app
|
|
8
8
|
|
|
9
9
|
## Usage
|
|
10
10
|
|
|
@@ -16,26 +16,26 @@ m365 app permission list [options]
|
|
|
16
16
|
|
|
17
17
|
```md definition-list
|
|
18
18
|
`--appId [appId]`
|
|
19
|
-
: Client ID of the
|
|
19
|
+
: Client ID of the Microsoft Entra app registered in the .m365rc.json file to retrieve API permissions for.
|
|
20
20
|
```
|
|
21
21
|
|
|
22
22
|
<Global />
|
|
23
23
|
|
|
24
24
|
## Remarks
|
|
25
25
|
|
|
26
|
-
Use this command to quickly look up API permissions for the
|
|
26
|
+
Use this command to quickly look up API permissions for the Microsoft Entra application registration registered in the _.m365rc.json_ file in your current project (folder).
|
|
27
27
|
|
|
28
28
|
If you have multiple apps registered in your .m365rc.json file, you can specify the app for which you'd like to retrieve permissions using the `--appId` option. If you don't specify the app using the `--appId` option, you'll be prompted to select one of the applications from your _.m365rc.json_ file.
|
|
29
29
|
|
|
30
30
|
## Examples
|
|
31
31
|
|
|
32
|
-
Retrieve API permissions for your current
|
|
32
|
+
Retrieve API permissions for your current Microsoft Entra app.
|
|
33
33
|
|
|
34
34
|
```sh
|
|
35
35
|
m365 app permission list
|
|
36
36
|
```
|
|
37
37
|
|
|
38
|
-
Retrieve API permissions for the
|
|
38
|
+
Retrieve API permissions for the Microsoft Entra app with the client ID specified in the _.m365rc.json_ file.
|
|
39
39
|
|
|
40
40
|
```sh
|
|
41
41
|
m365 app permission list --appId e23d235c-fcdf-45d1-ac5f-24ab2ee0695d
|
|
@@ -4,7 +4,7 @@ import TabItem from '@theme/TabItem';
|
|
|
4
4
|
|
|
5
5
|
# cli consent
|
|
6
6
|
|
|
7
|
-
Consent additional permissions for the
|
|
7
|
+
Consent additional permissions for the Microsoft Entra application used by the CLI for Microsoft 365
|
|
8
8
|
|
|
9
9
|
## Usage
|
|
10
10
|
|
|
@@ -23,7 +23,7 @@ m365 cli consent [options]
|
|
|
23
23
|
|
|
24
24
|
## Remarks
|
|
25
25
|
|
|
26
|
-
Using the `cli consent` command you can consent additional permissions for the
|
|
26
|
+
Using the `cli consent` command you can consent additional permissions for the Microsoft Entra application used by the CLI for Microsoft 365. This is for example necessary to use Viva Engage commands, which require the Viva Engage API permission that isn't granted to the CLI by default.
|
|
27
27
|
|
|
28
28
|
After executing the command, the CLI for Microsoft 365 will present you with a URL that you need to open in the web browser in order to consent the permissions for the selected Microsoft 365 service.
|
|
29
29
|
|
|
@@ -4,7 +4,7 @@ import TabItem from '@theme/TabItem';
|
|
|
4
4
|
|
|
5
5
|
# cli reconsent
|
|
6
6
|
|
|
7
|
-
Returns
|
|
7
|
+
Returns URL to open in the browser to re-consent CLI for Microsoft 365 Microsoft Entra permissions
|
|
8
8
|
|
|
9
9
|
## Usage
|
|
10
10
|
|
|
@@ -30,28 +30,28 @@ m365 cli reconsent
|
|
|
30
30
|
<TabItem value="JSON">
|
|
31
31
|
|
|
32
32
|
```json
|
|
33
|
-
"To re-consent the PnP Microsoft 365 Management Shell
|
|
33
|
+
"To re-consent the PnP Microsoft 365 Management Shell Microsoft Entra application navigate in your web browser to https://login.microsoftonline.com/common/oauth2/authorize?client_id=31359c7f-bd7e-475c-86db-fdb8c937548e&response_type=code&prompt=admin_consent"
|
|
34
34
|
```
|
|
35
35
|
|
|
36
36
|
</TabItem>
|
|
37
37
|
<TabItem value="Text">
|
|
38
38
|
|
|
39
39
|
```text
|
|
40
|
-
To re-consent the PnP Microsoft 365 Management Shell
|
|
40
|
+
To re-consent the PnP Microsoft 365 Management Shell Microsoft Entra application navigate in your web browser to https://login.microsoftonline.com/common/oauth2/authorize?client_id=31359c7f-bd7e-475c-86db-fdb8c937548e&response_type=code&prompt=admin_consent
|
|
41
41
|
```
|
|
42
42
|
|
|
43
43
|
</TabItem>
|
|
44
44
|
<TabItem value="CSV">
|
|
45
45
|
|
|
46
46
|
```csv
|
|
47
|
-
To re-consent the PnP Microsoft 365 Management Shell
|
|
47
|
+
To re-consent the PnP Microsoft 365 Management Shell Microsoft Entra application navigate in your web browser to https://login.microsoftonline.com/common/oauth2/authorize?client_id=31359c7f-bd7e-475c-86db-fdb8c937548e&response_type=code&prompt=admin_consent
|
|
48
48
|
```
|
|
49
49
|
|
|
50
50
|
</TabItem>
|
|
51
51
|
<TabItem value="Markdown">
|
|
52
52
|
|
|
53
53
|
```md
|
|
54
|
-
To re-consent the PnP Microsoft 365 Management Shell
|
|
54
|
+
To re-consent the PnP Microsoft 365 Management Shell Microsoft Entra application navigate in your web browser to https://login.microsoftonline.com/common/oauth2/authorize?client_id=31359c7f-bd7e-475c-86db-fdb8c937548e&response_type=code&prompt=admin_consent
|
|
55
55
|
```
|
|
56
56
|
|
|
57
57
|
</TabItem>
|
|
@@ -59,4 +59,4 @@ m365 cli reconsent
|
|
|
59
59
|
|
|
60
60
|
## More information
|
|
61
61
|
|
|
62
|
-
- Re-consent the PnP Microsoft 365 Management Shell
|
|
62
|
+
- Re-consent the PnP Microsoft 365 Management Shell Microsoft Entra application: [https://pnp.github.io/cli-microsoft365/user-guide/connecting-microsoft-365/#re-consent-the-pnp-microsoft-365-management-shell-azure-ad-application](https://pnp.github.io/cli-microsoft365/user-guide/connecting-microsoft-365/#re-consent-the-pnp-microsoft-365-management-shell-azure-ad-application)
|
|
@@ -4,7 +4,7 @@ import TabItem from '@theme/TabItem';
|
|
|
4
4
|
|
|
5
5
|
# entra app permission add
|
|
6
6
|
|
|
7
|
-
Adds the specified application and/or delegated permissions to a
|
|
7
|
+
Adds the specified application and/or delegated permissions to a Microsoft Entra app
|
|
8
8
|
|
|
9
9
|
## Usage
|
|
10
10
|
|
|
@@ -23,10 +23,10 @@ m365 entra appregistration permission add [options]
|
|
|
23
23
|
|
|
24
24
|
```md definition-list
|
|
25
25
|
`-i, --appId [appId]`
|
|
26
|
-
: Client ID of the Entra
|
|
26
|
+
: Client ID of the Microsoft Entra app to add the API permissions to. Specify `appId` or `appObjectId` but not both.
|
|
27
27
|
|
|
28
28
|
`--appObjectId [appObjectId]`
|
|
29
|
-
: Object ID of the Entra
|
|
29
|
+
: Object ID of the Microsoft Entra app to add the API permissions to. Specify `appId` or `appObjectId` but not both.
|
|
30
30
|
|
|
31
31
|
`-a, --applicationPermissions [applicationPermissions]`
|
|
32
32
|
: Space-separated list of application permissions to add. Specify at least `applicationPermissions` or `delegatedPermissions`.
|
|
@@ -46,19 +46,19 @@ Scopes/Roles to grant must be fully-qualified so that we can disambiguate them b
|
|
|
46
46
|
|
|
47
47
|
## Examples
|
|
48
48
|
|
|
49
|
-
Grant multiple delegated API permissions to
|
|
49
|
+
Grant multiple delegated API permissions to a Microsoft Entra app specified by client id.
|
|
50
50
|
|
|
51
51
|
```sh
|
|
52
52
|
m365 entra app permission add --appId 'f1417aa3-bf0b-4cc5-a845-a0b2cf11f690' --delegatedPermissions 'https://management.azure.com/user_impersonation https://service.flow.microsoft.com/Flows.Read.All https://graph.microsoft.com/Agreement.Read.All'
|
|
53
53
|
```
|
|
54
54
|
|
|
55
|
-
Grant multiple delegated API permissions to
|
|
55
|
+
Grant multiple delegated API permissions to a Microsoft Entra app specified by object id.
|
|
56
56
|
|
|
57
57
|
```sh
|
|
58
58
|
m365 entra app permission add --appObjectId 'e0306bb2-bf0b-4cc5-a845-a0b2cf11f690' --delegatedPermissions 'https://management.azure.com/user_impersonation https://service.flow.microsoft.com/Flows.Read.All https://graph.microsoft.com/Agreement.Read.All'
|
|
59
59
|
```
|
|
60
60
|
|
|
61
|
-
Grant multiple app-only permissions to
|
|
61
|
+
Grant multiple app-only permissions to a Microsoft Entra app specified by client id and grant admin consent.
|
|
62
62
|
|
|
63
63
|
```sh
|
|
64
64
|
m365 entra app permission add --appId 'f1417aa3-bf0b-4cc5-a845-a0b2cf11f690' --applicationPermissions 'https://graph.microsoft.com/Sites.FullControl.All https://microsoft.sharepoint-df.com/Sites.FullControl.All' --grantAdminConsent
|
|
@@ -4,7 +4,7 @@ import TabItem from '@theme/TabItem';
|
|
|
4
4
|
|
|
5
5
|
# entra approleassignment add
|
|
6
6
|
|
|
7
|
-
Adds service principal permissions also known as scopes and app role assignments for specified Entra application registration
|
|
7
|
+
Adds service principal permissions also known as scopes and app role assignments for specified Microsoft Entra application registration
|
|
8
8
|
|
|
9
9
|
## Usage
|
|
10
10
|
|
|
@@ -57,10 +57,6 @@ List app roles assigned to service principal with ObjectId _b2307a39-e878-458b-b
|
|
|
57
57
|
m365 entra approleassignment list --appObjectId b2307a39-e878-458b-bc90-03bc578531dd
|
|
58
58
|
```
|
|
59
59
|
|
|
60
|
-
## More information
|
|
61
|
-
|
|
62
|
-
- Application and service principal objects in Entra ID (Azure AD): [https://learn.microsoft.com/azure/active-directory/develop/active-directory-application-objects](https://learn.microsoft.com/azure/active-directory/develop/active-directory-application-objects)
|
|
63
|
-
|
|
64
60
|
## Response
|
|
65
61
|
|
|
66
62
|
<Tabs>
|
|
@@ -117,3 +113,7 @@ m365 entra approleassignment list --appObjectId b2307a39-e878-458b-bc90-03bc5785
|
|
|
117
113
|
|
|
118
114
|
</TabItem>
|
|
119
115
|
</Tabs>
|
|
116
|
+
|
|
117
|
+
## More information
|
|
118
|
+
|
|
119
|
+
- Application and service principal objects in Microsoft Entra ID: [https://learn.microsoft.com/azure/active-directory/develop/active-directory-application-objects](https://learn.microsoft.com/azure/active-directory/develop/active-directory-application-objects)
|
|
@@ -196,5 +196,5 @@ m365 entra enterpriseapp add --objectId b2307a39-e878-458b-bc90-03bc578531d6
|
|
|
196
196
|
|
|
197
197
|
## More information
|
|
198
198
|
|
|
199
|
-
- Application and
|
|
199
|
+
- Application and service principal objects in Microsoft Entra ID: [https://learn.microsoft.com/azure/active-directory/develop/active-directory-application-objects](https://learn.microsoft.com/azure/active-directory/develop/active-directory-application-objects)
|
|
200
200
|
- Create servicePrincipal: [https://learn.microsoft.com/graph/api/serviceprincipal-post-serviceprincipals?view=graph-rest-1.0](https://learn.microsoft.com/graph/api/serviceprincipal-post-serviceprincipals?view=graph-rest-1.0)
|