@pnp/cli-microsoft365 7.4.0 → 7.5.0-beta.d4d820f
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/m365/app/commands/app-get.js +2 -2
- package/dist/m365/entra/commands/administrativeunit/administrativeunit-get.js +2 -2
- package/dist/m365/entra/commands/administrativeunit/administrativeunit-member-add.js +8 -8
- package/dist/m365/entra/commands/administrativeunit/administrativeunit-member-get.js +2 -2
- package/dist/m365/entra/commands/administrativeunit/administrativeunit-member-list.js +2 -2
- package/dist/m365/entra/commands/administrativeunit/administrativeunit-remove.js +2 -2
- package/dist/m365/entra/commands/administrativeunit/administrativeunit-roleassignment-add.js +4 -4
- package/dist/m365/entra/commands/app/app-permission-add.js +3 -7
- package/dist/m365/entra/commands/group/group-get.js +3 -3
- package/dist/m365/entra/commands/group/group-remove.js +2 -2
- package/dist/m365/entra/commands/group/group-user-list.js +2 -2
- package/dist/m365/entra/commands/m365group/m365group-conversation-list.js +2 -2
- package/dist/m365/entra/commands/m365group/m365group-conversation-post-list.js +3 -3
- package/dist/m365/entra/commands/m365group/m365group-get.js +3 -3
- package/dist/m365/entra/commands/m365group/m365group-remove.js +2 -2
- package/dist/m365/entra/commands/m365group/m365group-renew.js +2 -2
- package/dist/m365/entra/commands/m365group/m365group-set.js +2 -2
- package/dist/m365/entra/commands/m365group/m365group-teamify.js +2 -2
- package/dist/m365/entra/commands/m365group/m365group-user-add.js +2 -2
- package/dist/m365/entra/commands/m365group/m365group-user-list.js +3 -3
- package/dist/m365/entra/commands/m365group/m365group-user-remove.js +2 -2
- package/dist/m365/entra/commands/m365group/m365group-user-set.js +2 -2
- package/dist/m365/flow/commands/owner/owner-ensure.js +4 -4
- package/dist/m365/flow/commands/owner/owner-remove.js +4 -4
- package/dist/m365/onenote/commands/notebook/notebook-list.js +2 -2
- package/dist/m365/onenote/commands/page/page-list.js +2 -2
- package/dist/m365/pa/commands/app/app-owner-set.js +2 -2
- package/dist/m365/pa/commands/app/app-permission-ensure.js +4 -4
- package/dist/m365/pa/commands/app/app-permission-remove.js +4 -4
- package/dist/m365/planner/commands/bucket/bucket-add.js +2 -2
- package/dist/m365/planner/commands/bucket/bucket-get.js +2 -2
- package/dist/m365/planner/commands/bucket/bucket-list.js +2 -2
- package/dist/m365/planner/commands/bucket/bucket-remove.js +2 -2
- package/dist/m365/planner/commands/bucket/bucket-set.js +2 -2
- package/dist/m365/planner/commands/plan/plan-add.js +2 -2
- package/dist/m365/planner/commands/plan/plan-get.js +2 -2
- package/dist/m365/planner/commands/plan/plan-list.js +2 -2
- package/dist/m365/planner/commands/plan/plan-remove.js +2 -2
- package/dist/m365/planner/commands/plan/plan-set.js +2 -2
- package/dist/m365/planner/commands/roster/roster-member-add.js +2 -2
- package/dist/m365/planner/commands/roster/roster-member-get.js +2 -2
- package/dist/m365/planner/commands/roster/roster-member-remove.js +2 -2
- package/dist/m365/planner/commands/task/task-add.js +2 -2
- package/dist/m365/planner/commands/task/task-get.js +2 -2
- package/dist/m365/planner/commands/task/task-list.js +2 -2
- package/dist/m365/planner/commands/task/task-remove.js +2 -2
- package/dist/m365/planner/commands/task/task-set.js +2 -2
- package/dist/m365/spfx/commands/project/project-github-workflow-add.js +1 -1
- package/dist/m365/spo/commands/group/group-member-add.js +4 -4
- package/dist/m365/spo/commands/group/group-member-remove.js +2 -2
- package/dist/m365/spo/commands/group/group-set.js +2 -2
- package/dist/m365/spo/commands/site/site-remove.js +2 -2
- package/dist/m365/spo/commands/site/site-set.js +2 -2
- package/dist/m365/spo/commands/user/user-ensure.js +2 -2
- package/dist/m365/teams/commands/app/app-install.js +2 -2
- package/dist/m365/teams/commands/channel/channel-get.js +2 -2
- package/dist/m365/teams/commands/channel/channel-list.js +2 -2
- package/dist/m365/teams/commands/channel/channel-member-add.js +2 -2
- package/dist/m365/teams/commands/channel/channel-member-list.js +2 -2
- package/dist/m365/teams/commands/channel/channel-member-remove.js +2 -2
- package/dist/m365/teams/commands/channel/channel-member-set.js +2 -2
- package/dist/m365/teams/commands/channel/channel-remove.js +2 -2
- package/dist/m365/teams/commands/channel/channel-set.js +2 -2
- package/dist/m365/teams/commands/meeting/meeting-add.js +2 -2
- package/dist/m365/teams/commands/meeting/meeting-attendancereport-list.js +2 -2
- package/dist/m365/teams/commands/meeting/meeting-get.js +3 -3
- package/dist/m365/teams/commands/meeting/meeting-list.js +2 -2
- package/dist/m365/teams/commands/meeting/meeting-transcript-list.js +2 -2
- package/dist/m365/teams/commands/tab/tab-get.js +2 -2
- package/dist/m365/teams/commands/team/team-add.js +6 -6
- package/dist/m365/teams/commands/team/team-archive.js +2 -2
- package/dist/m365/teams/commands/team/team-get.js +2 -2
- package/dist/m365/teams/commands/team/team-remove.js +2 -2
- package/dist/m365/teams/commands/team/team-unarchive.js +2 -2
- package/dist/utils/{aadAdministrativeUnit.js → entraAdministrativeUnit.js} +2 -2
- package/dist/utils/{aadDevice.js → entraDevice.js} +2 -2
- package/dist/utils/{aadGroup.js → entraGroup.js} +2 -2
- package/dist/utils/{aadUser.js → entraUser.js} +2 -2
- package/dist/utils/spo.js +2 -2
- package/docs/docs/cmd/entra/app/app-permission-add.mdx +2 -2
- package/docs/docs/cmd/spo/listitem/listitem-list.mdx +1 -1
- package/npm-shrinkwrap.json +2 -2
- package/package.json +2 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { cli } from '../../../cli/cli.js';
|
|
2
|
-
import
|
|
2
|
+
import entraAppGetCommand from '../../entra/commands/app/app-get.js';
|
|
3
3
|
import AppCommand from '../../base/AppCommand.js';
|
|
4
4
|
import commands from '../commands.js';
|
|
5
5
|
class AppGetCommand extends AppCommand {
|
|
@@ -17,7 +17,7 @@ class AppGetCommand extends AppCommand {
|
|
|
17
17
|
verbose: args.options.verbose
|
|
18
18
|
};
|
|
19
19
|
try {
|
|
20
|
-
const appGetOutput = await cli.executeCommandWithOutput(
|
|
20
|
+
const appGetOutput = await cli.executeCommandWithOutput(entraAppGetCommand, { options: { ...options, _: [] } });
|
|
21
21
|
if (this.verbose) {
|
|
22
22
|
await logger.logToStderr(appGetOutput.stderr);
|
|
23
23
|
}
|
|
@@ -8,7 +8,7 @@ import { validation } from "../../../../utils/validation.js";
|
|
|
8
8
|
import request from "../../../../request.js";
|
|
9
9
|
import GraphCommand from "../../../base/GraphCommand.js";
|
|
10
10
|
import commands from "../../commands.js";
|
|
11
|
-
import {
|
|
11
|
+
import { entraAdministrativeUnit } from "../../../../utils/entraAdministrativeUnit.js";
|
|
12
12
|
import aadCommands from "../../aadCommands.js";
|
|
13
13
|
class EntraAdministrativeUnitGetCommand extends GraphCommand {
|
|
14
14
|
get name() {
|
|
@@ -36,7 +36,7 @@ class EntraAdministrativeUnitGetCommand extends GraphCommand {
|
|
|
36
36
|
administrativeUnit = await this.getAdministrativeUnitById(args.options.id);
|
|
37
37
|
}
|
|
38
38
|
else {
|
|
39
|
-
administrativeUnit = await
|
|
39
|
+
administrativeUnit = await entraAdministrativeUnit.getAdministrativeUnitByDisplayName(args.options.displayName);
|
|
40
40
|
}
|
|
41
41
|
await logger.log(administrativeUnit);
|
|
42
42
|
}
|
|
@@ -4,14 +4,14 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
4
4
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
5
5
|
};
|
|
6
6
|
var _EntraAdministrativeUnitMemberAddCommand_instances, _EntraAdministrativeUnitMemberAddCommand_initTelemetry, _EntraAdministrativeUnitMemberAddCommand_initOptions, _EntraAdministrativeUnitMemberAddCommand_initValidators, _EntraAdministrativeUnitMemberAddCommand_initOptionSets;
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
7
|
+
import { entraAdministrativeUnit } from "../../../../utils/entraAdministrativeUnit.js";
|
|
8
|
+
import { entraGroup } from "../../../../utils/entraGroup.js";
|
|
9
|
+
import { entraUser } from "../../../../utils/entraUser.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
13
|
import request from "../../../../request.js";
|
|
14
|
-
import {
|
|
14
|
+
import { entraDevice } from "../../../../utils/entraDevice.js";
|
|
15
15
|
import aadCommands from "../../aadCommands.js";
|
|
16
16
|
class EntraAdministrativeUnitMemberAddCommand extends GraphCommand {
|
|
17
17
|
get name() {
|
|
@@ -40,7 +40,7 @@ class EntraAdministrativeUnitMemberAddCommand extends GraphCommand {
|
|
|
40
40
|
if (this.verbose) {
|
|
41
41
|
await logger.logToStderr(`Retrieving Administrative Unit Id...`);
|
|
42
42
|
}
|
|
43
|
-
administrativeUnitId = (await
|
|
43
|
+
administrativeUnitId = (await entraAdministrativeUnit.getAdministrativeUnitByDisplayName(args.options.administrativeUnitName)).id;
|
|
44
44
|
}
|
|
45
45
|
if (args.options.userId || args.options.userName) {
|
|
46
46
|
memberType = 'users';
|
|
@@ -49,7 +49,7 @@ class EntraAdministrativeUnitMemberAddCommand extends GraphCommand {
|
|
|
49
49
|
if (this.verbose) {
|
|
50
50
|
await logger.logToStderr(`Retrieving User Id...`);
|
|
51
51
|
}
|
|
52
|
-
memberId = await
|
|
52
|
+
memberId = await entraUser.getUserIdByUpn(args.options.userName);
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
55
|
else if (args.options.groupId || args.options.groupName) {
|
|
@@ -59,7 +59,7 @@ class EntraAdministrativeUnitMemberAddCommand extends GraphCommand {
|
|
|
59
59
|
if (this.verbose) {
|
|
60
60
|
await logger.logToStderr(`Retrieving Group Id...`);
|
|
61
61
|
}
|
|
62
|
-
memberId = await
|
|
62
|
+
memberId = await entraGroup.getGroupIdByDisplayName(args.options.groupName);
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
65
|
else if (args.options.deviceId || args.options.deviceName) {
|
|
@@ -69,7 +69,7 @@ class EntraAdministrativeUnitMemberAddCommand extends GraphCommand {
|
|
|
69
69
|
if (this.verbose) {
|
|
70
70
|
await logger.logToStderr(`Device with name ${args.options.deviceName} retrieved, returned id: ${memberId}`);
|
|
71
71
|
}
|
|
72
|
-
memberId = (await
|
|
72
|
+
memberId = (await entraDevice.getDeviceByDisplayName(args.options.deviceName)).id;
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
75
|
const requestOptions = {
|
|
@@ -7,7 +7,7 @@ var _EntraAdministrativeUnitMemberGetCommand_instances, _EntraAdministrativeUnit
|
|
|
7
7
|
import GraphCommand from '../../../base/GraphCommand.js';
|
|
8
8
|
import commands from '../../commands.js';
|
|
9
9
|
import { validation } from '../../../../utils/validation.js';
|
|
10
|
-
import {
|
|
10
|
+
import { entraAdministrativeUnit } from '../../../../utils/entraAdministrativeUnit.js';
|
|
11
11
|
import request from '../../../../request.js';
|
|
12
12
|
import aadCommands from '../../aadCommands.js';
|
|
13
13
|
class EntraAdministrativeUnitMemberGetCommand extends GraphCommand {
|
|
@@ -35,7 +35,7 @@ class EntraAdministrativeUnitMemberGetCommand extends GraphCommand {
|
|
|
35
35
|
if (this.verbose) {
|
|
36
36
|
await logger.logToStderr(`Retrieving Administrative Unit Id...`);
|
|
37
37
|
}
|
|
38
|
-
administrativeUnitId = (await
|
|
38
|
+
administrativeUnitId = (await entraAdministrativeUnit.getAdministrativeUnitByDisplayName(args.options.administrativeUnitName)).id;
|
|
39
39
|
}
|
|
40
40
|
const url = this.getRequestUrl(administrativeUnitId, args.options.id, args.options);
|
|
41
41
|
const requestOptions = {
|
|
@@ -7,7 +7,7 @@ var _EntraAdministrativeUnitMemberListCommand_instances, _EntraAdministrativeUni
|
|
|
7
7
|
import { odata } from '../../../../utils/odata.js';
|
|
8
8
|
import GraphCommand from '../../../base/GraphCommand.js';
|
|
9
9
|
import commands from '../../commands.js';
|
|
10
|
-
import {
|
|
10
|
+
import { entraAdministrativeUnit } from '../../../../utils/entraAdministrativeUnit.js';
|
|
11
11
|
import { validation } from '../../../../utils/validation.js';
|
|
12
12
|
import aadCommands from '../../aadCommands.js';
|
|
13
13
|
class EntraAdministrativeUnitMemberListCommand extends GraphCommand {
|
|
@@ -35,7 +35,7 @@ class EntraAdministrativeUnitMemberListCommand extends GraphCommand {
|
|
|
35
35
|
let administrativeUnitId = args.options.administrativeUnitId;
|
|
36
36
|
try {
|
|
37
37
|
if (args.options.administrativeUnitName) {
|
|
38
|
-
administrativeUnitId = (await
|
|
38
|
+
administrativeUnitId = (await entraAdministrativeUnit.getAdministrativeUnitByDisplayName(args.options.administrativeUnitName)).id;
|
|
39
39
|
}
|
|
40
40
|
let results;
|
|
41
41
|
const endpoint = this.getRequestUrl(administrativeUnitId, args.options);
|
|
@@ -4,7 +4,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
4
4
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
5
5
|
};
|
|
6
6
|
var _EntraAdministrativeUnitRemoveCommand_instances, _EntraAdministrativeUnitRemoveCommand_initTelemetry, _EntraAdministrativeUnitRemoveCommand_initOptions, _EntraAdministrativeUnitRemoveCommand_initOptionSets, _EntraAdministrativeUnitRemoveCommand_initValidators, _EntraAdministrativeUnitRemoveCommand_initTypes;
|
|
7
|
-
import {
|
|
7
|
+
import { entraAdministrativeUnit } from '../../../../utils/entraAdministrativeUnit.js';
|
|
8
8
|
import { validation } from "../../../../utils/validation.js";
|
|
9
9
|
import request from "../../../../request.js";
|
|
10
10
|
import GraphCommand from "../../../base/GraphCommand.js";
|
|
@@ -35,7 +35,7 @@ class EntraAdministrativeUnitRemoveCommand extends GraphCommand {
|
|
|
35
35
|
try {
|
|
36
36
|
let administrativeUnitId = args.options.id;
|
|
37
37
|
if (args.options.displayName) {
|
|
38
|
-
const administrativeUnit = await
|
|
38
|
+
const administrativeUnit = await entraAdministrativeUnit.getAdministrativeUnitByDisplayName(args.options.displayName);
|
|
39
39
|
administrativeUnitId = administrativeUnit.id;
|
|
40
40
|
}
|
|
41
41
|
const requestOptions = {
|
package/dist/m365/entra/commands/administrativeunit/administrativeunit-roleassignment-add.js
CHANGED
|
@@ -4,8 +4,8 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
4
4
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
5
5
|
};
|
|
6
6
|
var _EntraAdministrativeUnitRoleAssignmentAddCommand_instances, _EntraAdministrativeUnitRoleAssignmentAddCommand_initTelemetry, _EntraAdministrativeUnitRoleAssignmentAddCommand_initOptions, _EntraAdministrativeUnitRoleAssignmentAddCommand_initValidators, _EntraAdministrativeUnitRoleAssignmentAddCommand_initOptionSets;
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
7
|
+
import { entraAdministrativeUnit } from '../../../../utils/entraAdministrativeUnit.js';
|
|
8
|
+
import { entraUser } from '../../../../utils/entraUser.js';
|
|
9
9
|
import { roleAssignment } from '../../../../utils/roleAssignment.js';
|
|
10
10
|
import { roleDefinition } from '../../../../utils/roleDefinition.js';
|
|
11
11
|
import { validation } from '../../../../utils/validation.js';
|
|
@@ -33,7 +33,7 @@ class EntraAdministrativeUnitRoleAssignmentAddCommand extends GraphCommand {
|
|
|
33
33
|
if (this.verbose) {
|
|
34
34
|
await logger.logToStderr(`Retrieving administrative unit by its name '${args.options.administrativeUnitName}'`);
|
|
35
35
|
}
|
|
36
|
-
administrativeUnitId = (await
|
|
36
|
+
administrativeUnitId = (await entraAdministrativeUnit.getAdministrativeUnitByDisplayName(args.options.administrativeUnitName)).id;
|
|
37
37
|
}
|
|
38
38
|
if (args.options.roleDefinitionName) {
|
|
39
39
|
if (this.verbose) {
|
|
@@ -45,7 +45,7 @@ class EntraAdministrativeUnitRoleAssignmentAddCommand extends GraphCommand {
|
|
|
45
45
|
if (this.verbose) {
|
|
46
46
|
await logger.logToStderr(`Retrieving user by UPN '${args.options.userName}'`);
|
|
47
47
|
}
|
|
48
|
-
userId = await
|
|
48
|
+
userId = await entraUser.getUserIdByUpn(args.options.userName);
|
|
49
49
|
}
|
|
50
50
|
const unifiedRoleAssignment = await roleAssignment.createRoleAssignmentWithAdministrativeUnitScope(roleDefinitionId, userId, administrativeUnitId);
|
|
51
51
|
await logger.log(unifiedRoleAssignment);
|
|
@@ -67,13 +67,9 @@ class EntraAppPermissionAddCommand extends GraphCommand {
|
|
|
67
67
|
}
|
|
68
68
|
}
|
|
69
69
|
async getAppObject(options) {
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
}
|
|
74
|
-
else {
|
|
75
|
-
apps = await odata.getAllItems(`${this.resource}/v1.0/applications(appId='${options.appId}')?$select=id,appId,requiredResourceAccess`);
|
|
76
|
-
}
|
|
70
|
+
const apps = options.appObjectId
|
|
71
|
+
? await odata.getAllItems(`${this.resource}/v1.0/applications?$filter=id eq '${options.appObjectId}'&$select=id,appId,requiredResourceAccess`)
|
|
72
|
+
: await odata.getAllItems(`${this.resource}/v1.0/applications?$filter=appId eq '${options.appId}'&$select=id,appId,requiredResourceAccess`);
|
|
77
73
|
if (apps.length === 0) {
|
|
78
74
|
throw `App with ${options.appObjectId ? 'object id' : 'client id'} ${options.appObjectId ? options.appObjectId : options.appId} not found in Entra ID (Azure AD)`;
|
|
79
75
|
}
|
|
@@ -4,7 +4,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
4
4
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
5
5
|
};
|
|
6
6
|
var _EntraGroupGetCommand_instances, _EntraGroupGetCommand_initOptions, _EntraGroupGetCommand_initValidators, _EntraGroupGetCommand_initOptionSets, _EntraGroupGetCommand_initTelemetry;
|
|
7
|
-
import {
|
|
7
|
+
import { entraGroup } from '../../../../utils/entraGroup.js';
|
|
8
8
|
import { validation } from '../../../../utils/validation.js';
|
|
9
9
|
import GraphCommand from '../../../base/GraphCommand.js';
|
|
10
10
|
import commands from '../../commands.js';
|
|
@@ -31,10 +31,10 @@ class EntraGroupGetCommand extends GraphCommand {
|
|
|
31
31
|
let group;
|
|
32
32
|
try {
|
|
33
33
|
if (args.options.id) {
|
|
34
|
-
group = await
|
|
34
|
+
group = await entraGroup.getGroupById(args.options.id);
|
|
35
35
|
}
|
|
36
36
|
else {
|
|
37
|
-
group = await
|
|
37
|
+
group = await entraGroup.getGroupByDisplayName(args.options.displayName);
|
|
38
38
|
}
|
|
39
39
|
await logger.log(group);
|
|
40
40
|
}
|
|
@@ -8,7 +8,7 @@ import { cli } from '../../../../cli/cli.js';
|
|
|
8
8
|
import GraphCommand from '../../../base/GraphCommand.js';
|
|
9
9
|
import commands from '../../commands.js';
|
|
10
10
|
import request from '../../../../request.js';
|
|
11
|
-
import {
|
|
11
|
+
import { entraGroup } from '../../../../utils/entraGroup.js';
|
|
12
12
|
import { validation } from '../../../../utils/validation.js';
|
|
13
13
|
import aadCommands from '../../aadCommands.js';
|
|
14
14
|
class EntraGroupRemoveCommand extends GraphCommand {
|
|
@@ -38,7 +38,7 @@ class EntraGroupRemoveCommand extends GraphCommand {
|
|
|
38
38
|
try {
|
|
39
39
|
let groupId = args.options.id;
|
|
40
40
|
if (args.options.displayName) {
|
|
41
|
-
groupId = await
|
|
41
|
+
groupId = await entraGroup.getGroupIdByDisplayName(args.options.displayName);
|
|
42
42
|
}
|
|
43
43
|
const requestOptions = {
|
|
44
44
|
url: `${this.resource}/v1.0/groups/${groupId}`,
|
|
@@ -4,7 +4,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
4
4
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
5
5
|
};
|
|
6
6
|
var _EntraGroupUserListCommand_instances, _EntraGroupUserListCommand_initTelemetry, _EntraGroupUserListCommand_initOptions, _EntraGroupUserListCommand_initOptionSets, _EntraGroupUserListCommand_initValidators;
|
|
7
|
-
import {
|
|
7
|
+
import { entraGroup } from '../../../../utils/entraGroup.js';
|
|
8
8
|
import { odata } from '../../../../utils/odata.js';
|
|
9
9
|
import { validation } from '../../../../utils/validation.js';
|
|
10
10
|
import GraphCommand from '../../../base/GraphCommand.js';
|
|
@@ -64,7 +64,7 @@ class EntraGroupUserListCommand extends GraphCommand {
|
|
|
64
64
|
if (this.verbose) {
|
|
65
65
|
await logger.logToStderr('Retrieving Group Id...');
|
|
66
66
|
}
|
|
67
|
-
return await
|
|
67
|
+
return await entraGroup.getGroupIdByDisplayName(options.groupDisplayName);
|
|
68
68
|
}
|
|
69
69
|
async getUsers(options, role, groupId, logger) {
|
|
70
70
|
const { properties, filter } = options;
|
|
@@ -8,7 +8,7 @@ import { odata } from '../../../../utils/odata.js';
|
|
|
8
8
|
import { validation } from '../../../../utils/validation.js';
|
|
9
9
|
import GraphCommand from '../../../base/GraphCommand.js';
|
|
10
10
|
import commands from '../../commands.js';
|
|
11
|
-
import {
|
|
11
|
+
import { entraGroup } from '../../../../utils/entraGroup.js';
|
|
12
12
|
import aadCommands from '../../aadCommands.js';
|
|
13
13
|
class EntraM365GroupConversationListCommand extends GraphCommand {
|
|
14
14
|
get name() {
|
|
@@ -31,7 +31,7 @@ class EntraM365GroupConversationListCommand extends GraphCommand {
|
|
|
31
31
|
}
|
|
32
32
|
async commandAction(logger, args) {
|
|
33
33
|
try {
|
|
34
|
-
const isUnifiedGroup = await
|
|
34
|
+
const isUnifiedGroup = await entraGroup.isUnifiedGroup(args.options.groupId);
|
|
35
35
|
if (!isUnifiedGroup) {
|
|
36
36
|
throw Error(`Specified group with id '${args.options.groupId}' is not a Microsoft 365 group.`);
|
|
37
37
|
}
|
|
@@ -4,7 +4,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
4
4
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
5
5
|
};
|
|
6
6
|
var _EntraM365GroupConversationPostListCommand_instances, _EntraM365GroupConversationPostListCommand_initTelemetry, _EntraM365GroupConversationPostListCommand_initOptions, _EntraM365GroupConversationPostListCommand_initValidators, _EntraM365GroupConversationPostListCommand_initOptionSets;
|
|
7
|
-
import {
|
|
7
|
+
import { entraGroup } from '../../../../utils/entraGroup.js';
|
|
8
8
|
import { formatting } from '../../../../utils/formatting.js';
|
|
9
9
|
import { odata } from '../../../../utils/odata.js';
|
|
10
10
|
import { validation } from '../../../../utils/validation.js';
|
|
@@ -35,7 +35,7 @@ class EntraM365GroupConversationPostListCommand extends GraphCommand {
|
|
|
35
35
|
async commandAction(logger, args) {
|
|
36
36
|
try {
|
|
37
37
|
const retrievedgroupId = await this.getGroupId(args);
|
|
38
|
-
const isUnifiedGroup = await
|
|
38
|
+
const isUnifiedGroup = await entraGroup.isUnifiedGroup(retrievedgroupId);
|
|
39
39
|
if (!isUnifiedGroup) {
|
|
40
40
|
throw Error(`Specified group with id '${retrievedgroupId}' is not a Microsoft 365 group.`);
|
|
41
41
|
}
|
|
@@ -50,7 +50,7 @@ class EntraM365GroupConversationPostListCommand extends GraphCommand {
|
|
|
50
50
|
if (args.options.groupId) {
|
|
51
51
|
return formatting.encodeQueryParameter(args.options.groupId);
|
|
52
52
|
}
|
|
53
|
-
const group = await
|
|
53
|
+
const group = await entraGroup.getGroupByDisplayName(args.options.groupDisplayName);
|
|
54
54
|
return group.id;
|
|
55
55
|
}
|
|
56
56
|
}
|
|
@@ -5,7 +5,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
5
5
|
};
|
|
6
6
|
var _EntraM365GroupGetCommand_instances, _EntraM365GroupGetCommand_initOptions, _EntraM365GroupGetCommand_initValidators;
|
|
7
7
|
import request from '../../../../request.js';
|
|
8
|
-
import {
|
|
8
|
+
import { entraGroup } from '../../../../utils/entraGroup.js';
|
|
9
9
|
import { validation } from '../../../../utils/validation.js';
|
|
10
10
|
import GraphCommand from '../../../base/GraphCommand.js';
|
|
11
11
|
import aadCommands from '../../aadCommands.js';
|
|
@@ -29,11 +29,11 @@ class EntraM365GroupGetCommand extends GraphCommand {
|
|
|
29
29
|
async commandAction(logger, args) {
|
|
30
30
|
let group;
|
|
31
31
|
try {
|
|
32
|
-
const isUnifiedGroup = await
|
|
32
|
+
const isUnifiedGroup = await entraGroup.isUnifiedGroup(args.options.id);
|
|
33
33
|
if (!isUnifiedGroup) {
|
|
34
34
|
throw Error(`Specified group with id '${args.options.id}' is not a Microsoft 365 group.`);
|
|
35
35
|
}
|
|
36
|
-
group = await
|
|
36
|
+
group = await entraGroup.getGroupById(args.options.id);
|
|
37
37
|
if (args.options.includeSiteUrl) {
|
|
38
38
|
const requestOptions = {
|
|
39
39
|
url: `${this.resource}/v1.0/groups/${group.id}/drive?$select=webUrl`,
|
|
@@ -6,7 +6,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
6
6
|
var _EntraM365GroupRemoveCommand_instances, _EntraM365GroupRemoveCommand_initTelemetry, _EntraM365GroupRemoveCommand_initOptions, _EntraM365GroupRemoveCommand_initValidators;
|
|
7
7
|
import { cli } from '../../../../cli/cli.js';
|
|
8
8
|
import request from '../../../../request.js';
|
|
9
|
-
import {
|
|
9
|
+
import { entraGroup } from '../../../../utils/entraGroup.js';
|
|
10
10
|
import { validation } from '../../../../utils/validation.js';
|
|
11
11
|
import GraphCommand from '../../../base/GraphCommand.js';
|
|
12
12
|
import commands from '../../commands.js';
|
|
@@ -39,7 +39,7 @@ class EntraM365GroupRemoveCommand extends GraphCommand {
|
|
|
39
39
|
await logger.logToStderr(`Removing Microsoft 365 Group: ${args.options.id}...`);
|
|
40
40
|
}
|
|
41
41
|
try {
|
|
42
|
-
const isUnifiedGroup = await
|
|
42
|
+
const isUnifiedGroup = await entraGroup.isUnifiedGroup(args.options.id);
|
|
43
43
|
if (!isUnifiedGroup) {
|
|
44
44
|
throw Error(`Specified group with id '${args.options.id}' is not a Microsoft 365 group.`);
|
|
45
45
|
}
|
|
@@ -5,7 +5,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
5
5
|
};
|
|
6
6
|
var _EntraM365GroupRenewCommand_instances, _EntraM365GroupRenewCommand_initOptions, _EntraM365GroupRenewCommand_initValidators;
|
|
7
7
|
import request from '../../../../request.js';
|
|
8
|
-
import {
|
|
8
|
+
import { entraGroup } from '../../../../utils/entraGroup.js';
|
|
9
9
|
import { validation } from '../../../../utils/validation.js';
|
|
10
10
|
import GraphCommand from '../../../base/GraphCommand.js';
|
|
11
11
|
import aadCommands from '../../aadCommands.js';
|
|
@@ -31,7 +31,7 @@ class EntraM365GroupRenewCommand extends GraphCommand {
|
|
|
31
31
|
await logger.logToStderr(`Renewing Microsoft 365 group's expiration: ${args.options.id}...`);
|
|
32
32
|
}
|
|
33
33
|
try {
|
|
34
|
-
const isUnifiedGroup = await
|
|
34
|
+
const isUnifiedGroup = await entraGroup.isUnifiedGroup(args.options.id);
|
|
35
35
|
if (!isUnifiedGroup) {
|
|
36
36
|
throw Error(`Specified group with id '${args.options.id}' is not a Microsoft 365 group.`);
|
|
37
37
|
}
|
|
@@ -11,7 +11,7 @@ import request from '../../../../request.js';
|
|
|
11
11
|
import { validation } from '../../../../utils/validation.js';
|
|
12
12
|
import GraphCommand from '../../../base/GraphCommand.js';
|
|
13
13
|
import commands from '../../commands.js';
|
|
14
|
-
import {
|
|
14
|
+
import { entraGroup } from '../../../../utils/entraGroup.js';
|
|
15
15
|
import aadCommands from '../../aadCommands.js';
|
|
16
16
|
class EntraM365GroupSetCommand extends GraphCommand {
|
|
17
17
|
get name() {
|
|
@@ -34,7 +34,7 @@ class EntraM365GroupSetCommand extends GraphCommand {
|
|
|
34
34
|
}
|
|
35
35
|
async commandAction(logger, args) {
|
|
36
36
|
try {
|
|
37
|
-
const isUnifiedGroup = await
|
|
37
|
+
const isUnifiedGroup = await entraGroup.isUnifiedGroup(args.options.id);
|
|
38
38
|
if (!isUnifiedGroup) {
|
|
39
39
|
throw Error(`Specified group with id '${args.options.id}' is not a Microsoft 365 group.`);
|
|
40
40
|
}
|
|
@@ -6,7 +6,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
6
6
|
var _EntraM365GroupTeamifyCommand_instances, _EntraM365GroupTeamifyCommand_initTelemetry, _EntraM365GroupTeamifyCommand_initOptions, _EntraM365GroupTeamifyCommand_initValidators, _EntraM365GroupTeamifyCommand_initOptionSets;
|
|
7
7
|
import { cli } from '../../../../cli/cli.js';
|
|
8
8
|
import request from '../../../../request.js';
|
|
9
|
-
import {
|
|
9
|
+
import { entraGroup } from '../../../../utils/entraGroup.js';
|
|
10
10
|
import { formatting } from '../../../../utils/formatting.js';
|
|
11
11
|
import { validation } from '../../../../utils/validation.js';
|
|
12
12
|
import GraphCommand from '../../../base/GraphCommand.js';
|
|
@@ -56,7 +56,7 @@ class EntraM365GroupTeamifyCommand extends GraphCommand {
|
|
|
56
56
|
async commandAction(logger, args) {
|
|
57
57
|
try {
|
|
58
58
|
const groupId = await this.getGroupId(args.options);
|
|
59
|
-
const isUnifiedGroup = await
|
|
59
|
+
const isUnifiedGroup = await entraGroup.isUnifiedGroup(groupId);
|
|
60
60
|
if (!isUnifiedGroup) {
|
|
61
61
|
throw Error(`Specified group with id '${groupId}' is not a Microsoft 365 group.`);
|
|
62
62
|
}
|
|
@@ -5,7 +5,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
5
5
|
};
|
|
6
6
|
var _EntraM365GroupUserAddCommand_instances, _EntraM365GroupUserAddCommand_initTelemetry, _EntraM365GroupUserAddCommand_initOptions, _EntraM365GroupUserAddCommand_initValidators, _EntraM365GroupUserAddCommand_initOptionSets;
|
|
7
7
|
import request from '../../../../request.js';
|
|
8
|
-
import {
|
|
8
|
+
import { entraGroup } from '../../../../utils/entraGroup.js';
|
|
9
9
|
import { formatting } from '../../../../utils/formatting.js';
|
|
10
10
|
import { validation } from '../../../../utils/validation.js';
|
|
11
11
|
import GraphCommand from '../../../base/GraphCommand.js';
|
|
@@ -33,7 +33,7 @@ class EntraM365GroupUserAddCommand extends GraphCommand {
|
|
|
33
33
|
async commandAction(logger, args) {
|
|
34
34
|
try {
|
|
35
35
|
const providedGroupId = (typeof args.options.groupId !== 'undefined') ? args.options.groupId : args.options.teamId;
|
|
36
|
-
const isUnifiedGroup = await
|
|
36
|
+
const isUnifiedGroup = await entraGroup.isUnifiedGroup(providedGroupId);
|
|
37
37
|
if (!isUnifiedGroup) {
|
|
38
38
|
throw Error(`Specified group with id '${providedGroupId}' is not a Microsoft 365 group.`);
|
|
39
39
|
}
|
|
@@ -8,7 +8,7 @@ import { odata } from '../../../../utils/odata.js';
|
|
|
8
8
|
import { validation } from '../../../../utils/validation.js';
|
|
9
9
|
import GraphCommand from '../../../base/GraphCommand.js';
|
|
10
10
|
import commands from '../../commands.js';
|
|
11
|
-
import {
|
|
11
|
+
import { entraGroup } from '../../../../utils/entraGroup.js';
|
|
12
12
|
import aadCommands from '../../aadCommands.js';
|
|
13
13
|
class EntraM365GroupUserListCommand extends GraphCommand {
|
|
14
14
|
get name() {
|
|
@@ -34,7 +34,7 @@ class EntraM365GroupUserListCommand extends GraphCommand {
|
|
|
34
34
|
this.warn(logger, `Value 'Guest' for the option role is deprecated. Use --filter "userType eq 'Guest'" instead.`);
|
|
35
35
|
}
|
|
36
36
|
const groupId = await this.getGroupId(args.options, logger);
|
|
37
|
-
const isUnifiedGroup = await
|
|
37
|
+
const isUnifiedGroup = await entraGroup.isUnifiedGroup(groupId);
|
|
38
38
|
if (!isUnifiedGroup) {
|
|
39
39
|
throw Error(`Specified group '${args.options.groupId || args.options.groupDisplayName}' is not a Microsoft 365 group.`);
|
|
40
40
|
}
|
|
@@ -71,7 +71,7 @@ class EntraM365GroupUserListCommand extends GraphCommand {
|
|
|
71
71
|
if (this.verbose) {
|
|
72
72
|
await logger.logToStderr('Retrieving Group Id...');
|
|
73
73
|
}
|
|
74
|
-
return await
|
|
74
|
+
return await entraGroup.getGroupIdByDisplayName(options.groupDisplayName);
|
|
75
75
|
}
|
|
76
76
|
async getUsers(options, role, groupId, logger) {
|
|
77
77
|
const { properties, filter } = options;
|
|
@@ -6,7 +6,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
6
6
|
var _EntraM365GroupUserRemoveCommand_instances, _EntraM365GroupUserRemoveCommand_initTelemetry, _EntraM365GroupUserRemoveCommand_initOptions, _EntraM365GroupUserRemoveCommand_initValidators, _EntraM365GroupUserRemoveCommand_initOptionSets;
|
|
7
7
|
import { cli } from '../../../../cli/cli.js';
|
|
8
8
|
import request from '../../../../request.js';
|
|
9
|
-
import {
|
|
9
|
+
import { entraGroup } from '../../../../utils/entraGroup.js';
|
|
10
10
|
import { formatting } from '../../../../utils/formatting.js';
|
|
11
11
|
import { validation } from '../../../../utils/validation.js';
|
|
12
12
|
import GraphCommand from '../../../base/GraphCommand.js';
|
|
@@ -35,7 +35,7 @@ class EntraM365GroupUserRemoveCommand extends GraphCommand {
|
|
|
35
35
|
const groupId = (typeof args.options.groupId !== 'undefined') ? args.options.groupId : args.options.teamId;
|
|
36
36
|
const removeUser = async () => {
|
|
37
37
|
try {
|
|
38
|
-
const isUnifiedGroup = await
|
|
38
|
+
const isUnifiedGroup = await entraGroup.isUnifiedGroup(groupId);
|
|
39
39
|
if (!isUnifiedGroup) {
|
|
40
40
|
throw Error(`Specified group with id '${groupId}' is not a Microsoft 365 group.`);
|
|
41
41
|
}
|
|
@@ -10,7 +10,7 @@ import { validation } from '../../../../utils/validation.js';
|
|
|
10
10
|
import GraphCommand from '../../../base/GraphCommand.js';
|
|
11
11
|
import teamsCommands from '../../../teams/commands.js';
|
|
12
12
|
import commands from '../../commands.js';
|
|
13
|
-
import {
|
|
13
|
+
import { entraGroup } from '../../../../utils/entraGroup.js';
|
|
14
14
|
import aadCommands from '../../aadCommands.js';
|
|
15
15
|
class EntraM365GroupUserSetCommand extends GraphCommand {
|
|
16
16
|
get name() {
|
|
@@ -33,7 +33,7 @@ class EntraM365GroupUserSetCommand extends GraphCommand {
|
|
|
33
33
|
async commandAction(logger, args) {
|
|
34
34
|
try {
|
|
35
35
|
const groupId = (typeof args.options.groupId !== 'undefined') ? args.options.groupId : args.options.teamId;
|
|
36
|
-
const isUnifiedGroup = await
|
|
36
|
+
const isUnifiedGroup = await entraGroup.isUnifiedGroup(groupId);
|
|
37
37
|
if (!isUnifiedGroup) {
|
|
38
38
|
throw Error(`Specified group with id '${groupId}' is not a Microsoft 365 group.`);
|
|
39
39
|
}
|
|
@@ -5,8 +5,8 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
5
5
|
};
|
|
6
6
|
var _FlowOwnerEnsureCommand_instances, _a, _FlowOwnerEnsureCommand_initTelemetry, _FlowOwnerEnsureCommand_initOptions, _FlowOwnerEnsureCommand_initOptionSets, _FlowOwnerEnsureCommand_initValidators;
|
|
7
7
|
import request from '../../../../request.js';
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
8
|
+
import { entraGroup } from '../../../../utils/entraGroup.js';
|
|
9
|
+
import { entraUser } from '../../../../utils/entraUser.js';
|
|
10
10
|
import { formatting } from '../../../../utils/formatting.js';
|
|
11
11
|
import { validation } from '../../../../utils/validation.js';
|
|
12
12
|
import PowerAutomateCommand from '../../../base/PowerAutomateCommand.js';
|
|
@@ -36,13 +36,13 @@ class FlowOwnerEnsureCommand extends PowerAutomateCommand {
|
|
|
36
36
|
id = args.options.userId;
|
|
37
37
|
}
|
|
38
38
|
else if (args.options.userName) {
|
|
39
|
-
id = await
|
|
39
|
+
id = await entraUser.getUserIdByUpn(args.options.userName);
|
|
40
40
|
}
|
|
41
41
|
else if (args.options.groupId) {
|
|
42
42
|
id = args.options.groupId;
|
|
43
43
|
}
|
|
44
44
|
else {
|
|
45
|
-
id = await
|
|
45
|
+
id = await entraGroup.getGroupIdByDisplayName(args.options.groupName);
|
|
46
46
|
}
|
|
47
47
|
let type;
|
|
48
48
|
if (args.options.userId || args.options.userName) {
|
|
@@ -6,8 +6,8 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
6
6
|
var _FlowOwnerRemoveCommand_instances, _FlowOwnerRemoveCommand_initTelemetry, _FlowOwnerRemoveCommand_initOptions, _FlowOwnerRemoveCommand_initValidators, _FlowOwnerRemoveCommand_initOptionSets;
|
|
7
7
|
import { cli } from '../../../../cli/cli.js';
|
|
8
8
|
import request from '../../../../request.js';
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
9
|
+
import { entraGroup } from '../../../../utils/entraGroup.js';
|
|
10
|
+
import { entraUser } from '../../../../utils/entraUser.js';
|
|
11
11
|
import { formatting } from '../../../../utils/formatting.js';
|
|
12
12
|
import { validation } from '../../../../utils/validation.js';
|
|
13
13
|
import PowerAutomateCommand from '../../../base/PowerAutomateCommand.js';
|
|
@@ -38,13 +38,13 @@ class FlowOwnerRemoveCommand extends PowerAutomateCommand {
|
|
|
38
38
|
idToRemove = args.options.userId;
|
|
39
39
|
}
|
|
40
40
|
else if (args.options.userName) {
|
|
41
|
-
idToRemove = await
|
|
41
|
+
idToRemove = await entraUser.getUserIdByUpn(args.options.userName);
|
|
42
42
|
}
|
|
43
43
|
else if (args.options.groupId) {
|
|
44
44
|
idToRemove = args.options.groupId;
|
|
45
45
|
}
|
|
46
46
|
else {
|
|
47
|
-
idToRemove = await
|
|
47
|
+
idToRemove = await entraGroup.getGroupIdByDisplayName(args.options.groupName);
|
|
48
48
|
}
|
|
49
49
|
const requestOptions = {
|
|
50
50
|
url: `${this.resource}/providers/Microsoft.ProcessSimple/${args.options.asAdmin ? 'scopes/admin/' : ''}environments/${formatting.encodeQueryParameter(args.options.environmentName)}/flows/${formatting.encodeQueryParameter(args.options.flowName)}/modifyPermissions?api-version=2016-11-01`,
|
|
@@ -5,7 +5,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
5
5
|
};
|
|
6
6
|
var _OneNoteNotebookListCommand_instances, _OneNoteNotebookListCommand_initTelemetry, _OneNoteNotebookListCommand_initOptions, _OneNoteNotebookListCommand_initValidators, _OneNoteNotebookListCommand_initOptionSets;
|
|
7
7
|
import request from '../../../../request.js';
|
|
8
|
-
import {
|
|
8
|
+
import { entraGroup } from '../../../../utils/entraGroup.js';
|
|
9
9
|
import { odata } from '../../../../utils/odata.js';
|
|
10
10
|
import { validation } from '../../../../utils/validation.js';
|
|
11
11
|
import GraphCommand from '../../../base/GraphCommand.js';
|
|
@@ -54,7 +54,7 @@ class OneNoteNotebookListCommand extends GraphCommand {
|
|
|
54
54
|
return endpoint;
|
|
55
55
|
}
|
|
56
56
|
async getGroupId(groupName) {
|
|
57
|
-
const group = await
|
|
57
|
+
const group = await entraGroup.getGroupByDisplayName(groupName);
|
|
58
58
|
return group.id;
|
|
59
59
|
}
|
|
60
60
|
async getSpoSiteId(webUrl) {
|
|
@@ -4,7 +4,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
4
4
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
5
5
|
};
|
|
6
6
|
var _OneNotePageListCommand_instances, _OneNotePageListCommand_initTelemetry, _OneNotePageListCommand_initOptions, _OneNotePageListCommand_initValidators, _OneNotePageListCommand_initOptionSets;
|
|
7
|
-
import {
|
|
7
|
+
import { entraGroup } from '../../../../utils/entraGroup.js';
|
|
8
8
|
import { odata } from '../../../../utils/odata.js';
|
|
9
9
|
import { spo } from '../../../../utils/spo.js';
|
|
10
10
|
import { validation } from '../../../../utils/validation.js';
|
|
@@ -54,7 +54,7 @@ class OneNotePageListCommand extends GraphCommand {
|
|
|
54
54
|
return endpoint;
|
|
55
55
|
}
|
|
56
56
|
async getGroupId(groupName) {
|
|
57
|
-
const group = await
|
|
57
|
+
const group = await entraGroup.getGroupByDisplayName(groupName);
|
|
58
58
|
return group.id;
|
|
59
59
|
}
|
|
60
60
|
async commandAction(logger, args) {
|
|
@@ -5,7 +5,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
5
5
|
};
|
|
6
6
|
var _PaAppOwnerSetCommand_instances, _a, _PaAppOwnerSetCommand_initTelemetry, _PaAppOwnerSetCommand_initOptions, _PaAppOwnerSetCommand_initValidators, _PaAppOwnerSetCommand_initOptionSets;
|
|
7
7
|
import request from '../../../../request.js';
|
|
8
|
-
import {
|
|
8
|
+
import { entraUser } from '../../../../utils/entraUser.js';
|
|
9
9
|
import { validation } from '../../../../utils/validation.js';
|
|
10
10
|
import PowerAppsCommand from '../../../base/PowerAppsCommand.js';
|
|
11
11
|
import commands from '../../commands.js';
|
|
@@ -52,7 +52,7 @@ class PaAppOwnerSetCommand extends PowerAppsCommand {
|
|
|
52
52
|
if (options.userId) {
|
|
53
53
|
return options.userId;
|
|
54
54
|
}
|
|
55
|
-
return
|
|
55
|
+
return entraUser.getUserIdByUpn(options.userName);
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
58
|
_a = PaAppOwnerSetCommand, _PaAppOwnerSetCommand_instances = new WeakSet(), _PaAppOwnerSetCommand_initTelemetry = function _PaAppOwnerSetCommand_initTelemetry() {
|