@pnp/cli-microsoft365 8.0.0-beta.e6f9331 → 8.1.0-beta.309a9b8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintrc.cjs +1 -0
- package/allCommands.json +1 -1
- package/allCommandsFull.json +1 -1
- package/dist/Auth.js +10 -18
- package/dist/Command.js +50 -5
- package/dist/chili/chili.js +0 -23
- package/dist/cli/cli.js +100 -100
- package/dist/m365/commands/login.js +49 -96
- package/dist/m365/commands/setup.js +0 -4
- package/dist/m365/connection/commands/connection-remove.js +6 -2
- package/dist/m365/connection/commands/connection-set.js +4 -1
- package/dist/m365/connection/commands/connection-use.js +25 -4
- package/dist/m365/entra/commands/enterpriseapp/enterpriseapp-remove.js +123 -0
- package/dist/m365/entra/commands/group/group-set.js +256 -0
- package/dist/m365/entra/commands/m365group/m365group-set.js +66 -29
- package/dist/m365/entra/commands/m365group/m365group-user-add.js +109 -32
- package/dist/m365/entra/commands/m365group/m365group-user-set.js +159 -84
- package/dist/m365/entra/commands/multitenant/MultitenantOrganization.js +2 -0
- package/dist/m365/entra/commands/multitenant/multitenant-add.js +65 -0
- package/dist/m365/entra/commands/multitenant/multitenant-get.js +32 -0
- package/dist/m365/entra/commands/multitenant/multitenant-remove.js +118 -0
- package/dist/m365/entra/commands/multitenant/multitenant-set.js +72 -0
- package/dist/m365/entra/commands.js +7 -0
- package/dist/m365/external/commands/connection/connection-doctor.js +10 -24
- package/dist/m365/flow/commands/flow-get.js +1 -1
- package/dist/m365/flow/commands/flow-list.js +2 -1
- package/dist/m365/graph/commands/subscription/subscription-add.js +4 -2
- package/dist/m365/onenote/commands/notebook/notebook-add.js +132 -0
- package/dist/m365/onenote/commands.js +1 -0
- package/dist/m365/pa/commands/app/app-export.js +13 -7
- package/dist/m365/spe/ContainerTypeProperties.js +2 -0
- package/dist/m365/spe/commands/containertype/containertype-list.js +49 -0
- package/dist/m365/spe/commands.js +2 -1
- package/dist/m365/spfx/commands/project/base-project-command.js +36 -126
- package/dist/m365/spo/commands/applicationcustomizer/applicationcustomizer-get.js +16 -21
- package/dist/m365/spo/commands/commandset/commandset-get.js +31 -17
- package/dist/m365/spo/commands/contenttype/contenttype-field-list.js +124 -0
- package/dist/m365/spo/commands/field/field-list.js +1 -1
- package/dist/m365/spo/commands/file/file-roleassignment-add.js +1 -1
- package/dist/m365/spo/commands/file/file-roleinheritance-break.js +1 -1
- package/dist/m365/spo/commands/file/file-roleinheritance-reset.js +1 -1
- package/dist/m365/spo/commands/folder/folder-retentionlabel-ensure.js +1 -1
- package/dist/m365/spo/commands/folder/folder-sharinglink-get.js +86 -0
- package/dist/m365/spo/commands/folder/folder-sharinglink-list.js +110 -0
- package/dist/m365/spo/commands/list/ListInstance.js +6 -1
- package/dist/m365/spo/commands/list/list-get.js +9 -3
- package/dist/m365/spo/commands/list/list-roleassignment-add.js +46 -21
- package/dist/m365/spo/commands/list/list-roleassignment-remove.js +48 -46
- package/dist/m365/spo/commands/page/page-clientsidewebpart-add.js +2 -3
- package/dist/m365/spo/commands/page/page-text-add.js +2 -3
- package/dist/m365/spo/commands/site/site-get.js +12 -16
- package/dist/m365/spo/commands/spo-search.js +3 -4
- package/dist/m365/spo/commands/tenant/tenant-applicationcustomizer-get.js +19 -5
- package/dist/m365/spo/commands/tenant/tenant-commandset-get.js +20 -6
- package/dist/m365/spo/commands.js +3 -0
- package/dist/m365/teams/commands/meeting/meeting-attendancereport-get.js +119 -0
- package/dist/m365/teams/commands/message/message-remove.js +112 -0
- package/dist/m365/teams/commands/message/message-restore.js +106 -0
- package/dist/m365/teams/commands.js +3 -0
- package/dist/m365/viva/commands/engage/engage-community-add.js +166 -0
- package/dist/m365/viva/commands.js +1 -0
- package/dist/utils/drive.js +61 -0
- package/dist/utils/formatting.js +30 -1
- package/dist/utils/spo.js +69 -6
- package/dist/utils/teams.js +49 -0
- package/dist/utils/zod.js +124 -0
- package/docs/docs/cmd/connection/connection-use.mdx +8 -2
- package/docs/docs/cmd/entra/enterpriseapp/enterpriseapp-remove.mdx +65 -0
- package/docs/docs/cmd/entra/group/group-add.mdx +0 -4
- package/docs/docs/cmd/entra/group/group-set.mdx +89 -0
- package/docs/docs/cmd/entra/m365group/m365group-set.mdx +37 -7
- package/docs/docs/cmd/entra/m365group/m365group-user-add.mdx +28 -10
- package/docs/docs/cmd/entra/m365group/m365group-user-set.mdx +35 -11
- package/docs/docs/cmd/entra/multitenant/multitenant-add.mdx +107 -0
- package/docs/docs/cmd/entra/multitenant/multitenant-get.mdx +94 -0
- package/docs/docs/cmd/entra/multitenant/multitenant-remove.mdx +58 -0
- package/docs/docs/cmd/entra/multitenant/multitenant-set.mdx +53 -0
- package/docs/docs/cmd/external/connection/connection-doctor.mdx +9 -9
- package/docs/docs/cmd/flow/flow-get.mdx +149 -283
- package/docs/docs/cmd/graph/subscription/subscription-add.mdx +18 -0
- package/docs/docs/cmd/onenote/notebook/notebook-add.mdx +169 -0
- package/docs/docs/cmd/pa/app/app-export.mdx +15 -9
- package/docs/docs/cmd/planner/plan/plan-remove.mdx +1 -1
- package/docs/docs/cmd/spe/containertype/containertype-list.mdx +102 -0
- package/docs/docs/cmd/spo/app/app-uninstall.mdx +1 -1
- package/docs/docs/cmd/spo/applicationcustomizer/applicationcustomizer-get.mdx +87 -38
- package/docs/docs/cmd/spo/applicationcustomizer/applicationcustomizer-list.mdx +22 -28
- package/docs/docs/cmd/spo/commandset/commandset-get.mdx +75 -24
- package/docs/docs/cmd/spo/commandset/commandset-list.mdx +26 -32
- package/docs/docs/cmd/spo/contenttype/contenttype-field-list.mdx +172 -0
- package/docs/docs/cmd/spo/contenttype/contenttype-list.mdx +3 -3
- package/docs/docs/cmd/spo/field/field-list.mdx +3 -3
- package/docs/docs/cmd/spo/file/file-retentionlabel-ensure.mdx +1 -1
- package/docs/docs/cmd/spo/file/file-roleassignment-add.mdx +2 -2
- package/docs/docs/cmd/spo/file/file-roleassignment-remove.mdx +1 -1
- package/docs/docs/cmd/spo/file/file-roleinheritance-break.mdx +1 -1
- package/docs/docs/cmd/spo/file/file-roleinheritance-reset.mdx +1 -1
- package/docs/docs/cmd/spo/folder/folder-retentionlabel-ensure.mdx +2 -2
- package/docs/docs/cmd/spo/folder/folder-sharinglink-get.mdx +110 -0
- package/docs/docs/cmd/spo/folder/folder-sharinglink-list.mdx +114 -0
- package/docs/docs/cmd/spo/list/list-get.mdx +6 -0
- package/docs/docs/cmd/spo/list/list-roleassignment-add.mdx +15 -3
- package/docs/docs/cmd/spo/list/list-roleassignment-remove.mdx +15 -3
- package/docs/docs/cmd/spo/listitem/listitem-retentionlabel-ensure.mdx +4 -4
- package/docs/docs/cmd/spo/listitem/listitem-retentionlabel-remove.mdx +1 -1
- package/docs/docs/cmd/spo/listitem/listitem-roleassignment-add.mdx +9 -9
- package/docs/docs/cmd/spo/listitem/listitem-roleassignment-remove.mdx +7 -7
- package/docs/docs/cmd/spo/site/site-recyclebinitem-list.mdx +1 -1
- package/docs/docs/cmd/spo/tenant/tenant-applicationcustomizer-get.mdx +79 -30
- package/docs/docs/cmd/spo/tenant/tenant-applicationcustomizer-list.mdx +20 -19
- package/docs/docs/cmd/spo/tenant/tenant-commandset-get.mdx +84 -38
- package/docs/docs/cmd/spo/tenant/tenant-commandset-list.mdx +20 -19
- package/docs/docs/cmd/spo/web/web-roleassignment-add.mdx +1 -1
- package/docs/docs/cmd/spo/web/web-roleassignment-remove.mdx +1 -1
- package/docs/docs/cmd/teams/meeting/meeting-attendancereport-get.mdx +138 -0
- package/docs/docs/cmd/teams/meeting/meeting-list.mdx +7 -3
- package/docs/docs/cmd/teams/message/message-remove.mdx +64 -0
- package/docs/docs/cmd/teams/message/message-restore.mdx +62 -0
- package/docs/docs/cmd/viva/engage/engage-community-add.mdx +168 -0
- package/npm-shrinkwrap.json +987 -1327
- package/package.json +27 -24
|
@@ -0,0 +1,256 @@
|
|
|
1
|
+
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
2
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
3
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
4
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
5
|
+
};
|
|
6
|
+
var _EntraGroupSetCommand_instances, _EntraGroupSetCommand_initTelemetry, _EntraGroupSetCommand_initOptions, _EntraGroupSetCommand_initValidators, _EntraGroupSetCommand_initOptionSets, _EntraGroupSetCommand_initTypes;
|
|
7
|
+
import GraphCommand from '../../../base/GraphCommand.js';
|
|
8
|
+
import commands from '../../commands.js';
|
|
9
|
+
import { validation } from '../../../../utils/validation.js';
|
|
10
|
+
import request from '../../../../request.js';
|
|
11
|
+
import { entraUser } from '../../../../utils/entraUser.js';
|
|
12
|
+
import { entraGroup } from '../../../../utils/entraGroup.js';
|
|
13
|
+
import { formatting } from '../../../../utils/formatting.js';
|
|
14
|
+
import { odata } from '../../../../utils/odata.js';
|
|
15
|
+
class EntraGroupSetCommand extends GraphCommand {
|
|
16
|
+
get name() {
|
|
17
|
+
return commands.GROUP_SET;
|
|
18
|
+
}
|
|
19
|
+
get description() {
|
|
20
|
+
return 'Updates a Microsoft Entra group';
|
|
21
|
+
}
|
|
22
|
+
constructor() {
|
|
23
|
+
super();
|
|
24
|
+
_EntraGroupSetCommand_instances.add(this);
|
|
25
|
+
this.allowedVisibility = ['Public', 'Private'];
|
|
26
|
+
__classPrivateFieldGet(this, _EntraGroupSetCommand_instances, "m", _EntraGroupSetCommand_initTelemetry).call(this);
|
|
27
|
+
__classPrivateFieldGet(this, _EntraGroupSetCommand_instances, "m", _EntraGroupSetCommand_initOptions).call(this);
|
|
28
|
+
__classPrivateFieldGet(this, _EntraGroupSetCommand_instances, "m", _EntraGroupSetCommand_initValidators).call(this);
|
|
29
|
+
__classPrivateFieldGet(this, _EntraGroupSetCommand_instances, "m", _EntraGroupSetCommand_initOptionSets).call(this);
|
|
30
|
+
__classPrivateFieldGet(this, _EntraGroupSetCommand_instances, "m", _EntraGroupSetCommand_initTypes).call(this);
|
|
31
|
+
}
|
|
32
|
+
async commandAction(logger, args) {
|
|
33
|
+
let groupId = args.options.id;
|
|
34
|
+
try {
|
|
35
|
+
if (args.options.displayName) {
|
|
36
|
+
if (this.verbose) {
|
|
37
|
+
await logger.logToStderr(`Retrieving group id...`);
|
|
38
|
+
}
|
|
39
|
+
groupId = await entraGroup.getGroupIdByDisplayName(args.options.displayName);
|
|
40
|
+
}
|
|
41
|
+
const requestOptions = {
|
|
42
|
+
url: `${this.resource}/v1.0/groups/${groupId}`,
|
|
43
|
+
headers: {
|
|
44
|
+
accept: 'application/json;odata.metadata=none'
|
|
45
|
+
},
|
|
46
|
+
data: {
|
|
47
|
+
displayName: args.options.newDisplayName,
|
|
48
|
+
description: args.options.description === '' ? null : args.options.description,
|
|
49
|
+
mailNickName: args.options.mailNickname,
|
|
50
|
+
visibility: args.options.visibility
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
await request.patch(requestOptions);
|
|
54
|
+
const ownerIds = await this.getUserIds(logger, args.options.ownerIds, args.options.ownerUserNames);
|
|
55
|
+
if (ownerIds.length !== 0) {
|
|
56
|
+
await this.updateUsers(logger, groupId, 'owners', ownerIds);
|
|
57
|
+
}
|
|
58
|
+
else if (this.verbose) {
|
|
59
|
+
await logger.logToStderr(`No owners to update.`);
|
|
60
|
+
}
|
|
61
|
+
const memberIds = await this.getUserIds(logger, args.options.memberIds, args.options.memberUserNames);
|
|
62
|
+
if (memberIds.length !== 0) {
|
|
63
|
+
await this.updateUsers(logger, groupId, 'members', memberIds);
|
|
64
|
+
}
|
|
65
|
+
else if (this.verbose) {
|
|
66
|
+
await logger.logToStderr(`No members to update.`);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
catch (err) {
|
|
70
|
+
this.handleRejectedODataJsonPromise(err);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
;
|
|
74
|
+
async getUserIds(logger, userIds, userNames) {
|
|
75
|
+
if (userIds) {
|
|
76
|
+
return formatting.splitAndTrim(userIds);
|
|
77
|
+
}
|
|
78
|
+
if (userNames) {
|
|
79
|
+
if (this.verbose) {
|
|
80
|
+
await logger.logToStderr(`Retrieving user IDs...`);
|
|
81
|
+
}
|
|
82
|
+
return entraUser.getUserIdsByUpns(formatting.splitAndTrim(userNames));
|
|
83
|
+
}
|
|
84
|
+
return [];
|
|
85
|
+
}
|
|
86
|
+
async updateUsers(logger, groupId, role, userIds) {
|
|
87
|
+
const groupUsers = await odata.getAllItems(`${this.resource}/v1.0/groups/${groupId}/${role}/microsoft.graph.user?$select=id`);
|
|
88
|
+
const userIdsToAdd = userIds.filter(userId => !groupUsers.some(groupUser => groupUser.id === userId));
|
|
89
|
+
const userIdsToRemove = groupUsers.filter(groupUser => !userIds.some(userId => groupUser.id === userId)).map(user => user.id);
|
|
90
|
+
if (this.verbose) {
|
|
91
|
+
await logger.logToStderr(`Adding ${userIdsToAdd.length} ${role}...`);
|
|
92
|
+
}
|
|
93
|
+
for (let i = 0; i < userIdsToAdd.length; i += 400) {
|
|
94
|
+
const userIdsBatch = userIdsToAdd.slice(i, i + 400);
|
|
95
|
+
const batchRequestOptions = this.getBatchRequestOptions();
|
|
96
|
+
// only 20 requests per one batch are allowed
|
|
97
|
+
for (let j = 0; j < userIdsBatch.length; j += 20) {
|
|
98
|
+
// only 20 users can be added in one request
|
|
99
|
+
const userIdsChunk = userIdsBatch.slice(j, j + 20);
|
|
100
|
+
batchRequestOptions.data.requests.push({
|
|
101
|
+
id: j + 1,
|
|
102
|
+
method: 'PATCH',
|
|
103
|
+
url: `/groups/${groupId}`,
|
|
104
|
+
headers: {
|
|
105
|
+
'content-type': 'application/json;odata.metadata=none',
|
|
106
|
+
accept: 'application/json;odata.metadata=none'
|
|
107
|
+
},
|
|
108
|
+
body: {
|
|
109
|
+
[`${role}@odata.bind`]: userIdsChunk.map(u => `${this.resource}/v1.0/directoryObjects/${u}`)
|
|
110
|
+
}
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
const res = await request.post(batchRequestOptions);
|
|
114
|
+
for (const response of res.responses) {
|
|
115
|
+
if (response.status !== 204) {
|
|
116
|
+
throw response.body;
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
if (this.verbose) {
|
|
121
|
+
await logger.logToStderr(`Removing ${userIdsToRemove.length} ${role}...`);
|
|
122
|
+
}
|
|
123
|
+
for (let i = 0; i < userIdsToRemove.length; i += 20) {
|
|
124
|
+
const userIdsBatch = userIdsToRemove.slice(i, i + 20);
|
|
125
|
+
const batchRequestOptions = this.getBatchRequestOptions();
|
|
126
|
+
userIdsBatch.map(userId => {
|
|
127
|
+
batchRequestOptions.data.requests.push({
|
|
128
|
+
id: userId,
|
|
129
|
+
method: 'DELETE',
|
|
130
|
+
url: `/groups/${groupId}/${role}/${userId}/$ref`
|
|
131
|
+
});
|
|
132
|
+
});
|
|
133
|
+
const res = await request.post(batchRequestOptions);
|
|
134
|
+
for (const response of res.responses) {
|
|
135
|
+
if (response.status !== 204) {
|
|
136
|
+
throw response.body;
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
getBatchRequestOptions() {
|
|
142
|
+
const requestOptions = {
|
|
143
|
+
url: `${this.resource}/v1.0/$batch`,
|
|
144
|
+
headers: {
|
|
145
|
+
'content-type': 'application/json;odata.metadata=none',
|
|
146
|
+
accept: 'application/json;odata.metadata=none'
|
|
147
|
+
},
|
|
148
|
+
responseType: 'json',
|
|
149
|
+
data: {
|
|
150
|
+
requests: []
|
|
151
|
+
}
|
|
152
|
+
};
|
|
153
|
+
return requestOptions;
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
_EntraGroupSetCommand_instances = new WeakSet(), _EntraGroupSetCommand_initTelemetry = function _EntraGroupSetCommand_initTelemetry() {
|
|
157
|
+
this.telemetry.push((args) => {
|
|
158
|
+
Object.assign(this.telemetryProperties, {
|
|
159
|
+
id: typeof args.options.id !== 'undefined',
|
|
160
|
+
displayName: typeof args.options.displayName !== 'undefined',
|
|
161
|
+
newDisplayName: typeof args.options.newDisplayName !== 'undefined',
|
|
162
|
+
description: typeof args.options.description !== 'undefined',
|
|
163
|
+
mailNickname: typeof args.options.mailNickname !== 'undefined',
|
|
164
|
+
ownerIds: typeof args.options.ownerIds !== 'undefined',
|
|
165
|
+
ownerUserNames: typeof args.options.ownerUserNames !== 'undefined',
|
|
166
|
+
memberIds: typeof args.options.memberIds !== 'undefined',
|
|
167
|
+
memberUserNames: typeof args.options.memberUserNames !== 'undefined',
|
|
168
|
+
visibility: typeof args.options.visibility !== 'undefined'
|
|
169
|
+
});
|
|
170
|
+
});
|
|
171
|
+
}, _EntraGroupSetCommand_initOptions = function _EntraGroupSetCommand_initOptions() {
|
|
172
|
+
this.options.unshift({
|
|
173
|
+
option: '-i, --id [id]'
|
|
174
|
+
}, {
|
|
175
|
+
option: '--mailNickname [mailNickname]'
|
|
176
|
+
}, {
|
|
177
|
+
option: '-n, --displayName [displayName]'
|
|
178
|
+
}, {
|
|
179
|
+
option: '--newDisplayName [newDisplayName]'
|
|
180
|
+
}, {
|
|
181
|
+
option: '--description [description]'
|
|
182
|
+
}, {
|
|
183
|
+
option: '--ownerIds [ownerIds]'
|
|
184
|
+
}, {
|
|
185
|
+
option: '--ownerUserNames [ownerUserNames]'
|
|
186
|
+
}, {
|
|
187
|
+
option: '--memberIds [memberIds]'
|
|
188
|
+
}, {
|
|
189
|
+
option: '--memberUserNames [memberUserNames]'
|
|
190
|
+
}, {
|
|
191
|
+
option: '--visibility [visibility]',
|
|
192
|
+
autocomplete: this.allowedVisibility
|
|
193
|
+
});
|
|
194
|
+
}, _EntraGroupSetCommand_initValidators = function _EntraGroupSetCommand_initValidators() {
|
|
195
|
+
this.validators.push(async (args) => {
|
|
196
|
+
if (args.options.id && !validation.isValidGuid(args.options.id)) {
|
|
197
|
+
return `Value '${args.options.id}' is not a valid GUID for option 'id'.`;
|
|
198
|
+
}
|
|
199
|
+
if (args.options.newDisplayName && args.options.newDisplayName.length > 256) {
|
|
200
|
+
return `The maximum amount of characters for 'newDisplayName' is 256.`;
|
|
201
|
+
}
|
|
202
|
+
if (args.options.mailNickname) {
|
|
203
|
+
if (!validation.isValidMailNickname(args.options.mailNickname)) {
|
|
204
|
+
return `Value '${args.options.mailNickname}' for option 'mailNickname' must contain only characters in the ASCII character set 0-127 except the following: @ () \ [] " ; : <> , SPACE.`;
|
|
205
|
+
}
|
|
206
|
+
if (args.options.mailNickname.length > 64) {
|
|
207
|
+
return `The maximum amount of characters for 'mailNickname' is 64.`;
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
if (args.options.ownerIds) {
|
|
211
|
+
const isValidGUIDArrayResult = validation.isValidGuidArray(args.options.ownerIds);
|
|
212
|
+
if (isValidGUIDArrayResult !== true) {
|
|
213
|
+
return `The following GUIDs are invalid for option 'ownerIds': ${isValidGUIDArrayResult}.`;
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
if (args.options.ownerUserNames) {
|
|
217
|
+
const isValidUPNArrayResult = validation.isValidUserPrincipalNameArray(args.options.ownerUserNames);
|
|
218
|
+
if (isValidUPNArrayResult !== true) {
|
|
219
|
+
return `The following user principal names are invalid for option 'ownerUserNames': ${isValidUPNArrayResult}.`;
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
if (args.options.memberIds) {
|
|
223
|
+
const isValidGUIDArrayResult = validation.isValidGuidArray(args.options.memberIds);
|
|
224
|
+
if (isValidGUIDArrayResult !== true) {
|
|
225
|
+
return `The following GUIDs are invalid for option 'memberIds': ${isValidGUIDArrayResult}.`;
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
if (args.options.memberUserNames) {
|
|
229
|
+
const isValidUPNArrayResult = validation.isValidUserPrincipalNameArray(args.options.memberUserNames);
|
|
230
|
+
if (isValidUPNArrayResult !== true) {
|
|
231
|
+
return `The following user principal names are invalid for option 'memberUserNames': ${isValidUPNArrayResult}.`;
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
if (args.options.visibility && !this.allowedVisibility.includes(args.options.visibility)) {
|
|
235
|
+
return `Option 'visibility' must be one of the following values: ${this.allowedVisibility.join(', ')}.`;
|
|
236
|
+
}
|
|
237
|
+
if (args.options.newDisplayName === undefined && args.options.description === undefined && args.options.visibility === undefined
|
|
238
|
+
&& args.options.ownerIds === undefined && args.options.ownerUserNames === undefined && args.options.memberIds === undefined
|
|
239
|
+
&& args.options.memberUserNames === undefined && args.options.mailNickname === undefined) {
|
|
240
|
+
return `Specify at least one of the following options: 'newDisplayName', 'description', 'visibility', 'ownerIds', 'ownerUserNames', 'memberIds', 'memberUserNames', 'mailNickname'.`;
|
|
241
|
+
}
|
|
242
|
+
return true;
|
|
243
|
+
});
|
|
244
|
+
}, _EntraGroupSetCommand_initOptionSets = function _EntraGroupSetCommand_initOptionSets() {
|
|
245
|
+
this.optionSets.push({ options: ['id', 'displayName'] }, {
|
|
246
|
+
options: ['ownerIds', 'ownerUserNames'],
|
|
247
|
+
runsWhen: (args) => args.options.ownerIds || args.options.ownerUserNames
|
|
248
|
+
}, {
|
|
249
|
+
options: ['memberIds', 'memberUserNames'],
|
|
250
|
+
runsWhen: (args) => args.options.memberIds || args.options.memberUserNames
|
|
251
|
+
});
|
|
252
|
+
}, _EntraGroupSetCommand_initTypes = function _EntraGroupSetCommand_initTypes() {
|
|
253
|
+
this.types.string.push('id', 'displayName', 'newDisplayName', 'description', 'mailNickname', 'ownerIds', 'ownerUserNames', 'memberIds', 'memberUserNames', 'visibility');
|
|
254
|
+
};
|
|
255
|
+
export default new EntraGroupSetCommand();
|
|
256
|
+
//# sourceMappingURL=group-set.js.map
|
|
@@ -13,6 +13,8 @@ import GraphCommand from '../../../base/GraphCommand.js';
|
|
|
13
13
|
import commands from '../../commands.js';
|
|
14
14
|
import { entraGroup } from '../../../../utils/entraGroup.js';
|
|
15
15
|
import aadCommands from '../../aadCommands.js';
|
|
16
|
+
import { accessToken } from '../../../../utils/accessToken.js';
|
|
17
|
+
import auth from '../../../../Auth.js';
|
|
16
18
|
class EntraM365GroupSetCommand extends GraphCommand {
|
|
17
19
|
get name() {
|
|
18
20
|
return commands.M365GROUP_SET;
|
|
@@ -35,22 +37,22 @@ class EntraM365GroupSetCommand extends GraphCommand {
|
|
|
35
37
|
async commandAction(logger, args) {
|
|
36
38
|
await this.showDeprecationWarning(logger, aadCommands.M365GROUP_SET, commands.M365GROUP_SET);
|
|
37
39
|
try {
|
|
40
|
+
if ((args.options.allowExternalSenders !== undefined || args.options.autoSubscribeNewMembers !== undefined) && accessToken.isAppOnlyAccessToken(auth.connection.accessTokens[auth.defaultResource].accessToken)) {
|
|
41
|
+
throw `Option 'allowExternalSenders' and 'autoSubscribeNewMembers' can only be used when using delegated permissions.`;
|
|
42
|
+
}
|
|
38
43
|
const isUnifiedGroup = await entraGroup.isUnifiedGroup(args.options.id);
|
|
39
44
|
if (!isUnifiedGroup) {
|
|
40
45
|
throw Error(`Specified group with id '${args.options.id}' is not a Microsoft 365 group.`);
|
|
41
46
|
}
|
|
42
|
-
if (
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
const update = {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
}
|
|
50
|
-
if (args.options.
|
|
51
|
-
update.description = args.options.description;
|
|
52
|
-
}
|
|
53
|
-
if (typeof args.options.isPrivate !== 'undefined') {
|
|
47
|
+
if (this.verbose) {
|
|
48
|
+
await logger.logToStderr(`Updating Microsoft 365 Group ${args.options.id}...`);
|
|
49
|
+
}
|
|
50
|
+
if (args.options.displayName || args.options.description !== undefined || args.options.isPrivate !== undefined) {
|
|
51
|
+
const update = {
|
|
52
|
+
displayName: args.options.displayName,
|
|
53
|
+
description: args.options.description !== '' ? args.options.description : null
|
|
54
|
+
};
|
|
55
|
+
if (args.options.isPrivate !== undefined) {
|
|
54
56
|
update.visibility = args.options.isPrivate ? 'Private' : 'Public';
|
|
55
57
|
}
|
|
56
58
|
const requestOptions = {
|
|
@@ -63,6 +65,24 @@ class EntraM365GroupSetCommand extends GraphCommand {
|
|
|
63
65
|
};
|
|
64
66
|
await request.patch(requestOptions);
|
|
65
67
|
}
|
|
68
|
+
// This has to be a separate request due to some Graph API limitations. Otherwise it will throw an error.
|
|
69
|
+
if (args.options.allowExternalSenders !== undefined || args.options.autoSubscribeNewMembers !== undefined || args.options.hideFromAddressLists !== undefined || args.options.hideFromOutlookClients !== undefined) {
|
|
70
|
+
const requestBody = {
|
|
71
|
+
allowExternalSenders: args.options.allowExternalSenders,
|
|
72
|
+
autoSubscribeNewMembers: args.options.autoSubscribeNewMembers,
|
|
73
|
+
hideFromAddressLists: args.options.hideFromAddressLists,
|
|
74
|
+
hideFromOutlookClients: args.options.hideFromOutlookClients
|
|
75
|
+
};
|
|
76
|
+
const requestOptions = {
|
|
77
|
+
url: `${this.resource}/v1.0/groups/${args.options.id}`,
|
|
78
|
+
headers: {
|
|
79
|
+
accept: 'application/json;odata.metadata=none'
|
|
80
|
+
},
|
|
81
|
+
responseType: 'json',
|
|
82
|
+
data: requestBody
|
|
83
|
+
};
|
|
84
|
+
await request.patch(requestOptions);
|
|
85
|
+
}
|
|
66
86
|
if (args.options.logoPath) {
|
|
67
87
|
const fullPath = path.resolve(args.options.logoPath);
|
|
68
88
|
if (this.verbose) {
|
|
@@ -172,8 +192,12 @@ _EntraM365GroupSetCommand_instances = new WeakSet(), _EntraM365GroupSetCommand_i
|
|
|
172
192
|
description: typeof args.options.description !== 'undefined',
|
|
173
193
|
owners: typeof args.options.owners !== 'undefined',
|
|
174
194
|
members: typeof args.options.members !== 'undefined',
|
|
175
|
-
isPrivate: args.options.isPrivate,
|
|
176
|
-
logoPath: typeof args.options.logoPath !== 'undefined'
|
|
195
|
+
isPrivate: !!args.options.isPrivate,
|
|
196
|
+
logoPath: typeof args.options.logoPath !== 'undefined',
|
|
197
|
+
allowExternalSenders: !!args.options.allowExternalSenders,
|
|
198
|
+
autoSubscribeNewMembers: !!args.options.autoSubscribeNewMembers,
|
|
199
|
+
hideFromAddressLists: !!args.options.hideFromAddressLists,
|
|
200
|
+
hideFromOutlookClients: !!args.options.hideFromOutlookClients
|
|
177
201
|
});
|
|
178
202
|
});
|
|
179
203
|
}, _EntraM365GroupSetCommand_initOptions = function _EntraM365GroupSetCommand_initOptions() {
|
|
@@ -192,36 +216,49 @@ _EntraM365GroupSetCommand_instances = new WeakSet(), _EntraM365GroupSetCommand_i
|
|
|
192
216
|
autocomplete: ['true', 'false']
|
|
193
217
|
}, {
|
|
194
218
|
option: '-l, --logoPath [logoPath]'
|
|
219
|
+
}, {
|
|
220
|
+
option: '--allowExternalSenders [allowExternalSenders]',
|
|
221
|
+
autocomplete: ['true', 'false']
|
|
222
|
+
}, {
|
|
223
|
+
option: '--autoSubscribeNewMembers [autoSubscribeNewMembers]',
|
|
224
|
+
autocomplete: ['true', 'false']
|
|
225
|
+
}, {
|
|
226
|
+
option: '--hideFromAddressLists [hideFromAddressLists]',
|
|
227
|
+
autocomplete: ['true', 'false']
|
|
228
|
+
}, {
|
|
229
|
+
option: '--hideFromOutlookClients [hideFromOutlookClients]',
|
|
230
|
+
autocomplete: ['true', 'false']
|
|
195
231
|
});
|
|
196
232
|
}, _EntraM365GroupSetCommand_initTypes = function _EntraM365GroupSetCommand_initTypes() {
|
|
197
|
-
this.types.boolean.push('isPrivate');
|
|
233
|
+
this.types.boolean.push('isPrivate', 'allowEternalSenders', 'autoSubscribeNewMembers', 'hideFromAddressLists', 'hideFromOutlookClients');
|
|
234
|
+
this.types.string.push('id', 'displayName', 'description', 'owners', 'members', 'logoPath');
|
|
198
235
|
}, _EntraM365GroupSetCommand_initValidators = function _EntraM365GroupSetCommand_initValidators() {
|
|
199
236
|
this.validators.push(async (args) => {
|
|
200
237
|
if (!args.options.displayName &&
|
|
201
|
-
|
|
238
|
+
args.options.description === undefined &&
|
|
202
239
|
!args.options.members &&
|
|
203
240
|
!args.options.owners &&
|
|
204
|
-
|
|
205
|
-
!args.options.logoPath
|
|
206
|
-
|
|
241
|
+
args.options.isPrivate === undefined &&
|
|
242
|
+
!args.options.logoPath &&
|
|
243
|
+
args.options.allowExternalSenders === undefined &&
|
|
244
|
+
args.options.autoSubscribeNewMembers === undefined &&
|
|
245
|
+
args.options.hideFromAddressLists === undefined &&
|
|
246
|
+
args.options.hideFromOutlookClients === undefined) {
|
|
247
|
+
return 'Specify at least one option to update.';
|
|
207
248
|
}
|
|
208
249
|
if (!validation.isValidGuid(args.options.id)) {
|
|
209
250
|
return `${args.options.id} is not a valid GUID`;
|
|
210
251
|
}
|
|
211
252
|
if (args.options.owners) {
|
|
212
|
-
const
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
return `${owners[i]} is not a valid userPrincipalName`;
|
|
216
|
-
}
|
|
253
|
+
const isValidArray = validation.isValidUserPrincipalNameArray(args.options.owners);
|
|
254
|
+
if (isValidArray !== true) {
|
|
255
|
+
return `Option 'owners' contains one or more invalid UPNs: ${isValidArray}.`;
|
|
217
256
|
}
|
|
218
257
|
}
|
|
219
258
|
if (args.options.members) {
|
|
220
|
-
const
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
return `${members[i]} is not a valid userPrincipalName`;
|
|
224
|
-
}
|
|
259
|
+
const isValidArray = validation.isValidUserPrincipalNameArray(args.options.members);
|
|
260
|
+
if (isValidArray !== true) {
|
|
261
|
+
return `Option 'members' contains one or more invalid UPNs: ${isValidArray}.`;
|
|
225
262
|
}
|
|
226
263
|
}
|
|
227
264
|
if (args.options.logoPath) {
|
|
@@ -3,14 +3,15 @@ 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 _EntraM365GroupUserAddCommand_instances, _EntraM365GroupUserAddCommand_initTelemetry, _EntraM365GroupUserAddCommand_initOptions, _EntraM365GroupUserAddCommand_initValidators, _EntraM365GroupUserAddCommand_initOptionSets;
|
|
6
|
+
var _EntraM365GroupUserAddCommand_instances, _EntraM365GroupUserAddCommand_initTelemetry, _EntraM365GroupUserAddCommand_initOptions, _EntraM365GroupUserAddCommand_initValidators, _EntraM365GroupUserAddCommand_initOptionSets, _EntraM365GroupUserAddCommand_initTypes;
|
|
7
7
|
import request from '../../../../request.js';
|
|
8
8
|
import { entraGroup } from '../../../../utils/entraGroup.js';
|
|
9
|
-
import { formatting } from '../../../../utils/formatting.js';
|
|
10
9
|
import { validation } from '../../../../utils/validation.js';
|
|
10
|
+
import { formatting } from '../../../../utils/formatting.js';
|
|
11
11
|
import GraphCommand from '../../../base/GraphCommand.js';
|
|
12
12
|
import teamsCommands from '../../../teams/commands.js';
|
|
13
13
|
import aadCommands from '../../aadCommands.js';
|
|
14
|
+
import { entraUser } from '../../../../utils/entraUser.js';
|
|
14
15
|
import commands from '../../commands.js';
|
|
15
16
|
class EntraM365GroupUserAddCommand extends GraphCommand {
|
|
16
17
|
get name() {
|
|
@@ -25,79 +26,155 @@ class EntraM365GroupUserAddCommand extends GraphCommand {
|
|
|
25
26
|
constructor() {
|
|
26
27
|
super();
|
|
27
28
|
_EntraM365GroupUserAddCommand_instances.add(this);
|
|
29
|
+
this.allowedRoles = ['owner', 'member'];
|
|
28
30
|
__classPrivateFieldGet(this, _EntraM365GroupUserAddCommand_instances, "m", _EntraM365GroupUserAddCommand_initTelemetry).call(this);
|
|
29
31
|
__classPrivateFieldGet(this, _EntraM365GroupUserAddCommand_instances, "m", _EntraM365GroupUserAddCommand_initOptions).call(this);
|
|
30
32
|
__classPrivateFieldGet(this, _EntraM365GroupUserAddCommand_instances, "m", _EntraM365GroupUserAddCommand_initValidators).call(this);
|
|
31
33
|
__classPrivateFieldGet(this, _EntraM365GroupUserAddCommand_instances, "m", _EntraM365GroupUserAddCommand_initOptionSets).call(this);
|
|
34
|
+
__classPrivateFieldGet(this, _EntraM365GroupUserAddCommand_instances, "m", _EntraM365GroupUserAddCommand_initTypes).call(this);
|
|
32
35
|
}
|
|
33
36
|
async commandAction(logger, args) {
|
|
34
37
|
await this.showDeprecationWarning(logger, aadCommands.M365GROUP_USER_ADD, commands.M365GROUP_USER_ADD);
|
|
38
|
+
if (args.options.userName) {
|
|
39
|
+
await this.warn(logger, `Option 'userName' is deprecated. Please use 'ids' or 'userNames' instead.`);
|
|
40
|
+
}
|
|
35
41
|
try {
|
|
36
|
-
const
|
|
42
|
+
const userNames = args.options.userNames || args.options.userName;
|
|
43
|
+
const providedGroupId = await this.getGroupId(logger, args);
|
|
37
44
|
const isUnifiedGroup = await entraGroup.isUnifiedGroup(providedGroupId);
|
|
38
45
|
if (!isUnifiedGroup) {
|
|
39
46
|
throw Error(`Specified group with id '${providedGroupId}' is not a Microsoft 365 group.`);
|
|
40
47
|
}
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
48
|
+
const userIds = await this.getUserIds(logger, args.options.ids, userNames);
|
|
49
|
+
if (this.verbose) {
|
|
50
|
+
await logger.logToStderr(`Adding user(s) ${args.options.ids || userNames} to group ${args.options.groupId || args.options.groupName || args.options.teamId || args.options.teamName}...`);
|
|
51
|
+
}
|
|
52
|
+
await this.addUsers(providedGroupId, userIds, args.options.role);
|
|
53
|
+
}
|
|
54
|
+
catch (err) {
|
|
55
|
+
this.handleRejectedODataJsonPromise(err);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
async getGroupId(logger, args) {
|
|
59
|
+
if (args.options.groupId) {
|
|
60
|
+
return args.options.groupId;
|
|
61
|
+
}
|
|
62
|
+
if (args.options.teamId) {
|
|
63
|
+
return args.options.teamId;
|
|
64
|
+
}
|
|
65
|
+
const name = args.options.groupName || args.options.teamName;
|
|
66
|
+
if (this.verbose) {
|
|
67
|
+
await logger.logToStderr('Retrieving Group ID by display name...');
|
|
68
|
+
}
|
|
69
|
+
return entraGroup.getGroupIdByDisplayName(name);
|
|
70
|
+
}
|
|
71
|
+
async getUserIds(logger, userIds, userNames) {
|
|
72
|
+
if (userIds) {
|
|
73
|
+
return formatting.splitAndTrim(userIds);
|
|
74
|
+
}
|
|
75
|
+
if (this.verbose) {
|
|
76
|
+
await logger.logToStderr('Retrieving user ID(s) by username(s)...');
|
|
77
|
+
}
|
|
78
|
+
return entraUser.getUserIdsByUpns(formatting.splitAndTrim(userNames));
|
|
79
|
+
}
|
|
80
|
+
async addUsers(groupId, userIds, role) {
|
|
81
|
+
for (let i = 0; i < userIds.length; i += 400) {
|
|
82
|
+
const userIdsBatch = userIds.slice(i, i + 400);
|
|
83
|
+
const requestOptions = {
|
|
84
|
+
url: `${this.resource}/v1.0/$batch`,
|
|
52
85
|
headers: {
|
|
53
|
-
'
|
|
86
|
+
'content-type': 'application/json;odata.metadata=none'
|
|
54
87
|
},
|
|
55
88
|
responseType: 'json',
|
|
56
|
-
data: {
|
|
89
|
+
data: {
|
|
90
|
+
requests: []
|
|
91
|
+
}
|
|
57
92
|
};
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
93
|
+
for (let j = 0; j < userIdsBatch.length; j += 20) {
|
|
94
|
+
const userIdsChunk = userIdsBatch.slice(j, j + 20);
|
|
95
|
+
requestOptions.data.requests.push({
|
|
96
|
+
id: j + 1,
|
|
97
|
+
method: 'PATCH',
|
|
98
|
+
url: `/groups/${groupId}`,
|
|
99
|
+
headers: {
|
|
100
|
+
'content-type': 'application/json;odata.metadata=none'
|
|
101
|
+
},
|
|
102
|
+
body: {
|
|
103
|
+
[`${((typeof role !== 'undefined') ? role : '').toLowerCase() === 'owner' ? 'owners' : 'members'}@odata.bind`]: userIdsChunk.map(u => `${this.resource}/v1.0/directoryObjects/${u}`)
|
|
104
|
+
}
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
const res = await request.post(requestOptions);
|
|
108
|
+
for (const response of res.responses) {
|
|
109
|
+
if (response.status !== 204) {
|
|
110
|
+
throw response.body;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
62
113
|
}
|
|
63
114
|
}
|
|
64
115
|
}
|
|
65
116
|
_EntraM365GroupUserAddCommand_instances = new WeakSet(), _EntraM365GroupUserAddCommand_initTelemetry = function _EntraM365GroupUserAddCommand_initTelemetry() {
|
|
66
117
|
this.telemetry.push((args) => {
|
|
67
118
|
Object.assign(this.telemetryProperties, {
|
|
68
|
-
role: args.options.role,
|
|
119
|
+
role: args.options.role !== 'undefined',
|
|
69
120
|
teamId: typeof args.options.teamId !== 'undefined',
|
|
70
|
-
groupId: typeof args.options.groupId !== 'undefined'
|
|
121
|
+
groupId: typeof args.options.groupId !== 'undefined',
|
|
122
|
+
teamName: typeof args.options.teamName !== 'undefined',
|
|
123
|
+
groupName: typeof args.options.groupName !== 'undefined',
|
|
124
|
+
ids: typeof args.options.ids !== 'undefined',
|
|
125
|
+
userNames: typeof args.options.userNames !== 'undefined',
|
|
126
|
+
userName: typeof args.options.userName !== 'undefined'
|
|
71
127
|
});
|
|
72
128
|
});
|
|
73
129
|
}, _EntraM365GroupUserAddCommand_initOptions = function _EntraM365GroupUserAddCommand_initOptions() {
|
|
74
130
|
this.options.unshift({
|
|
75
|
-
option: '-n, --userName
|
|
131
|
+
option: '-n, --userName [userName]'
|
|
76
132
|
}, {
|
|
77
|
-
option:
|
|
133
|
+
option: '--ids [ids]'
|
|
78
134
|
}, {
|
|
79
|
-
option:
|
|
135
|
+
option: '--userNames [userNames]'
|
|
136
|
+
}, {
|
|
137
|
+
option: '-i, --groupId [groupId]'
|
|
138
|
+
}, {
|
|
139
|
+
option: '--groupName [groupName]'
|
|
140
|
+
}, {
|
|
141
|
+
option: '--teamId [teamId]'
|
|
142
|
+
}, {
|
|
143
|
+
option: '--teamName [teamName]'
|
|
80
144
|
}, {
|
|
81
145
|
option: '-r, --role [role]',
|
|
82
|
-
autocomplete:
|
|
146
|
+
autocomplete: this.allowedRoles
|
|
83
147
|
});
|
|
84
148
|
}, _EntraM365GroupUserAddCommand_initValidators = function _EntraM365GroupUserAddCommand_initValidators() {
|
|
85
149
|
this.validators.push(async (args) => {
|
|
86
150
|
if (args.options.teamId && !validation.isValidGuid(args.options.teamId)) {
|
|
87
|
-
return
|
|
151
|
+
return `'${args.options.teamId}' is not a valid GUID for option 'teamId'.`;
|
|
88
152
|
}
|
|
89
153
|
if (args.options.groupId && !validation.isValidGuid(args.options.groupId)) {
|
|
90
|
-
return
|
|
154
|
+
return `'${args.options.groupId}' is not a valid GUID for option 'groupId'.`;
|
|
91
155
|
}
|
|
92
|
-
if (args.options.
|
|
93
|
-
|
|
94
|
-
|
|
156
|
+
if (args.options.ids) {
|
|
157
|
+
const isValidGUIDArrayResult = validation.isValidGuidArray(args.options.ids);
|
|
158
|
+
if (isValidGUIDArrayResult !== true) {
|
|
159
|
+
return `The following GUIDs are invalid for the option 'ids': ${isValidGUIDArrayResult}.`;
|
|
95
160
|
}
|
|
96
161
|
}
|
|
162
|
+
if (args.options.userNames) {
|
|
163
|
+
const isValidUPNArrayResult = validation.isValidUserPrincipalNameArray(args.options.userNames);
|
|
164
|
+
if (isValidUPNArrayResult !== true) {
|
|
165
|
+
return `The following user principal names are invalid for the option 'userNames': ${isValidUPNArrayResult}.`;
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
if (args.options.role && !this.allowedRoles.some(role => role.toLowerCase() === args.options.role.toLowerCase())) {
|
|
169
|
+
return `'${args.options.role}' is not a valid role. Allowed values are: ${this.allowedRoles.join(',')}`;
|
|
170
|
+
}
|
|
97
171
|
return true;
|
|
98
172
|
});
|
|
99
173
|
}, _EntraM365GroupUserAddCommand_initOptionSets = function _EntraM365GroupUserAddCommand_initOptionSets() {
|
|
100
|
-
this.optionSets.push({ options: ['groupId', 'teamId'] });
|
|
174
|
+
this.optionSets.push({ options: ['groupId', 'groupName', 'teamId', 'teamName'] });
|
|
175
|
+
this.optionSets.push({ options: ['userName', 'ids', 'userNames'] });
|
|
176
|
+
}, _EntraM365GroupUserAddCommand_initTypes = function _EntraM365GroupUserAddCommand_initTypes() {
|
|
177
|
+
this.types.string.push('userName', 'ids', 'userNames', 'groupId', 'groupName', 'teamId', 'teamName', 'role');
|
|
101
178
|
};
|
|
102
179
|
export default new EntraM365GroupUserAddCommand();
|
|
103
180
|
//# sourceMappingURL=m365group-user-add.js.map
|