@pnp/cli-microsoft365 7.3.0 → 7.4.0-beta.4c4cef8
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/m365/app/commands/app-get.js +1 -1
- package/dist/m365/app/commands/permission/permission-list.js +1 -1
- package/dist/m365/{aad/commands.js → entra/aadCommands.js} +1 -1
- package/dist/m365/{aad → entra}/commands/administrativeunit/administrativeunit-add.js +12 -8
- package/dist/m365/{aad → entra}/commands/administrativeunit/administrativeunit-get.js +18 -14
- package/dist/m365/{aad → entra}/commands/administrativeunit/administrativeunit-list.js +6 -2
- package/dist/m365/{aad → entra}/commands/administrativeunit/administrativeunit-member-add.js +16 -12
- package/dist/m365/{aad → entra}/commands/administrativeunit/administrativeunit-member-get.js +16 -12
- package/dist/m365/{aad → entra}/commands/administrativeunit/administrativeunit-member-list.js +16 -12
- package/dist/m365/{aad → entra}/commands/administrativeunit/administrativeunit-remove.js +18 -14
- package/dist/m365/{aad → entra}/commands/app/app-add.js +25 -21
- package/dist/m365/{aad → entra}/commands/app/app-get.js +17 -13
- package/dist/m365/{aad → entra}/commands/app/app-list.js +7 -3
- package/dist/m365/{aad → entra}/commands/app/app-permission-add.js +16 -12
- package/dist/m365/{aad → entra}/commands/app/app-remove.js +17 -13
- package/dist/m365/{aad → entra}/commands/app/app-role-add.js +18 -14
- package/dist/m365/{aad → entra}/commands/app/app-role-list.js +15 -11
- package/dist/m365/{aad → entra}/commands/app/app-role-remove.js +17 -13
- package/dist/m365/{aad → entra}/commands/app/app-set.js +18 -14
- package/dist/m365/{aad → entra}/commands/approleassignment/approleassignment-add.js +17 -13
- package/dist/m365/{aad → entra}/commands/approleassignment/approleassignment-list.js +16 -12
- package/dist/m365/{aad → entra}/commands/approleassignment/approleassignment-remove.js +17 -13
- package/dist/m365/{aad → entra}/commands/group/group-get.js +17 -13
- package/dist/m365/{aad → entra}/commands/group/group-list.js +16 -12
- package/dist/m365/{aad → entra}/commands/group/group-remove.js +19 -15
- package/dist/m365/{aad → entra}/commands/group/group-user-list.js +17 -13
- package/dist/m365/{aad → entra}/commands/groupsetting/groupsetting-add.js +12 -8
- package/dist/m365/{aad → entra}/commands/groupsetting/groupsetting-get.js +12 -8
- package/dist/m365/{aad → entra}/commands/groupsetting/groupsetting-list.js +7 -3
- package/dist/m365/{aad → entra}/commands/groupsetting/groupsetting-remove.js +14 -10
- package/dist/m365/{aad → entra}/commands/groupsetting/groupsetting-set.js +12 -8
- package/dist/m365/{aad → entra}/commands/groupsettingtemplate/groupsettingtemplate-get.js +17 -13
- package/dist/m365/{aad → entra}/commands/groupsettingtemplate/groupsettingtemplate-list.js +7 -3
- package/dist/m365/{aad → entra}/commands/license/license-list.js +6 -2
- package/dist/m365/{aad → entra}/commands/m365group/m365group-add.js +19 -15
- package/dist/m365/{aad → entra}/commands/m365group/m365group-conversation-list.js +12 -8
- package/dist/m365/{aad → entra}/commands/m365group/m365group-conversation-post-list.js +16 -12
- package/dist/m365/{aad → entra}/commands/m365group/m365group-get.js +12 -8
- package/dist/m365/{aad → entra}/commands/m365group/m365group-list.js +12 -8
- package/dist/m365/{aad → entra}/commands/m365group/m365group-recyclebinitem-clear.js +12 -8
- package/dist/m365/{aad → entra}/commands/m365group/m365group-recyclebinitem-list.js +12 -8
- package/dist/m365/{aad → entra}/commands/m365group/m365group-recyclebinitem-remove.js +16 -12
- package/dist/m365/{aad → entra}/commands/m365group/m365group-recyclebinitem-restore.js +16 -12
- package/dist/m365/{aad → entra}/commands/m365group/m365group-remove.js +17 -13
- package/dist/m365/{aad → entra}/commands/m365group/m365group-renew.js +12 -8
- package/dist/m365/{aad → entra}/commands/m365group/m365group-report-activitycounts.js +4 -0
- package/dist/m365/{aad → entra}/commands/m365group/m365group-report-activitydetail.js +4 -0
- package/dist/m365/{aad → entra}/commands/m365group/m365group-report-activityfilecounts.js +4 -0
- package/dist/m365/{aad → entra}/commands/m365group/m365group-report-activitygroupcounts.js +4 -0
- package/dist/m365/{aad → entra}/commands/m365group/m365group-report-activitystorage.js +4 -0
- package/dist/m365/{aad → entra}/commands/m365group/m365group-set.js +19 -15
- package/dist/m365/{aad → entra}/commands/m365group/m365group-teamify.js +16 -12
- package/dist/m365/{aad → entra}/commands/m365group/m365group-user-add.js +14 -13
- package/dist/m365/entra/commands/m365group/m365group-user-list.js +154 -0
- package/dist/m365/{aad → entra}/commands/m365group/m365group-user-remove.js +14 -13
- package/dist/m365/{aad → entra}/commands/m365group/m365group-user-set.js +14 -13
- package/dist/m365/{aad → entra}/commands/oauth2grant/oauth2grant-add.js +12 -8
- package/dist/m365/{aad → entra}/commands/oauth2grant/oauth2grant-list.js +12 -8
- package/dist/m365/{aad → entra}/commands/oauth2grant/oauth2grant-remove.js +10 -6
- package/dist/m365/{aad → entra}/commands/oauth2grant/oauth2grant-set.js +10 -6
- package/dist/m365/{aad → entra}/commands/policy/policy-list.js +16 -12
- package/dist/m365/{aad → entra}/commands/siteclassification/siteclassification-disable.js +12 -8
- package/dist/m365/{aad → entra}/commands/siteclassification/siteclassification-enable.js +12 -8
- package/dist/m365/{aad → entra}/commands/siteclassification/siteclassification-get.js +6 -2
- package/dist/m365/{aad → entra}/commands/siteclassification/siteclassification-set.js +14 -10
- package/dist/m365/{aad → entra}/commands/sp/sp-add.js +17 -13
- package/dist/m365/{aad → entra}/commands/sp/sp-get.js +16 -12
- package/dist/m365/{aad → entra}/commands/sp/sp-list.js +12 -8
- package/dist/m365/{aad → entra}/commands/user/user-add.js +18 -14
- package/dist/m365/{aad → entra}/commands/user/user-get.js +16 -12
- package/dist/m365/{aad → entra}/commands/user/user-guest-add.js +12 -8
- package/dist/m365/{aad → entra}/commands/user/user-hibp.js +14 -10
- package/dist/m365/{aad → entra}/commands/user/user-license-add.js +16 -12
- package/dist/m365/{aad → entra}/commands/user/user-license-list.js +16 -12
- package/dist/m365/{aad → entra}/commands/user/user-license-remove.js +16 -12
- package/dist/m365/{aad → entra}/commands/user/user-list.js +12 -8
- package/dist/m365/{aad → entra}/commands/user/user-password-validate.js +10 -6
- package/dist/m365/{aad → entra}/commands/user/user-recyclebinitem-clear.js +12 -8
- package/dist/m365/{aad → entra}/commands/user/user-recyclebinitem-list.js +6 -2
- package/dist/m365/{aad → entra}/commands/user/user-recyclebinitem-remove.js +14 -10
- package/dist/m365/{aad → entra}/commands/user/user-recyclebinitem-restore.js +12 -8
- package/dist/m365/{aad → entra}/commands/user/user-remove.js +16 -12
- package/dist/m365/{aad → entra}/commands/user/user-set.js +18 -14
- package/dist/m365/{aad → entra}/commands/user/user-signin-list.js +15 -11
- package/dist/m365/entra/commands.js +85 -0
- package/dist/m365/pa/commands/app/app-get.js +26 -11
- package/dist/m365/pa/commands/app/app-remove.js +19 -2
- package/dist/m365/spo/commands/group/group-member-remove.js +1 -1
- package/dist/m365/spo/commands/group/group-set.js +1 -1
- package/dist/m365/spo/commands/site/site-set.js +1 -1
- package/dist/m365/teams/commands/app/app-install.js +1 -1
- package/dist/m365/teams/commands/meeting/meeting-attendancereport-list.js +1 -1
- package/docs/docs/cmd/{aad → entra}/administrativeunit/administrativeunit-add.mdx +10 -4
- package/docs/docs/cmd/{aad → entra}/administrativeunit/administrativeunit-get.mdx +9 -3
- package/docs/docs/cmd/{aad → entra}/administrativeunit/administrativeunit-list.mdx +9 -3
- package/docs/docs/cmd/{aad → entra}/administrativeunit/administrativeunit-member-add.mdx +13 -7
- package/docs/docs/cmd/{aad → entra}/administrativeunit/administrativeunit-member-get.mdx +9 -3
- package/docs/docs/cmd/{aad → entra}/administrativeunit/administrativeunit-member-list.mdx +16 -10
- package/docs/docs/cmd/{aad → entra}/administrativeunit/administrativeunit-remove.mdx +9 -3
- package/docs/docs/cmd/{aad → entra}/app/app-add.mdx +44 -38
- package/docs/docs/cmd/{aad → entra}/app/app-get.mdx +23 -17
- package/docs/docs/cmd/{aad → entra}/app/app-list.mdx +11 -5
- package/docs/docs/cmd/entra/app/app-permission-add.mdx +68 -0
- package/docs/docs/cmd/entra/app/app-remove.mdx +65 -0
- package/docs/docs/cmd/entra/app/app-role-add.mdx +74 -0
- package/docs/docs/cmd/{aad → entra}/app/app-role-list.mdx +20 -14
- package/docs/docs/cmd/entra/app/app-role-remove.mdx +84 -0
- package/docs/docs/cmd/entra/app/app-set.mdx +103 -0
- package/docs/docs/cmd/{aad → entra}/approleassignment/approleassignment-add.mdx +14 -8
- package/docs/docs/cmd/{aad → entra}/approleassignment/approleassignment-list.mdx +12 -6
- package/docs/docs/cmd/{aad → entra}/approleassignment/approleassignment-remove.mdx +13 -7
- package/docs/docs/cmd/{aad → entra}/group/group-get.mdx +15 -9
- package/docs/docs/cmd/{aad → entra}/group/group-list.mdx +13 -7
- package/docs/docs/cmd/entra/group/group-remove.mdx +50 -0
- package/docs/docs/cmd/{aad → entra}/group/group-user-list.mdx +17 -11
- package/docs/docs/cmd/{aad → entra}/groupsetting/groupsetting-add.mdx +11 -5
- package/docs/docs/cmd/{aad → entra}/groupsetting/groupsetting-get.mdx +9 -3
- package/docs/docs/cmd/{aad → entra}/groupsetting/groupsetting-list.mdx +10 -4
- package/docs/docs/cmd/{aad → entra}/groupsetting/groupsetting-remove.mdx +9 -3
- package/docs/docs/cmd/{aad → entra}/groupsetting/groupsetting-set.mdx +10 -4
- package/docs/docs/cmd/{aad → entra}/groupsettingtemplate/groupsettingtemplate-get.mdx +11 -5
- package/docs/docs/cmd/{aad → entra}/groupsettingtemplate/groupsettingtemplate-list.mdx +10 -4
- package/docs/docs/cmd/{aad → entra}/license/license-list.mdx +9 -3
- package/docs/docs/cmd/{aad → entra}/m365group/m365group-add.mdx +17 -11
- package/docs/docs/cmd/{aad → entra}/m365group/m365group-conversation-list.mdx +9 -3
- package/docs/docs/cmd/{aad → entra}/m365group/m365group-conversation-post-list.mdx +10 -4
- package/docs/docs/cmd/{aad → entra}/m365group/m365group-get.mdx +10 -4
- package/docs/docs/cmd/{aad → entra}/m365group/m365group-list.mdx +13 -7
- package/docs/docs/cmd/{aad → entra}/m365group/m365group-recyclebinitem-clear.mdx +9 -3
- package/docs/docs/cmd/{aad → entra}/m365group/m365group-recyclebinitem-list.mdx +12 -6
- package/docs/docs/cmd/{aad → entra}/m365group/m365group-recyclebinitem-remove.mdx +10 -4
- package/docs/docs/cmd/{aad → entra}/m365group/m365group-recyclebinitem-restore.mdx +10 -4
- package/docs/docs/cmd/{aad → entra}/m365group/m365group-remove.mdx +10 -4
- package/docs/docs/cmd/{aad → entra}/m365group/m365group-renew.mdx +8 -2
- package/docs/docs/cmd/{aad → entra}/m365group/m365group-report-activitycounts.mdx +10 -4
- package/docs/docs/cmd/{aad → entra}/m365group/m365group-report-activitydetail.mdx +11 -5
- package/docs/docs/cmd/{aad → entra}/m365group/m365group-report-activityfilecounts.mdx +10 -4
- package/docs/docs/cmd/{aad → entra}/m365group/m365group-report-activitygroupcounts.mdx +10 -4
- package/docs/docs/cmd/{aad → entra}/m365group/m365group-report-activitystorage.mdx +10 -4
- package/docs/docs/cmd/{aad → entra}/m365group/m365group-set.mdx +12 -6
- package/docs/docs/cmd/{aad → entra}/m365group/m365group-teamify.mdx +9 -3
- package/docs/docs/cmd/{aad → entra}/m365group/m365group-user-add.mdx +9 -3
- package/docs/docs/cmd/entra/m365group/m365group-user-list.mdx +131 -0
- package/docs/docs/cmd/{aad → entra}/m365group/m365group-user-remove.mdx +9 -5
- package/docs/docs/cmd/{aad → entra}/m365group/m365group-user-set.mdx +10 -6
- package/docs/docs/cmd/{aad → entra}/oauth2grant/oauth2grant-add.mdx +15 -9
- package/docs/docs/cmd/{aad → entra}/oauth2grant/oauth2grant-list.mdx +11 -5
- package/docs/docs/cmd/{aad → entra}/oauth2grant/oauth2grant-remove.mdx +13 -7
- package/docs/docs/cmd/{aad → entra}/oauth2grant/oauth2grant-set.mdx +12 -6
- package/docs/docs/cmd/{aad → entra}/policy/policy-list.mdx +14 -8
- package/docs/docs/cmd/{aad → entra}/siteclassification/siteclassification-disable.mdx +9 -3
- package/docs/docs/cmd/{aad → entra}/siteclassification/siteclassification-enable.mdx +10 -4
- package/docs/docs/cmd/{aad → entra}/siteclassification/siteclassification-get.mdx +9 -3
- package/docs/docs/cmd/{aad → entra}/siteclassification/siteclassification-set.mdx +11 -5
- package/docs/docs/cmd/{aad → entra}/sp/sp-add.mdx +25 -19
- package/docs/docs/cmd/{aad → entra}/sp/sp-get.mdx +12 -6
- package/docs/docs/cmd/{aad → entra}/sp/sp-list.mdx +10 -4
- package/docs/docs/cmd/{aad → entra}/user/user-add.mdx +12 -6
- package/docs/docs/cmd/{aad → entra}/user/user-get.mdx +16 -10
- package/docs/docs/cmd/{aad → entra}/user/user-guest-add.mdx +11 -5
- package/docs/docs/cmd/{aad → entra}/user/user-hibp.mdx +10 -4
- package/docs/docs/cmd/{aad → entra}/user/user-license-add.mdx +10 -4
- package/docs/docs/cmd/{aad → entra}/user/user-license-list.mdx +11 -5
- package/docs/docs/cmd/{aad → entra}/user/user-license-remove.mdx +9 -3
- package/docs/docs/cmd/{aad → entra}/user/user-list.mdx +12 -6
- package/docs/docs/cmd/{aad → entra}/user/user-password-validate.mdx +9 -3
- package/docs/docs/cmd/{aad → entra}/user/user-recyclebinitem-clear.mdx +9 -3
- package/docs/docs/cmd/{aad → entra}/user/user-recyclebinitem-list.mdx +9 -3
- package/docs/docs/cmd/{aad → entra}/user/user-recyclebinitem-remove.mdx +9 -3
- package/docs/docs/cmd/{aad → entra}/user/user-recyclebinitem-restore.mdx +8 -2
- package/docs/docs/cmd/{aad → entra}/user/user-remove.mdx +9 -3
- package/docs/docs/cmd/{aad → entra}/user/user-set.mdx +15 -9
- package/docs/docs/cmd/{aad → entra}/user/user-signin-list.mdx +19 -13
- package/docs/docs/cmd/pa/app/app-get.mdx +15 -0
- package/docs/docs/cmd/pa/app/app-remove.mdx +14 -0
- package/docs/docs/cmd/planner/plan/plan-add.mdx +1 -1
- package/docs/docs/cmd/spo/site/site-add.mdx +1 -1
- package/docs/docs/cmd/teams/team/team-add.mdx +1 -1
- package/npm-shrinkwrap.json +2 -2
- package/package.json +2 -2
- package/dist/m365/aad/commands/m365group/m365group-user-list.js +0 -94
- package/docs/docs/cmd/aad/app/app-permission-add.mdx +0 -62
- package/docs/docs/cmd/aad/app/app-remove.mdx +0 -59
- package/docs/docs/cmd/aad/app/app-role-add.mdx +0 -68
- package/docs/docs/cmd/aad/app/app-role-remove.mdx +0 -78
- package/docs/docs/cmd/aad/app/app-set.mdx +0 -97
- package/docs/docs/cmd/aad/group/group-remove.mdx +0 -44
- package/docs/docs/cmd/aad/m365group/m365group-user-list.mdx +0 -99
- /package/dist/m365/{aad → entra}/commands/approleassignment/ServicePrincipal.js +0 -0
- /package/dist/m365/{aad → entra}/commands/m365group/GroupExtended.js +0 -0
- /package/dist/m365/{aad → entra}/commands/siteclassification/SiteClassificationSettings.js +0 -0
|
@@ -3,7 +3,7 @@ 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
|
|
6
|
+
var _EntraM365GroupSetCommand_instances, _EntraM365GroupSetCommand_initTelemetry, _EntraM365GroupSetCommand_initOptions, _EntraM365GroupSetCommand_initTypes, _EntraM365GroupSetCommand_initValidators;
|
|
7
7
|
import { setTimeout } from 'timers/promises';
|
|
8
8
|
import fs from 'fs';
|
|
9
9
|
import path from 'path';
|
|
@@ -12,21 +12,25 @@ import { validation } from '../../../../utils/validation.js';
|
|
|
12
12
|
import GraphCommand from '../../../base/GraphCommand.js';
|
|
13
13
|
import commands from '../../commands.js';
|
|
14
14
|
import { aadGroup } from '../../../../utils/aadGroup.js';
|
|
15
|
-
|
|
15
|
+
import aadCommands from '../../aadCommands.js';
|
|
16
|
+
class EntraM365GroupSetCommand extends GraphCommand {
|
|
16
17
|
get name() {
|
|
17
18
|
return commands.M365GROUP_SET;
|
|
18
19
|
}
|
|
19
20
|
get description() {
|
|
20
21
|
return 'Updates Microsoft 365 Group properties';
|
|
21
22
|
}
|
|
23
|
+
alias() {
|
|
24
|
+
return [aadCommands.M365GROUP_SET];
|
|
25
|
+
}
|
|
22
26
|
constructor() {
|
|
23
27
|
super();
|
|
24
|
-
|
|
28
|
+
_EntraM365GroupSetCommand_instances.add(this);
|
|
25
29
|
this.pollingInterval = 500;
|
|
26
|
-
__classPrivateFieldGet(this,
|
|
27
|
-
__classPrivateFieldGet(this,
|
|
28
|
-
__classPrivateFieldGet(this,
|
|
29
|
-
__classPrivateFieldGet(this,
|
|
30
|
+
__classPrivateFieldGet(this, _EntraM365GroupSetCommand_instances, "m", _EntraM365GroupSetCommand_initTelemetry).call(this);
|
|
31
|
+
__classPrivateFieldGet(this, _EntraM365GroupSetCommand_instances, "m", _EntraM365GroupSetCommand_initOptions).call(this);
|
|
32
|
+
__classPrivateFieldGet(this, _EntraM365GroupSetCommand_instances, "m", _EntraM365GroupSetCommand_initTypes).call(this);
|
|
33
|
+
__classPrivateFieldGet(this, _EntraM365GroupSetCommand_instances, "m", _EntraM365GroupSetCommand_initValidators).call(this);
|
|
30
34
|
}
|
|
31
35
|
async commandAction(logger, args) {
|
|
32
36
|
try {
|
|
@@ -70,7 +74,7 @@ class AadM365GroupSetCommand extends GraphCommand {
|
|
|
70
74
|
},
|
|
71
75
|
data: fs.readFileSync(fullPath)
|
|
72
76
|
};
|
|
73
|
-
await this.setGroupLogo(requestOptions,
|
|
77
|
+
await this.setGroupLogo(requestOptions, EntraM365GroupSetCommand.numRepeat, logger);
|
|
74
78
|
}
|
|
75
79
|
else if (this.debug) {
|
|
76
80
|
await logger.logToStderr('logoPath not set. Skipping');
|
|
@@ -140,7 +144,7 @@ class AadM365GroupSetCommand extends GraphCommand {
|
|
|
140
144
|
}
|
|
141
145
|
catch (err) {
|
|
142
146
|
if (--retryLeft > 0) {
|
|
143
|
-
await setTimeout(this.pollingInterval * (
|
|
147
|
+
await setTimeout(this.pollingInterval * (EntraM365GroupSetCommand.numRepeat - retryLeft));
|
|
144
148
|
await this.setGroupLogo(requestOptions, retryLeft, logger);
|
|
145
149
|
}
|
|
146
150
|
else {
|
|
@@ -160,7 +164,7 @@ class AadM365GroupSetCommand extends GraphCommand {
|
|
|
160
164
|
}
|
|
161
165
|
}
|
|
162
166
|
}
|
|
163
|
-
|
|
167
|
+
_EntraM365GroupSetCommand_instances = new WeakSet(), _EntraM365GroupSetCommand_initTelemetry = function _EntraM365GroupSetCommand_initTelemetry() {
|
|
164
168
|
this.telemetry.push((args) => {
|
|
165
169
|
Object.assign(this.telemetryProperties, {
|
|
166
170
|
displayName: typeof args.options.displayName !== 'undefined',
|
|
@@ -171,7 +175,7 @@ _AadM365GroupSetCommand_instances = new WeakSet(), _AadM365GroupSetCommand_initT
|
|
|
171
175
|
logoPath: typeof args.options.logoPath !== 'undefined'
|
|
172
176
|
});
|
|
173
177
|
});
|
|
174
|
-
},
|
|
178
|
+
}, _EntraM365GroupSetCommand_initOptions = function _EntraM365GroupSetCommand_initOptions() {
|
|
175
179
|
this.options.unshift({
|
|
176
180
|
option: '-i, --id <id>'
|
|
177
181
|
}, {
|
|
@@ -188,9 +192,9 @@ _AadM365GroupSetCommand_instances = new WeakSet(), _AadM365GroupSetCommand_initT
|
|
|
188
192
|
}, {
|
|
189
193
|
option: '-l, --logoPath [logoPath]'
|
|
190
194
|
});
|
|
191
|
-
},
|
|
195
|
+
}, _EntraM365GroupSetCommand_initTypes = function _EntraM365GroupSetCommand_initTypes() {
|
|
192
196
|
this.types.boolean.push('isPrivate');
|
|
193
|
-
},
|
|
197
|
+
}, _EntraM365GroupSetCommand_initValidators = function _EntraM365GroupSetCommand_initValidators() {
|
|
194
198
|
this.validators.push(async (args) => {
|
|
195
199
|
if (!args.options.displayName &&
|
|
196
200
|
!args.options.description &&
|
|
@@ -231,6 +235,6 @@ _AadM365GroupSetCommand_instances = new WeakSet(), _AadM365GroupSetCommand_initT
|
|
|
231
235
|
return true;
|
|
232
236
|
});
|
|
233
237
|
};
|
|
234
|
-
|
|
235
|
-
export default new
|
|
238
|
+
EntraM365GroupSetCommand.numRepeat = 15;
|
|
239
|
+
export default new EntraM365GroupSetCommand();
|
|
236
240
|
//# sourceMappingURL=m365group-set.js.map
|
|
@@ -3,28 +3,32 @@ 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
|
|
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
9
|
import { aadGroup } from '../../../../utils/aadGroup.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';
|
|
13
|
+
import aadCommands from '../../aadCommands.js';
|
|
13
14
|
import commands from '../../commands.js';
|
|
14
|
-
class
|
|
15
|
+
class EntraM365GroupTeamifyCommand extends GraphCommand {
|
|
15
16
|
get name() {
|
|
16
17
|
return commands.M365GROUP_TEAMIFY;
|
|
17
18
|
}
|
|
18
19
|
get description() {
|
|
19
20
|
return 'Creates a new Microsoft Teams team under existing Microsoft 365 group';
|
|
20
21
|
}
|
|
22
|
+
alias() {
|
|
23
|
+
return [aadCommands.M365GROUP_TEAMIFY];
|
|
24
|
+
}
|
|
21
25
|
constructor() {
|
|
22
26
|
super();
|
|
23
|
-
|
|
24
|
-
__classPrivateFieldGet(this,
|
|
25
|
-
__classPrivateFieldGet(this,
|
|
26
|
-
__classPrivateFieldGet(this,
|
|
27
|
-
__classPrivateFieldGet(this,
|
|
27
|
+
_EntraM365GroupTeamifyCommand_instances.add(this);
|
|
28
|
+
__classPrivateFieldGet(this, _EntraM365GroupTeamifyCommand_instances, "m", _EntraM365GroupTeamifyCommand_initTelemetry).call(this);
|
|
29
|
+
__classPrivateFieldGet(this, _EntraM365GroupTeamifyCommand_instances, "m", _EntraM365GroupTeamifyCommand_initOptions).call(this);
|
|
30
|
+
__classPrivateFieldGet(this, _EntraM365GroupTeamifyCommand_instances, "m", _EntraM365GroupTeamifyCommand_initValidators).call(this);
|
|
31
|
+
__classPrivateFieldGet(this, _EntraM365GroupTeamifyCommand_instances, "m", _EntraM365GroupTeamifyCommand_initOptionSets).call(this);
|
|
28
32
|
}
|
|
29
33
|
async getGroupId(options) {
|
|
30
34
|
if (options.id) {
|
|
@@ -85,28 +89,28 @@ class AadM365GroupTeamifyCommand extends GraphCommand {
|
|
|
85
89
|
}
|
|
86
90
|
}
|
|
87
91
|
}
|
|
88
|
-
|
|
92
|
+
_EntraM365GroupTeamifyCommand_instances = new WeakSet(), _EntraM365GroupTeamifyCommand_initTelemetry = function _EntraM365GroupTeamifyCommand_initTelemetry() {
|
|
89
93
|
this.telemetry.push((args) => {
|
|
90
94
|
Object.assign(this.telemetryProperties, {
|
|
91
95
|
id: typeof args.options.id !== 'undefined',
|
|
92
96
|
mailNickname: typeof args.options.mailNickname !== 'undefined'
|
|
93
97
|
});
|
|
94
98
|
});
|
|
95
|
-
},
|
|
99
|
+
}, _EntraM365GroupTeamifyCommand_initOptions = function _EntraM365GroupTeamifyCommand_initOptions() {
|
|
96
100
|
this.options.unshift({
|
|
97
101
|
option: '-i, --id [id]'
|
|
98
102
|
}, {
|
|
99
103
|
option: '--mailNickname [mailNickname]'
|
|
100
104
|
});
|
|
101
|
-
},
|
|
105
|
+
}, _EntraM365GroupTeamifyCommand_initValidators = function _EntraM365GroupTeamifyCommand_initValidators() {
|
|
102
106
|
this.validators.push(async (args) => {
|
|
103
107
|
if (args.options.id && !validation.isValidGuid(args.options.id)) {
|
|
104
108
|
return `${args.options.id} is not a valid GUID`;
|
|
105
109
|
}
|
|
106
110
|
return true;
|
|
107
111
|
});
|
|
108
|
-
},
|
|
112
|
+
}, _EntraM365GroupTeamifyCommand_initOptionSets = function _EntraM365GroupTeamifyCommand_initOptionSets() {
|
|
109
113
|
this.optionSets.push({ options: ['id', 'mailNickname'] });
|
|
110
114
|
};
|
|
111
|
-
export default new
|
|
115
|
+
export default new EntraM365GroupTeamifyCommand();
|
|
112
116
|
//# sourceMappingURL=m365group-teamify.js.map
|
|
@@ -3,15 +3,16 @@ 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
|
|
6
|
+
var _EntraM365GroupUserAddCommand_instances, _EntraM365GroupUserAddCommand_initTelemetry, _EntraM365GroupUserAddCommand_initOptions, _EntraM365GroupUserAddCommand_initValidators, _EntraM365GroupUserAddCommand_initOptionSets;
|
|
7
7
|
import request from '../../../../request.js';
|
|
8
8
|
import { aadGroup } from '../../../../utils/aadGroup.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';
|
|
12
12
|
import teamsCommands from '../../../teams/commands.js';
|
|
13
|
+
import aadCommands from '../../aadCommands.js';
|
|
13
14
|
import commands from '../../commands.js';
|
|
14
|
-
class
|
|
15
|
+
class EntraM365GroupUserAddCommand extends GraphCommand {
|
|
15
16
|
get name() {
|
|
16
17
|
return commands.M365GROUP_USER_ADD;
|
|
17
18
|
}
|
|
@@ -19,15 +20,15 @@ class AadM365GroupUserAddCommand extends GraphCommand {
|
|
|
19
20
|
return 'Adds user to specified Microsoft 365 Group or Microsoft Teams team';
|
|
20
21
|
}
|
|
21
22
|
alias() {
|
|
22
|
-
return [teamsCommands.USER_ADD];
|
|
23
|
+
return [teamsCommands.USER_ADD, aadCommands.M365GROUP_USER_ADD];
|
|
23
24
|
}
|
|
24
25
|
constructor() {
|
|
25
26
|
super();
|
|
26
|
-
|
|
27
|
-
__classPrivateFieldGet(this,
|
|
28
|
-
__classPrivateFieldGet(this,
|
|
29
|
-
__classPrivateFieldGet(this,
|
|
30
|
-
__classPrivateFieldGet(this,
|
|
27
|
+
_EntraM365GroupUserAddCommand_instances.add(this);
|
|
28
|
+
__classPrivateFieldGet(this, _EntraM365GroupUserAddCommand_instances, "m", _EntraM365GroupUserAddCommand_initTelemetry).call(this);
|
|
29
|
+
__classPrivateFieldGet(this, _EntraM365GroupUserAddCommand_instances, "m", _EntraM365GroupUserAddCommand_initOptions).call(this);
|
|
30
|
+
__classPrivateFieldGet(this, _EntraM365GroupUserAddCommand_instances, "m", _EntraM365GroupUserAddCommand_initValidators).call(this);
|
|
31
|
+
__classPrivateFieldGet(this, _EntraM365GroupUserAddCommand_instances, "m", _EntraM365GroupUserAddCommand_initOptionSets).call(this);
|
|
31
32
|
}
|
|
32
33
|
async commandAction(logger, args) {
|
|
33
34
|
try {
|
|
@@ -60,7 +61,7 @@ class AadM365GroupUserAddCommand extends GraphCommand {
|
|
|
60
61
|
}
|
|
61
62
|
}
|
|
62
63
|
}
|
|
63
|
-
|
|
64
|
+
_EntraM365GroupUserAddCommand_instances = new WeakSet(), _EntraM365GroupUserAddCommand_initTelemetry = function _EntraM365GroupUserAddCommand_initTelemetry() {
|
|
64
65
|
this.telemetry.push((args) => {
|
|
65
66
|
Object.assign(this.telemetryProperties, {
|
|
66
67
|
role: args.options.role,
|
|
@@ -68,7 +69,7 @@ _AadM365GroupUserAddCommand_instances = new WeakSet(), _AadM365GroupUserAddComma
|
|
|
68
69
|
groupId: typeof args.options.groupId !== 'undefined'
|
|
69
70
|
});
|
|
70
71
|
});
|
|
71
|
-
},
|
|
72
|
+
}, _EntraM365GroupUserAddCommand_initOptions = function _EntraM365GroupUserAddCommand_initOptions() {
|
|
72
73
|
this.options.unshift({
|
|
73
74
|
option: '-n, --userName <userName>'
|
|
74
75
|
}, {
|
|
@@ -79,7 +80,7 @@ _AadM365GroupUserAddCommand_instances = new WeakSet(), _AadM365GroupUserAddComma
|
|
|
79
80
|
option: '-r, --role [role]',
|
|
80
81
|
autocomplete: ['Owner', 'Member']
|
|
81
82
|
});
|
|
82
|
-
},
|
|
83
|
+
}, _EntraM365GroupUserAddCommand_initValidators = function _EntraM365GroupUserAddCommand_initValidators() {
|
|
83
84
|
this.validators.push(async (args) => {
|
|
84
85
|
if (args.options.teamId && !validation.isValidGuid(args.options.teamId)) {
|
|
85
86
|
return `${args.options.teamId} is not a valid GUID`;
|
|
@@ -94,8 +95,8 @@ _AadM365GroupUserAddCommand_instances = new WeakSet(), _AadM365GroupUserAddComma
|
|
|
94
95
|
}
|
|
95
96
|
return true;
|
|
96
97
|
});
|
|
97
|
-
},
|
|
98
|
+
}, _EntraM365GroupUserAddCommand_initOptionSets = function _EntraM365GroupUserAddCommand_initOptionSets() {
|
|
98
99
|
this.optionSets.push({ options: ['groupId', 'teamId'] });
|
|
99
100
|
};
|
|
100
|
-
export default new
|
|
101
|
+
export default new EntraM365GroupUserAddCommand();
|
|
101
102
|
//# sourceMappingURL=m365group-user-add.js.map
|
|
@@ -0,0 +1,154 @@
|
|
|
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 _EntraM365GroupUserListCommand_instances, _EntraM365GroupUserListCommand_initTelemetry, _EntraM365GroupUserListCommand_initOptions, _EntraM365GroupUserListCommand_initOptionSets, _EntraM365GroupUserListCommand_initValidators;
|
|
7
|
+
import { odata } from '../../../../utils/odata.js';
|
|
8
|
+
import { validation } from '../../../../utils/validation.js';
|
|
9
|
+
import GraphCommand from '../../../base/GraphCommand.js';
|
|
10
|
+
import commands from '../../commands.js';
|
|
11
|
+
import { aadGroup } from '../../../../utils/aadGroup.js';
|
|
12
|
+
import aadCommands from '../../aadCommands.js';
|
|
13
|
+
class EntraM365GroupUserListCommand extends GraphCommand {
|
|
14
|
+
get name() {
|
|
15
|
+
return commands.M365GROUP_USER_LIST;
|
|
16
|
+
}
|
|
17
|
+
get description() {
|
|
18
|
+
return "Lists users for the specified Microsoft 365 group";
|
|
19
|
+
}
|
|
20
|
+
alias() {
|
|
21
|
+
return [aadCommands.M365GROUP_USER_LIST];
|
|
22
|
+
}
|
|
23
|
+
constructor() {
|
|
24
|
+
super();
|
|
25
|
+
_EntraM365GroupUserListCommand_instances.add(this);
|
|
26
|
+
__classPrivateFieldGet(this, _EntraM365GroupUserListCommand_instances, "m", _EntraM365GroupUserListCommand_initTelemetry).call(this);
|
|
27
|
+
__classPrivateFieldGet(this, _EntraM365GroupUserListCommand_instances, "m", _EntraM365GroupUserListCommand_initOptions).call(this);
|
|
28
|
+
__classPrivateFieldGet(this, _EntraM365GroupUserListCommand_instances, "m", _EntraM365GroupUserListCommand_initOptionSets).call(this);
|
|
29
|
+
__classPrivateFieldGet(this, _EntraM365GroupUserListCommand_instances, "m", _EntraM365GroupUserListCommand_initValidators).call(this);
|
|
30
|
+
}
|
|
31
|
+
async commandAction(logger, args) {
|
|
32
|
+
try {
|
|
33
|
+
if (args.options.role === 'Guest') {
|
|
34
|
+
this.warn(logger, `Value 'Guest' for the option role is deprecated. Use --filter "userType eq 'Guest'" instead.`);
|
|
35
|
+
}
|
|
36
|
+
const groupId = await this.getGroupId(args.options, logger);
|
|
37
|
+
const isUnifiedGroup = await aadGroup.isUnifiedGroup(groupId);
|
|
38
|
+
if (!isUnifiedGroup) {
|
|
39
|
+
throw Error(`Specified group '${args.options.groupId || args.options.groupDisplayName}' is not a Microsoft 365 group.`);
|
|
40
|
+
}
|
|
41
|
+
let users = [];
|
|
42
|
+
if (!args.options.role || args.options.role === 'Owner') {
|
|
43
|
+
const owners = await this.getUsers(args.options, 'Owners', groupId, logger);
|
|
44
|
+
owners.forEach(owner => users.push({ ...owner, roles: ['Owner'], userType: 'Owner' }));
|
|
45
|
+
}
|
|
46
|
+
if (!args.options.role || args.options.role === 'Member' || args.options.role === 'Guest') {
|
|
47
|
+
const members = await this.getUsers(args.options, 'Members', groupId, logger);
|
|
48
|
+
members.forEach((member) => {
|
|
49
|
+
const user = users.find((u) => u.id === member.id);
|
|
50
|
+
if (user !== undefined) {
|
|
51
|
+
user.roles.push('Member');
|
|
52
|
+
}
|
|
53
|
+
else {
|
|
54
|
+
users.push({ ...member, roles: ['Member'] });
|
|
55
|
+
}
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
if (args.options.role) {
|
|
59
|
+
users = users.filter(i => i.userType === args.options.role);
|
|
60
|
+
}
|
|
61
|
+
await logger.log(users);
|
|
62
|
+
}
|
|
63
|
+
catch (err) {
|
|
64
|
+
this.handleRejectedODataJsonPromise(err);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
async getGroupId(options, logger) {
|
|
68
|
+
if (options.groupId) {
|
|
69
|
+
return options.groupId;
|
|
70
|
+
}
|
|
71
|
+
if (this.verbose) {
|
|
72
|
+
await logger.logToStderr('Retrieving Group Id...');
|
|
73
|
+
}
|
|
74
|
+
return await aadGroup.getGroupIdByDisplayName(options.groupDisplayName);
|
|
75
|
+
}
|
|
76
|
+
async getUsers(options, role, groupId, logger) {
|
|
77
|
+
const { properties, filter } = options;
|
|
78
|
+
if (this.verbose) {
|
|
79
|
+
await logger.logToStderr(`Retrieving ${role} of the group with id ${groupId}`);
|
|
80
|
+
}
|
|
81
|
+
const selectProperties = properties ?
|
|
82
|
+
`${properties.split(',').filter(f => f.toLowerCase() !== 'id').concat('id').map(p => p.trim()).join(',')}` :
|
|
83
|
+
'id,displayName,userPrincipalName,givenName,surname,userType';
|
|
84
|
+
const allSelectProperties = selectProperties.split(',');
|
|
85
|
+
const propertiesWithSlash = allSelectProperties.filter(item => item.includes('/'));
|
|
86
|
+
const fieldsToExpand = [];
|
|
87
|
+
propertiesWithSlash.forEach(p => {
|
|
88
|
+
const propertiesSplit = p.split('/');
|
|
89
|
+
fieldsToExpand.push(`${propertiesSplit[0]}($select=${propertiesSplit[1]})`);
|
|
90
|
+
});
|
|
91
|
+
const fieldExpand = fieldsToExpand.join(',');
|
|
92
|
+
const expandParam = fieldExpand.length > 0 ? `&$expand=${fieldExpand}` : '';
|
|
93
|
+
const selectParam = allSelectProperties.filter(item => !item.includes('/'));
|
|
94
|
+
const endpoint = `${this.resource}/v1.0/groups/${groupId}/${role}/microsoft.graph.user?$select=${selectParam}${expandParam}`;
|
|
95
|
+
if (filter) {
|
|
96
|
+
// While using the filter, we need to specify the ConsistencyLevel header.
|
|
97
|
+
// Can be refactored when the header is no longer necessary.
|
|
98
|
+
const requestOptions = {
|
|
99
|
+
url: `${endpoint}&$filter=${encodeURIComponent(filter)}&$count=true`,
|
|
100
|
+
headers: {
|
|
101
|
+
accept: 'application/json;odata.metadata=none',
|
|
102
|
+
ConsistencyLevel: 'eventual'
|
|
103
|
+
},
|
|
104
|
+
responseType: 'json'
|
|
105
|
+
};
|
|
106
|
+
return await odata.getAllItems(requestOptions);
|
|
107
|
+
}
|
|
108
|
+
else {
|
|
109
|
+
return await odata.getAllItems(endpoint);
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
_EntraM365GroupUserListCommand_instances = new WeakSet(), _EntraM365GroupUserListCommand_initTelemetry = function _EntraM365GroupUserListCommand_initTelemetry() {
|
|
114
|
+
this.telemetry.push((args) => {
|
|
115
|
+
Object.assign(this.telemetryProperties, {
|
|
116
|
+
groupId: typeof args.options.groupId !== 'undefined',
|
|
117
|
+
groupDisplayName: typeof args.options.groupDisplayName !== 'undefined',
|
|
118
|
+
role: typeof args.options.role !== 'undefined',
|
|
119
|
+
properties: typeof args.options.properties !== 'undefined',
|
|
120
|
+
filter: typeof args.options.filter !== 'undefined'
|
|
121
|
+
});
|
|
122
|
+
});
|
|
123
|
+
}, _EntraM365GroupUserListCommand_initOptions = function _EntraM365GroupUserListCommand_initOptions() {
|
|
124
|
+
this.options.unshift({
|
|
125
|
+
option: "-i, --groupId [groupId]"
|
|
126
|
+
}, {
|
|
127
|
+
option: "-n, --groupDisplayName [groupDisplayName]"
|
|
128
|
+
}, {
|
|
129
|
+
option: "-r, --role [type]",
|
|
130
|
+
autocomplete: ["Owner", "Member", "Guest"]
|
|
131
|
+
}, {
|
|
132
|
+
option: "-p, --properties [properties]"
|
|
133
|
+
}, {
|
|
134
|
+
option: "-f, --filter [filter]"
|
|
135
|
+
});
|
|
136
|
+
}, _EntraM365GroupUserListCommand_initOptionSets = function _EntraM365GroupUserListCommand_initOptionSets() {
|
|
137
|
+
this.optionSets.push({
|
|
138
|
+
options: ['groupId', 'groupDisplayName']
|
|
139
|
+
});
|
|
140
|
+
}, _EntraM365GroupUserListCommand_initValidators = function _EntraM365GroupUserListCommand_initValidators() {
|
|
141
|
+
this.validators.push(async (args) => {
|
|
142
|
+
if (args.options.groupId && !validation.isValidGuid(args.options.groupId)) {
|
|
143
|
+
return `${args.options.groupId} is not a valid GUID`;
|
|
144
|
+
}
|
|
145
|
+
if (args.options.role) {
|
|
146
|
+
if (['Owner', 'Member', 'Guest'].indexOf(args.options.role) === -1) {
|
|
147
|
+
return `${args.options.role} is not a valid role value. Allowed values Owner|Member|Guest`;
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
return true;
|
|
151
|
+
});
|
|
152
|
+
};
|
|
153
|
+
export default new EntraM365GroupUserListCommand();
|
|
154
|
+
//# sourceMappingURL=m365group-user-list.js.map
|
|
@@ -3,7 +3,7 @@ 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
|
|
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
9
|
import { aadGroup } from '../../../../utils/aadGroup.js';
|
|
@@ -11,8 +11,9 @@ import { formatting } from '../../../../utils/formatting.js';
|
|
|
11
11
|
import { validation } from '../../../../utils/validation.js';
|
|
12
12
|
import GraphCommand from '../../../base/GraphCommand.js';
|
|
13
13
|
import teamsCommands from '../../../teams/commands.js';
|
|
14
|
+
import aadCommands from '../../aadCommands.js';
|
|
14
15
|
import commands from '../../commands.js';
|
|
15
|
-
class
|
|
16
|
+
class EntraM365GroupUserRemoveCommand extends GraphCommand {
|
|
16
17
|
get name() {
|
|
17
18
|
return commands.M365GROUP_USER_REMOVE;
|
|
18
19
|
}
|
|
@@ -20,15 +21,15 @@ class AadM365GroupUserRemoveCommand extends GraphCommand {
|
|
|
20
21
|
return 'Removes the specified user from specified Microsoft 365 Group or Microsoft Teams team';
|
|
21
22
|
}
|
|
22
23
|
alias() {
|
|
23
|
-
return [teamsCommands.USER_REMOVE];
|
|
24
|
+
return [teamsCommands.USER_REMOVE, aadCommands.M365GROUP_USER_REMOVE];
|
|
24
25
|
}
|
|
25
26
|
constructor() {
|
|
26
27
|
super();
|
|
27
|
-
|
|
28
|
-
__classPrivateFieldGet(this,
|
|
29
|
-
__classPrivateFieldGet(this,
|
|
30
|
-
__classPrivateFieldGet(this,
|
|
31
|
-
__classPrivateFieldGet(this,
|
|
28
|
+
_EntraM365GroupUserRemoveCommand_instances.add(this);
|
|
29
|
+
__classPrivateFieldGet(this, _EntraM365GroupUserRemoveCommand_instances, "m", _EntraM365GroupUserRemoveCommand_initTelemetry).call(this);
|
|
30
|
+
__classPrivateFieldGet(this, _EntraM365GroupUserRemoveCommand_instances, "m", _EntraM365GroupUserRemoveCommand_initOptions).call(this);
|
|
31
|
+
__classPrivateFieldGet(this, _EntraM365GroupUserRemoveCommand_instances, "m", _EntraM365GroupUserRemoveCommand_initValidators).call(this);
|
|
32
|
+
__classPrivateFieldGet(this, _EntraM365GroupUserRemoveCommand_instances, "m", _EntraM365GroupUserRemoveCommand_initOptionSets).call(this);
|
|
32
33
|
}
|
|
33
34
|
async commandAction(logger, args) {
|
|
34
35
|
const groupId = (typeof args.options.groupId !== 'undefined') ? args.options.groupId : args.options.teamId;
|
|
@@ -99,7 +100,7 @@ class AadM365GroupUserRemoveCommand extends GraphCommand {
|
|
|
99
100
|
}
|
|
100
101
|
}
|
|
101
102
|
}
|
|
102
|
-
|
|
103
|
+
_EntraM365GroupUserRemoveCommand_instances = new WeakSet(), _EntraM365GroupUserRemoveCommand_initTelemetry = function _EntraM365GroupUserRemoveCommand_initTelemetry() {
|
|
103
104
|
this.telemetry.push((args) => {
|
|
104
105
|
Object.assign(this.telemetryProperties, {
|
|
105
106
|
force: (!(!args.options.force)).toString(),
|
|
@@ -107,7 +108,7 @@ _AadM365GroupUserRemoveCommand_instances = new WeakSet(), _AadM365GroupUserRemov
|
|
|
107
108
|
groupId: typeof args.options.groupId !== 'undefined'
|
|
108
109
|
});
|
|
109
110
|
});
|
|
110
|
-
},
|
|
111
|
+
}, _EntraM365GroupUserRemoveCommand_initOptions = function _EntraM365GroupUserRemoveCommand_initOptions() {
|
|
111
112
|
this.options.unshift({
|
|
112
113
|
option: "-i, --groupId [groupId]"
|
|
113
114
|
}, {
|
|
@@ -117,7 +118,7 @@ _AadM365GroupUserRemoveCommand_instances = new WeakSet(), _AadM365GroupUserRemov
|
|
|
117
118
|
}, {
|
|
118
119
|
option: '-f, --force'
|
|
119
120
|
});
|
|
120
|
-
},
|
|
121
|
+
}, _EntraM365GroupUserRemoveCommand_initValidators = function _EntraM365GroupUserRemoveCommand_initValidators() {
|
|
121
122
|
this.validators.push(async (args) => {
|
|
122
123
|
if (args.options.teamId && !validation.isValidGuid(args.options.teamId)) {
|
|
123
124
|
return `${args.options.teamId} is not a valid GUID`;
|
|
@@ -127,8 +128,8 @@ _AadM365GroupUserRemoveCommand_instances = new WeakSet(), _AadM365GroupUserRemov
|
|
|
127
128
|
}
|
|
128
129
|
return true;
|
|
129
130
|
});
|
|
130
|
-
},
|
|
131
|
+
}, _EntraM365GroupUserRemoveCommand_initOptionSets = function _EntraM365GroupUserRemoveCommand_initOptionSets() {
|
|
131
132
|
this.optionSets.push({ options: ['groupId', 'teamId'] });
|
|
132
133
|
};
|
|
133
|
-
export default new
|
|
134
|
+
export default new EntraM365GroupUserRemoveCommand();
|
|
134
135
|
//# sourceMappingURL=m365group-user-remove.js.map
|
|
@@ -3,7 +3,7 @@ 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
|
|
6
|
+
var _EntraM365GroupUserSetCommand_instances, _EntraM365GroupUserSetCommand_initTelemetry, _EntraM365GroupUserSetCommand_initOptions, _EntraM365GroupUserSetCommand_initValidators, _EntraM365GroupUserSetCommand_initOptionSets;
|
|
7
7
|
import request from '../../../../request.js';
|
|
8
8
|
import { odata } from '../../../../utils/odata.js';
|
|
9
9
|
import { validation } from '../../../../utils/validation.js';
|
|
@@ -11,7 +11,8 @@ import GraphCommand from '../../../base/GraphCommand.js';
|
|
|
11
11
|
import teamsCommands from '../../../teams/commands.js';
|
|
12
12
|
import commands from '../../commands.js';
|
|
13
13
|
import { aadGroup } from '../../../../utils/aadGroup.js';
|
|
14
|
-
|
|
14
|
+
import aadCommands from '../../aadCommands.js';
|
|
15
|
+
class EntraM365GroupUserSetCommand extends GraphCommand {
|
|
15
16
|
get name() {
|
|
16
17
|
return commands.M365GROUP_USER_SET;
|
|
17
18
|
}
|
|
@@ -19,15 +20,15 @@ class AadM365GroupUserSetCommand extends GraphCommand {
|
|
|
19
20
|
return 'Updates role of the specified user in the specified Microsoft 365 Group or Microsoft Teams team';
|
|
20
21
|
}
|
|
21
22
|
alias() {
|
|
22
|
-
return [teamsCommands.USER_SET];
|
|
23
|
+
return [teamsCommands.USER_SET, aadCommands.M365GROUP_USER_SET];
|
|
23
24
|
}
|
|
24
25
|
constructor() {
|
|
25
26
|
super();
|
|
26
|
-
|
|
27
|
-
__classPrivateFieldGet(this,
|
|
28
|
-
__classPrivateFieldGet(this,
|
|
29
|
-
__classPrivateFieldGet(this,
|
|
30
|
-
__classPrivateFieldGet(this,
|
|
27
|
+
_EntraM365GroupUserSetCommand_instances.add(this);
|
|
28
|
+
__classPrivateFieldGet(this, _EntraM365GroupUserSetCommand_instances, "m", _EntraM365GroupUserSetCommand_initTelemetry).call(this);
|
|
29
|
+
__classPrivateFieldGet(this, _EntraM365GroupUserSetCommand_instances, "m", _EntraM365GroupUserSetCommand_initOptions).call(this);
|
|
30
|
+
__classPrivateFieldGet(this, _EntraM365GroupUserSetCommand_instances, "m", _EntraM365GroupUserSetCommand_initValidators).call(this);
|
|
31
|
+
__classPrivateFieldGet(this, _EntraM365GroupUserSetCommand_instances, "m", _EntraM365GroupUserSetCommand_initOptionSets).call(this);
|
|
31
32
|
}
|
|
32
33
|
async commandAction(logger, args) {
|
|
33
34
|
try {
|
|
@@ -118,7 +119,7 @@ class AadM365GroupUserSetCommand extends GraphCommand {
|
|
|
118
119
|
return await odata.getAllItems(endpoint);
|
|
119
120
|
}
|
|
120
121
|
}
|
|
121
|
-
|
|
122
|
+
_EntraM365GroupUserSetCommand_instances = new WeakSet(), _EntraM365GroupUserSetCommand_initTelemetry = function _EntraM365GroupUserSetCommand_initTelemetry() {
|
|
122
123
|
this.telemetry.push((args) => {
|
|
123
124
|
Object.assign(this.telemetryProperties, {
|
|
124
125
|
teamId: typeof args.options.teamId !== 'undefined',
|
|
@@ -126,7 +127,7 @@ _AadM365GroupUserSetCommand_instances = new WeakSet(), _AadM365GroupUserSetComma
|
|
|
126
127
|
role: args.options.role
|
|
127
128
|
});
|
|
128
129
|
});
|
|
129
|
-
},
|
|
130
|
+
}, _EntraM365GroupUserSetCommand_initOptions = function _EntraM365GroupUserSetCommand_initOptions() {
|
|
130
131
|
this.options.unshift({
|
|
131
132
|
option: "-i, --groupId [groupId]"
|
|
132
133
|
}, {
|
|
@@ -137,7 +138,7 @@ _AadM365GroupUserSetCommand_instances = new WeakSet(), _AadM365GroupUserSetComma
|
|
|
137
138
|
option: '-r, --role <role>',
|
|
138
139
|
autocomplete: ['Owner', 'Member']
|
|
139
140
|
});
|
|
140
|
-
},
|
|
141
|
+
}, _EntraM365GroupUserSetCommand_initValidators = function _EntraM365GroupUserSetCommand_initValidators() {
|
|
141
142
|
this.validators.push(async (args) => {
|
|
142
143
|
if (args.options.teamId && !validation.isValidGuid(args.options.teamId)) {
|
|
143
144
|
return `${args.options.teamId} is not a valid GUID`;
|
|
@@ -150,8 +151,8 @@ _AadM365GroupUserSetCommand_instances = new WeakSet(), _AadM365GroupUserSetComma
|
|
|
150
151
|
}
|
|
151
152
|
return true;
|
|
152
153
|
});
|
|
153
|
-
},
|
|
154
|
+
}, _EntraM365GroupUserSetCommand_initOptionSets = function _EntraM365GroupUserSetCommand_initOptionSets() {
|
|
154
155
|
this.optionSets.push({ options: ['groupId', 'teamId'] });
|
|
155
156
|
};
|
|
156
|
-
export default new
|
|
157
|
+
export default new EntraM365GroupUserSetCommand();
|
|
157
158
|
//# sourceMappingURL=m365group-user-set.js.map
|
|
@@ -3,23 +3,27 @@ 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
|
|
6
|
+
var _EntraOAuth2GrantAddCommand_instances, _EntraOAuth2GrantAddCommand_initOptions, _EntraOAuth2GrantAddCommand_initValidators;
|
|
7
7
|
import request from '../../../../request.js';
|
|
8
8
|
import { validation } from '../../../../utils/validation.js';
|
|
9
9
|
import GraphCommand from '../../../base/GraphCommand.js';
|
|
10
|
+
import aadCommands from '../../aadCommands.js';
|
|
10
11
|
import commands from '../../commands.js';
|
|
11
|
-
class
|
|
12
|
+
class EntraOAuth2GrantAddCommand extends GraphCommand {
|
|
12
13
|
get name() {
|
|
13
14
|
return commands.OAUTH2GRANT_ADD;
|
|
14
15
|
}
|
|
15
16
|
get description() {
|
|
16
17
|
return 'Grant the specified service principal OAuth2 permissions to the specified resource';
|
|
17
18
|
}
|
|
19
|
+
alias() {
|
|
20
|
+
return [aadCommands.OAUTH2GRANT_ADD];
|
|
21
|
+
}
|
|
18
22
|
constructor() {
|
|
19
23
|
super();
|
|
20
|
-
|
|
21
|
-
__classPrivateFieldGet(this,
|
|
22
|
-
__classPrivateFieldGet(this,
|
|
24
|
+
_EntraOAuth2GrantAddCommand_instances.add(this);
|
|
25
|
+
__classPrivateFieldGet(this, _EntraOAuth2GrantAddCommand_instances, "m", _EntraOAuth2GrantAddCommand_initOptions).call(this);
|
|
26
|
+
__classPrivateFieldGet(this, _EntraOAuth2GrantAddCommand_instances, "m", _EntraOAuth2GrantAddCommand_initValidators).call(this);
|
|
23
27
|
}
|
|
24
28
|
async commandAction(logger, args) {
|
|
25
29
|
if (this.verbose) {
|
|
@@ -47,7 +51,7 @@ class AadOAuth2GrantAddCommand extends GraphCommand {
|
|
|
47
51
|
}
|
|
48
52
|
}
|
|
49
53
|
}
|
|
50
|
-
|
|
54
|
+
_EntraOAuth2GrantAddCommand_instances = new WeakSet(), _EntraOAuth2GrantAddCommand_initOptions = function _EntraOAuth2GrantAddCommand_initOptions() {
|
|
51
55
|
this.options.unshift({
|
|
52
56
|
option: '-i, --clientId <clientId>'
|
|
53
57
|
}, {
|
|
@@ -55,7 +59,7 @@ _AadOAuth2GrantAddCommand_instances = new WeakSet(), _AadOAuth2GrantAddCommand_i
|
|
|
55
59
|
}, {
|
|
56
60
|
option: '-s, --scope <scope>'
|
|
57
61
|
});
|
|
58
|
-
},
|
|
62
|
+
}, _EntraOAuth2GrantAddCommand_initValidators = function _EntraOAuth2GrantAddCommand_initValidators() {
|
|
59
63
|
this.validators.push(async (args) => {
|
|
60
64
|
if (!validation.isValidGuid(args.options.clientId)) {
|
|
61
65
|
return `${args.options.clientId} is not a valid GUID`;
|
|
@@ -66,5 +70,5 @@ _AadOAuth2GrantAddCommand_instances = new WeakSet(), _AadOAuth2GrantAddCommand_i
|
|
|
66
70
|
return true;
|
|
67
71
|
});
|
|
68
72
|
};
|
|
69
|
-
export default new
|
|
73
|
+
export default new EntraOAuth2GrantAddCommand();
|
|
70
74
|
//# sourceMappingURL=oauth2grant-add.js.map
|