@pnp/cli-microsoft365 7.3.0-beta.16c6462 → 7.3.0-beta.6e32b20
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/cli/Cli.js +14 -13
- package/dist/m365/aad/commands/group/group-list.js +69 -1
- package/dist/m365/teams/commands/meeting/meeting-add.js +151 -0
- package/dist/m365/teams/commands.js +2 -1
- package/dist/utils/validation.js +5 -2
- package/docs/docs/cmd/aad/group/group-list.mdx +11 -0
- package/docs/docs/cmd/onedrive/report/report-activityfilecounts.mdx +0 -3
- package/docs/docs/cmd/onedrive/report/report-activityusercounts.mdx +0 -3
- package/docs/docs/cmd/onedrive/report/report-activityuserdetail.mdx +0 -3
- package/docs/docs/cmd/onedrive/report/report-usageaccountcounts.mdx +0 -3
- package/docs/docs/cmd/onedrive/report/report-usageaccountdetail.mdx +0 -3
- package/docs/docs/cmd/onedrive/report/report-usagefilecounts.mdx +0 -3
- package/docs/docs/cmd/onedrive/report/report-usagestorage.mdx +0 -3
- package/docs/docs/cmd/outlook/report/report-mailactivitycounts.mdx +0 -3
- package/docs/docs/cmd/outlook/report/report-mailactivityusercounts.mdx +0 -3
- package/docs/docs/cmd/outlook/report/report-mailactivityuserdetail.mdx +0 -3
- package/docs/docs/cmd/outlook/report/report-mailappusageappsusercounts.mdx +0 -3
- package/docs/docs/cmd/outlook/report/report-mailappusageusercounts.mdx +0 -3
- package/docs/docs/cmd/outlook/report/report-mailappusageuserdetail.mdx +0 -3
- package/docs/docs/cmd/outlook/report/report-mailappusageversionsusercounts.mdx +0 -3
- package/docs/docs/cmd/outlook/report/report-mailboxusagedetail.mdx +0 -3
- package/docs/docs/cmd/outlook/report/report-mailboxusagemailboxcount.mdx +0 -3
- package/docs/docs/cmd/outlook/report/report-mailboxusagequotastatusmailboxcounts.mdx +0 -3
- package/docs/docs/cmd/outlook/report/report-mailboxusagestorage.mdx +0 -3
- package/docs/docs/cmd/skype/report/report-activitycounts.mdx +0 -2
- package/docs/docs/cmd/skype/report/report-activityusercounts.mdx +0 -3
- package/docs/docs/cmd/skype/report/report-activityuserdetail.mdx +0 -3
- package/docs/docs/cmd/spo/report/report-activityfilecounts.mdx +0 -3
- package/docs/docs/cmd/spo/report/report-activitypages.mdx +0 -3
- package/docs/docs/cmd/spo/report/report-activityusercounts.mdx +0 -3
- package/docs/docs/cmd/spo/report/report-activityuserdetail.mdx +0 -3
- package/docs/docs/cmd/spo/report/report-siteusagedetail.mdx +0 -3
- package/docs/docs/cmd/spo/report/report-siteusagefilecounts.mdx +0 -3
- package/docs/docs/cmd/spo/report/report-siteusagepages.mdx +0 -3
- package/docs/docs/cmd/spo/report/report-siteusagesitecounts.mdx +0 -3
- package/docs/docs/cmd/spo/report/report-siteusagestorage.mdx +0 -3
- package/docs/docs/cmd/teams/meeting/meeting-add.mdx +283 -0
- package/docs/docs/cmd/teams/report/report-deviceusagedistributionusercounts.mdx +0 -3
- package/docs/docs/cmd/teams/report/report-deviceusageusercounts.mdx +0 -3
- package/docs/docs/cmd/teams/report/report-deviceusageuserdetail.mdx +0 -3
- package/docs/docs/cmd/teams/report/report-useractivitycounts.mdx +0 -3
- package/docs/docs/cmd/teams/report/report-useractivityusercounts.mdx +0 -3
- package/docs/docs/cmd/teams/report/report-useractivityuserdetail.mdx +0 -3
- package/docs/docs/cmd/tenant/report/report-activeusercounts.mdx +0 -3
- package/docs/docs/cmd/tenant/report/report-activeuserdetail.mdx +0 -3
- package/docs/docs/cmd/tenant/report/report-servicesusercounts.mdx +0 -3
- package/docs/docs/cmd/yammer/report/report-activitycounts.mdx +0 -3
- package/docs/docs/cmd/yammer/report/report-activityusercounts.mdx +0 -3
- package/docs/docs/cmd/yammer/report/report-activityuserdetail.mdx +0 -3
- package/docs/docs/cmd/yammer/report/report-deviceusagedistributionusercounts.mdx +0 -3
- package/docs/docs/cmd/yammer/report/report-deviceusageusercounts.mdx +0 -3
- package/docs/docs/cmd/yammer/report/report-deviceusageuserdetail.mdx +0 -3
- package/docs/docs/cmd/yammer/report/report-groupsactivitycounts.mdx +0 -3
- package/docs/docs/cmd/yammer/report/report-groupsactivitydetail.mdx +0 -3
- package/docs/docs/cmd/yammer/report/report-groupsactivitygroupcounts.mdx +0 -3
- package/package.json +1 -1
package/dist/cli/Cli.js
CHANGED
|
@@ -100,43 +100,44 @@ export class Cli {
|
|
|
100
100
|
}
|
|
101
101
|
return Promise.resolve();
|
|
102
102
|
}
|
|
103
|
-
|
|
103
|
+
delete this.optionsFromArgs.options._;
|
|
104
|
+
delete this.optionsFromArgs.options['--'];
|
|
104
105
|
try {
|
|
105
106
|
// replace values staring with @ with file contents
|
|
106
|
-
Cli.loadOptionValuesFromFiles(
|
|
107
|
+
Cli.loadOptionValuesFromFiles(this.optionsFromArgs);
|
|
107
108
|
}
|
|
108
109
|
catch (e) {
|
|
109
|
-
return this.closeWithError(e,
|
|
110
|
+
return this.closeWithError(e, this.optionsFromArgs);
|
|
110
111
|
}
|
|
111
112
|
const startProcessing = process.hrtime.bigint();
|
|
112
113
|
try {
|
|
113
114
|
// process options before passing them on to validation stage
|
|
114
|
-
const contextCommandOptions = await this.loadOptionsFromContext(this.commandToExecute.options,
|
|
115
|
-
|
|
116
|
-
await this.commandToExecute.command.processOptions(
|
|
115
|
+
const contextCommandOptions = await this.loadOptionsFromContext(this.commandToExecute.options, this.optionsFromArgs.options.debug);
|
|
116
|
+
this.optionsFromArgs.options = { ...contextCommandOptions, ...this.optionsFromArgs.options };
|
|
117
|
+
await this.commandToExecute.command.processOptions(this.optionsFromArgs.options);
|
|
117
118
|
const endProcessing = process.hrtime.bigint();
|
|
118
119
|
timings.options.push(Number(endProcessing - startProcessing));
|
|
119
120
|
}
|
|
120
121
|
catch (e) {
|
|
121
122
|
const endProcessing = process.hrtime.bigint();
|
|
122
123
|
timings.options.push(Number(endProcessing - startProcessing));
|
|
123
|
-
return this.closeWithError(e.message,
|
|
124
|
+
return this.closeWithError(e.message, this.optionsFromArgs, false);
|
|
124
125
|
}
|
|
125
126
|
// if output not specified, set the configured output value (if any)
|
|
126
|
-
if (
|
|
127
|
-
|
|
127
|
+
if (this.optionsFromArgs.options.output === undefined) {
|
|
128
|
+
this.optionsFromArgs.options.output = this.getSettingWithDefaultValue(settingsNames.output, 'json');
|
|
128
129
|
}
|
|
129
130
|
const startValidation = process.hrtime.bigint();
|
|
130
|
-
const validationResult = await this.commandToExecute.command.validate(
|
|
131
|
+
const validationResult = await this.commandToExecute.command.validate(this.optionsFromArgs, this.commandToExecute);
|
|
131
132
|
const endValidation = process.hrtime.bigint();
|
|
132
133
|
timings.validation.push(Number(endValidation - startValidation));
|
|
133
134
|
if (validationResult !== true) {
|
|
134
|
-
return this.closeWithError(validationResult,
|
|
135
|
+
return this.closeWithError(validationResult, this.optionsFromArgs, true);
|
|
135
136
|
}
|
|
136
137
|
const end = process.hrtime.bigint();
|
|
137
138
|
timings.core.push(Number(end - start));
|
|
138
139
|
try {
|
|
139
|
-
await Cli.executeCommand(this.commandToExecute.command,
|
|
140
|
+
await Cli.executeCommand(this.commandToExecute.command, this.optionsFromArgs);
|
|
140
141
|
const endTotal = process.hrtime.bigint();
|
|
141
142
|
timings.total.push(Number(endTotal - start));
|
|
142
143
|
this.printTimings(rawArgs);
|
|
@@ -146,7 +147,7 @@ export class Cli {
|
|
|
146
147
|
const endTotal = process.hrtime.bigint();
|
|
147
148
|
timings.total.push(Number(endTotal - start));
|
|
148
149
|
this.printTimings(rawArgs);
|
|
149
|
-
await this.closeWithError(err,
|
|
150
|
+
await this.closeWithError(err, this.optionsFromArgs);
|
|
150
151
|
/* c8 ignore next */
|
|
151
152
|
}
|
|
152
153
|
}
|
|
@@ -1,3 +1,9 @@
|
|
|
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 _AadGroupListCommand_instances, _a, _AadGroupListCommand_initTelemetry, _AadGroupListCommand_initOptions, _AadGroupListCommand_initValidators;
|
|
1
7
|
import { Cli } from '../../../../cli/Cli.js';
|
|
2
8
|
import { odata } from '../../../../utils/odata.js';
|
|
3
9
|
import GraphCommand from '../../../base/GraphCommand.js';
|
|
@@ -12,9 +18,51 @@ class AadGroupListCommand extends GraphCommand {
|
|
|
12
18
|
defaultProperties() {
|
|
13
19
|
return ['id', 'displayName', 'groupType'];
|
|
14
20
|
}
|
|
21
|
+
constructor() {
|
|
22
|
+
super();
|
|
23
|
+
_AadGroupListCommand_instances.add(this);
|
|
24
|
+
__classPrivateFieldGet(this, _AadGroupListCommand_instances, "m", _AadGroupListCommand_initTelemetry).call(this);
|
|
25
|
+
__classPrivateFieldGet(this, _AadGroupListCommand_instances, "m", _AadGroupListCommand_initOptions).call(this);
|
|
26
|
+
__classPrivateFieldGet(this, _AadGroupListCommand_instances, "m", _AadGroupListCommand_initValidators).call(this);
|
|
27
|
+
}
|
|
15
28
|
async commandAction(logger, args) {
|
|
16
29
|
try {
|
|
17
|
-
|
|
30
|
+
let requestUrl = `${this.resource}/v1.0/groups`;
|
|
31
|
+
let useConsistencyLevelHeader = false;
|
|
32
|
+
if (args.options.type) {
|
|
33
|
+
const groupType = _a.groupTypes.find(g => g.toLowerCase() === args.options.type?.toLowerCase());
|
|
34
|
+
switch (groupType) {
|
|
35
|
+
case 'microsoft365':
|
|
36
|
+
requestUrl += `?$filter=groupTypes/any(c:c+eq+'Unified')`;
|
|
37
|
+
break;
|
|
38
|
+
case 'security':
|
|
39
|
+
requestUrl += '?$filter=securityEnabled eq true and mailEnabled eq false';
|
|
40
|
+
break;
|
|
41
|
+
case 'distribution':
|
|
42
|
+
requestUrl += '?$filter=securityEnabled eq false and mailEnabled eq true';
|
|
43
|
+
break;
|
|
44
|
+
case 'mailEnabledSecurity':
|
|
45
|
+
useConsistencyLevelHeader = true;
|
|
46
|
+
requestUrl += `?$filter=securityEnabled eq true and mailEnabled eq true and not(groupTypes/any(t:t eq 'Unified'))&$count=true`;
|
|
47
|
+
break;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
let groups = [];
|
|
51
|
+
if (useConsistencyLevelHeader) {
|
|
52
|
+
// While using not() function in the filter, we need to specify the ConsistencyLevel header.
|
|
53
|
+
const requestOptions = {
|
|
54
|
+
url: requestUrl,
|
|
55
|
+
headers: {
|
|
56
|
+
accept: 'application/json;odata.metadata=none',
|
|
57
|
+
ConsistencyLevel: 'eventual'
|
|
58
|
+
},
|
|
59
|
+
responseType: 'json'
|
|
60
|
+
};
|
|
61
|
+
groups = await odata.getAllItems(requestOptions);
|
|
62
|
+
}
|
|
63
|
+
else {
|
|
64
|
+
groups = await odata.getAllItems(requestUrl);
|
|
65
|
+
}
|
|
18
66
|
if (Cli.shouldTrimOutput(args.options.output)) {
|
|
19
67
|
groups.forEach((group) => {
|
|
20
68
|
if (group.groupTypes && group.groupTypes.length > 0 && group.groupTypes[0] === 'Unified') {
|
|
@@ -38,5 +86,25 @@ class AadGroupListCommand extends GraphCommand {
|
|
|
38
86
|
}
|
|
39
87
|
}
|
|
40
88
|
}
|
|
89
|
+
_a = AadGroupListCommand, _AadGroupListCommand_instances = new WeakSet(), _AadGroupListCommand_initTelemetry = function _AadGroupListCommand_initTelemetry() {
|
|
90
|
+
this.telemetry.push((args) => {
|
|
91
|
+
Object.assign(this.telemetryProperties, {
|
|
92
|
+
type: typeof args.options.type !== 'undefined'
|
|
93
|
+
});
|
|
94
|
+
});
|
|
95
|
+
}, _AadGroupListCommand_initOptions = function _AadGroupListCommand_initOptions() {
|
|
96
|
+
this.options.unshift({
|
|
97
|
+
option: '--type [type]',
|
|
98
|
+
autocomplete: _a.groupTypes
|
|
99
|
+
});
|
|
100
|
+
}, _AadGroupListCommand_initValidators = function _AadGroupListCommand_initValidators() {
|
|
101
|
+
this.validators.push(async (args) => {
|
|
102
|
+
if (args.options.type && _a.groupTypes.every(g => g.toLowerCase() !== args.options.type?.toLowerCase())) {
|
|
103
|
+
return `${args.options.type} is not a valid type value. Allowed values microsoft365|security|distribution|mailEnabledSecurity.`;
|
|
104
|
+
}
|
|
105
|
+
return true;
|
|
106
|
+
});
|
|
107
|
+
};
|
|
108
|
+
AadGroupListCommand.groupTypes = ['microsoft365', 'security', 'distribution', 'mailEnabledSecurity'];
|
|
41
109
|
export default new AadGroupListCommand();
|
|
42
110
|
//# sourceMappingURL=group-list.js.map
|
|
@@ -0,0 +1,151 @@
|
|
|
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 _TeamsMeetingAddCommand_instances, _TeamsMeetingAddCommand_initTelemetry, _TeamsMeetingAddCommand_initOptions, _TeamsMeetingAddCommand_initValidators;
|
|
7
|
+
import auth from '../../../../Auth.js';
|
|
8
|
+
import { aadUser } from '../../../../utils/aadUser.js';
|
|
9
|
+
import { accessToken } from '../../../../utils/accessToken.js';
|
|
10
|
+
import { validation } from '../../../../utils/validation.js';
|
|
11
|
+
import GraphCommand from "../../../base/GraphCommand.js";
|
|
12
|
+
import commands from '../../commands.js';
|
|
13
|
+
import request from '../../../../request.js';
|
|
14
|
+
class TeamsMeetingAddCommand extends GraphCommand {
|
|
15
|
+
get name() {
|
|
16
|
+
return commands.MEETING_ADD;
|
|
17
|
+
}
|
|
18
|
+
get description() {
|
|
19
|
+
return 'Creates a new online meeting';
|
|
20
|
+
}
|
|
21
|
+
constructor() {
|
|
22
|
+
super();
|
|
23
|
+
_TeamsMeetingAddCommand_instances.add(this);
|
|
24
|
+
__classPrivateFieldGet(this, _TeamsMeetingAddCommand_instances, "m", _TeamsMeetingAddCommand_initTelemetry).call(this);
|
|
25
|
+
__classPrivateFieldGet(this, _TeamsMeetingAddCommand_instances, "m", _TeamsMeetingAddCommand_initOptions).call(this);
|
|
26
|
+
__classPrivateFieldGet(this, _TeamsMeetingAddCommand_instances, "m", _TeamsMeetingAddCommand_initValidators).call(this);
|
|
27
|
+
}
|
|
28
|
+
async commandAction(logger, args) {
|
|
29
|
+
try {
|
|
30
|
+
const isAppOnlyAccessToken = accessToken.isAppOnlyAccessToken(auth.service.accessTokens[this.resource].accessToken);
|
|
31
|
+
if (isAppOnlyAccessToken && !args.options.organizerEmail) {
|
|
32
|
+
throw `The option 'organizerEmail' is required when creating a meeting using app only permissions`;
|
|
33
|
+
}
|
|
34
|
+
if (!isAppOnlyAccessToken && args.options.organizerEmail) {
|
|
35
|
+
throw `The option 'organizerEmail' is not supported when creating a meeting using delegated permissions`;
|
|
36
|
+
}
|
|
37
|
+
const meeting = await this.createMeeting(logger, args.options);
|
|
38
|
+
await logger.log(meeting);
|
|
39
|
+
}
|
|
40
|
+
catch (err) {
|
|
41
|
+
this.handleRejectedODataJsonPromise(err);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Creates a new online meeting
|
|
46
|
+
* @param logger
|
|
47
|
+
* @param options
|
|
48
|
+
* @returns MS Graph online meeting response
|
|
49
|
+
*/
|
|
50
|
+
async createMeeting(logger, options) {
|
|
51
|
+
let requestUrl = `${this.resource}/v1.0/me`;
|
|
52
|
+
if (options.organizerEmail) {
|
|
53
|
+
if (this.verbose) {
|
|
54
|
+
await logger.logToStderr(`Retrieving Organizer Id...`);
|
|
55
|
+
}
|
|
56
|
+
const organizerId = await aadUser.getUserIdByEmail(options.organizerEmail);
|
|
57
|
+
requestUrl = `${this.resource}/v1.0/users/${organizerId}`;
|
|
58
|
+
}
|
|
59
|
+
if (this.verbose) {
|
|
60
|
+
await logger.logToStderr(`Creating the meeting...`);
|
|
61
|
+
}
|
|
62
|
+
const requestData = {};
|
|
63
|
+
if (options.participantUserNames) {
|
|
64
|
+
const attendees = options.participantUserNames.trim().toLowerCase().split(',').map(p => ({
|
|
65
|
+
upn: p.trim()
|
|
66
|
+
}));
|
|
67
|
+
requestData.participants = { attendees };
|
|
68
|
+
}
|
|
69
|
+
if (options.startTime) {
|
|
70
|
+
requestData.startDateTime = options.startTime;
|
|
71
|
+
}
|
|
72
|
+
if (options.endTime) {
|
|
73
|
+
requestData.endDateTime = options.endTime;
|
|
74
|
+
if (!options.startTime) {
|
|
75
|
+
requestData.startDateTime = new Date().toISOString();
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
if (options.subject) {
|
|
79
|
+
requestData.subject = options.subject;
|
|
80
|
+
}
|
|
81
|
+
if (options.recordAutomatically !== undefined) {
|
|
82
|
+
requestData.recordAutomatically = true;
|
|
83
|
+
}
|
|
84
|
+
const requestOptions = {
|
|
85
|
+
headers: {
|
|
86
|
+
accept: 'application/json;odata.metadata=none',
|
|
87
|
+
'content-type': 'application/json'
|
|
88
|
+
},
|
|
89
|
+
responseType: 'json',
|
|
90
|
+
url: `${requestUrl}/onlineMeetings`,
|
|
91
|
+
data: requestData
|
|
92
|
+
};
|
|
93
|
+
return request.post(requestOptions);
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
_TeamsMeetingAddCommand_instances = new WeakSet(), _TeamsMeetingAddCommand_initTelemetry = function _TeamsMeetingAddCommand_initTelemetry() {
|
|
97
|
+
this.telemetry.push((args) => {
|
|
98
|
+
Object.assign(this.telemetryProperties, {
|
|
99
|
+
startTime: typeof args.options.startTime !== 'undefined',
|
|
100
|
+
endTime: typeof args.options.endTime !== 'undefined',
|
|
101
|
+
subject: typeof args.options.subject !== 'undefined',
|
|
102
|
+
participantUserNames: typeof args.options.participantUserNames !== 'undefined',
|
|
103
|
+
organizerEmail: typeof args.options.organizerEmail !== 'undefined',
|
|
104
|
+
recordAutomatically: !!args.options.recordAutomatically
|
|
105
|
+
});
|
|
106
|
+
});
|
|
107
|
+
}, _TeamsMeetingAddCommand_initOptions = function _TeamsMeetingAddCommand_initOptions() {
|
|
108
|
+
this.options.unshift({
|
|
109
|
+
option: '-s, --startTime [startTime]'
|
|
110
|
+
}, {
|
|
111
|
+
option: '-e, --endTime [endTime]'
|
|
112
|
+
}, {
|
|
113
|
+
option: '--subject [subject]'
|
|
114
|
+
}, {
|
|
115
|
+
option: '-p, --participantUserNames [participantUserNames]'
|
|
116
|
+
}, {
|
|
117
|
+
option: '--organizerEmail [organizerEmail]'
|
|
118
|
+
}, {
|
|
119
|
+
option: '-r, --recordAutomatically'
|
|
120
|
+
});
|
|
121
|
+
}, _TeamsMeetingAddCommand_initValidators = function _TeamsMeetingAddCommand_initValidators() {
|
|
122
|
+
this.validators.push(async (args) => {
|
|
123
|
+
if (args.options.startTime && !validation.isValidISODateTime(args.options.startTime)) {
|
|
124
|
+
return `'${args.options.startTime}' is not a valid ISO date string for startTime.`;
|
|
125
|
+
}
|
|
126
|
+
if (args.options.endTime && !validation.isValidISODateTime(args.options.endTime)) {
|
|
127
|
+
return `'${args.options.endTime}' is not a valid ISO date string for endTime.`;
|
|
128
|
+
}
|
|
129
|
+
if (args.options.startTime && args.options.endTime && new Date(args.options.startTime) >= new Date(args.options.endTime)) {
|
|
130
|
+
return 'The startTime value must be before endTime.';
|
|
131
|
+
}
|
|
132
|
+
if (args.options.startTime && new Date() >= new Date(args.options.startTime)) {
|
|
133
|
+
return 'The startTime value must be in the future.';
|
|
134
|
+
}
|
|
135
|
+
if (args.options.endTime && new Date() >= new Date(args.options.endTime)) {
|
|
136
|
+
return 'The endTime value must be in the future.';
|
|
137
|
+
}
|
|
138
|
+
if (args.options.participantUserNames) {
|
|
139
|
+
const participants = args.options.participantUserNames.trim().toLowerCase().split(',').filter(e => e && e !== '');
|
|
140
|
+
if (!participants || participants.length === 0 || participants.some(e => !validation.isValidUserPrincipalName(e))) {
|
|
141
|
+
return `'${args.options.participantUserNames}' contains one or more invalid UPN.`;
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
if (args.options.organizerEmail && !validation.isValidUserPrincipalName(args.options.organizerEmail)) {
|
|
145
|
+
return `'${args.options.organizerEmail}' is not a valid email for organizerEmail.`;
|
|
146
|
+
}
|
|
147
|
+
return true;
|
|
148
|
+
});
|
|
149
|
+
};
|
|
150
|
+
export default new TeamsMeetingAddCommand();
|
|
151
|
+
//# sourceMappingURL=meeting-add.js.map
|
|
@@ -27,9 +27,10 @@ export default {
|
|
|
27
27
|
FUNSETTINGS_SET: `${prefix} funsettings set`,
|
|
28
28
|
GUESTSETTINGS_LIST: `${prefix} guestsettings list`,
|
|
29
29
|
GUESTSETTINGS_SET: `${prefix} guestsettings set`,
|
|
30
|
-
|
|
30
|
+
MEETING_ADD: `${prefix} meeting add`,
|
|
31
31
|
MEETING_GET: `${prefix} meeting get`,
|
|
32
32
|
MEETING_LIST: `${prefix} meeting list`,
|
|
33
|
+
MEETING_ATTENDANCEREPORT_LIST: `${prefix} meeting attendancereport list`,
|
|
33
34
|
MEETING_TRANSCRIPT_LIST: `${prefix} meeting transcript list`,
|
|
34
35
|
MEMBERSETTINGS_LIST: `${prefix} membersettings list`,
|
|
35
36
|
MEMBERSETTINGS_SET: `${prefix} membersettings set`,
|
package/dist/utils/validation.js
CHANGED
|
@@ -7,8 +7,11 @@ export const validation = {
|
|
|
7
7
|
return false;
|
|
8
8
|
}
|
|
9
9
|
const guidRegEx = new RegExp(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i);
|
|
10
|
-
// verify if the guid is a valid guid. @meid will be replaced in a later
|
|
11
|
-
|
|
10
|
+
// verify if the guid is a valid guid. @meid will be replaced in a later
|
|
11
|
+
// stage with the actual user id of the logged in user
|
|
12
|
+
// we also need to make it toString in case the args is resolved as number
|
|
13
|
+
// or boolean
|
|
14
|
+
return guidRegEx.test(guid) || guid.toString().toLowerCase().trim() === '@meid';
|
|
12
15
|
},
|
|
13
16
|
isValidTeamsChannelId(guid) {
|
|
14
17
|
const guidRegEx = new RegExp(/^19:[0-9a-zA-Z-_]+@thread\.(skype|tacv2)$/i);
|
|
@@ -14,6 +14,11 @@ m365 aad group list [options]
|
|
|
14
14
|
|
|
15
15
|
## Options
|
|
16
16
|
|
|
17
|
+
```md definition-list
|
|
18
|
+
`--type [type]`
|
|
19
|
+
: Filter the results to only groups of a given type. Allowed values: `microsoft365`, `security`, `distribution`, `mailEnabledSecurity`. By default, all groups are listed.
|
|
20
|
+
```
|
|
21
|
+
|
|
17
22
|
<Global />
|
|
18
23
|
|
|
19
24
|
## Examples
|
|
@@ -24,6 +29,12 @@ Lists all groups defined in Azure Active Directory.
|
|
|
24
29
|
m365 aad group list
|
|
25
30
|
```
|
|
26
31
|
|
|
32
|
+
List all security groups defined in Azure Active Directory.
|
|
33
|
+
|
|
34
|
+
```sh
|
|
35
|
+
m365 aad group list --type security
|
|
36
|
+
```
|
|
37
|
+
|
|
27
38
|
## Response
|
|
28
39
|
|
|
29
40
|
<Tabs>
|
|
@@ -17,9 +17,6 @@ m365 onedrive report activityfilecounts [options]
|
|
|
17
17
|
```md definition-list
|
|
18
18
|
`-p, --period <period>`
|
|
19
19
|
: The length of time over which the report is aggregated. Supported values `D7`, `D30`, `D90`, `D180`.
|
|
20
|
-
|
|
21
|
-
`--outputFile [outputFile]`
|
|
22
|
-
: Path to the file where the report should be stored in
|
|
23
20
|
```
|
|
24
21
|
|
|
25
22
|
<Global />
|
|
@@ -17,9 +17,6 @@ m365 onedrive report activityusercounts [options]
|
|
|
17
17
|
```md definition-list
|
|
18
18
|
`-p, --period <period>`
|
|
19
19
|
: The length of time over which the report is aggregated. Supported values `D7`, `D30`, `D90`, `D180`.
|
|
20
|
-
|
|
21
|
-
`--outputFile [outputFile]`
|
|
22
|
-
: Path to the file where the report should be stored in
|
|
23
20
|
```
|
|
24
21
|
|
|
25
22
|
<Global />
|
|
@@ -20,9 +20,6 @@ m365 onedrive report activityuserdetail [options]
|
|
|
20
20
|
|
|
21
21
|
`-d, --date [date]`
|
|
22
22
|
: The date for which you would like to view the users who performed any activity. Supported date format is YYYY-MM-DD. Specify the date or period, but not both`
|
|
23
|
-
|
|
24
|
-
`--outputFile [outputFile]`
|
|
25
|
-
: Path to the file where the report should be stored in
|
|
26
23
|
```
|
|
27
24
|
|
|
28
25
|
<Global />
|
|
@@ -17,9 +17,6 @@ m365 onedrive report usageaccountcounts [options]
|
|
|
17
17
|
```md definition-list
|
|
18
18
|
`-p, --period <period>`
|
|
19
19
|
: The length of time over which the report is aggregated. Supported values `D7`, `D30`, `D90`, `D180`.
|
|
20
|
-
|
|
21
|
-
`--outputFile [outputFile]`
|
|
22
|
-
: Path to the file where the report should be stored in
|
|
23
20
|
```
|
|
24
21
|
|
|
25
22
|
<Global />
|
|
@@ -20,9 +20,6 @@ m365 onedrive report usageaccountdetail [options]
|
|
|
20
20
|
|
|
21
21
|
`-d, --date [date]`
|
|
22
22
|
: The date for which you would like to view the users who performed any activity. Supported date format is YYYY-MM-DD. Specify the date or period, but not both`
|
|
23
|
-
|
|
24
|
-
`--outputFile [outputFile]`
|
|
25
|
-
: Path to the file where the report should be stored in
|
|
26
23
|
```
|
|
27
24
|
|
|
28
25
|
<Global />
|
|
@@ -17,9 +17,6 @@ m365 onedrive report usagefilecounts [options]
|
|
|
17
17
|
```md definition-list
|
|
18
18
|
`-p, --period <period>`
|
|
19
19
|
: The length of time over which the report is aggregated. Supported values `D7`, `D30`, `D90`, `D180`.
|
|
20
|
-
|
|
21
|
-
`--outputFile [outputFile]`
|
|
22
|
-
: Path to the file where the report should be stored in
|
|
23
20
|
```
|
|
24
21
|
|
|
25
22
|
<Global />
|
|
@@ -17,9 +17,6 @@ m365 onedrive report usagestorage [options]
|
|
|
17
17
|
```md definition-list
|
|
18
18
|
`-p, --period <period>`
|
|
19
19
|
: The length of time over which the report is aggregated. Supported values `D7`, `D30`, `D90`, `D180`.
|
|
20
|
-
|
|
21
|
-
`--outputFile [outputFile]`
|
|
22
|
-
: Path to the file where the report should be stored in
|
|
23
20
|
```
|
|
24
21
|
|
|
25
22
|
<Global />
|
|
@@ -17,9 +17,6 @@ m365 outlook report mailactivitycounts [options]
|
|
|
17
17
|
```md definition-list
|
|
18
18
|
`-p, --period <period>`
|
|
19
19
|
: The length of time over which the report is aggregated. Supported values `D7`, `D30`, `D90`, `D180`.
|
|
20
|
-
|
|
21
|
-
`--outputFile [outputFile]`
|
|
22
|
-
: Path to the file where the report should be stored in
|
|
23
20
|
```
|
|
24
21
|
|
|
25
22
|
<Global />
|
|
@@ -17,9 +17,6 @@ m365 outlook report mailactivityusercounts [options]
|
|
|
17
17
|
```md definition-list
|
|
18
18
|
`-p, --period <period>`
|
|
19
19
|
: The length of time over which the report is aggregated. Supported values `D7`, `D30`, `D90`, `D180`.
|
|
20
|
-
|
|
21
|
-
`--outputFile [outputFile]`
|
|
22
|
-
: Path to the file where the report should be stored in
|
|
23
20
|
```
|
|
24
21
|
|
|
25
22
|
<Global />
|
|
@@ -20,9 +20,6 @@ m365 outlook report mailactivityuserdetail [options]
|
|
|
20
20
|
|
|
21
21
|
`-d, --date [date]`
|
|
22
22
|
: The date for which you would like to view the users who performed any activity. Supported date format is YYYY-MM-DD. Specify the date or period, but not both
|
|
23
|
-
|
|
24
|
-
`--outputFile [outputFile]`
|
|
25
|
-
: Path to the file where the report should be stored in
|
|
26
23
|
```
|
|
27
24
|
|
|
28
25
|
<Global />
|
|
@@ -17,9 +17,6 @@ m365 outlook report mailappusageappsusercounts [options]
|
|
|
17
17
|
```md definition-list
|
|
18
18
|
`-p, --period <period>`
|
|
19
19
|
: The length of time over which the report is aggregated. Supported values `D7`, `D30`, `D90`, `D180`.
|
|
20
|
-
|
|
21
|
-
`--outputFile [outputFile]`
|
|
22
|
-
: Path to the file where the report should be stored in
|
|
23
20
|
```
|
|
24
21
|
|
|
25
22
|
<Global />
|
|
@@ -17,9 +17,6 @@ m365 outlook report mailappusageusercounts [options]
|
|
|
17
17
|
```md definition-list
|
|
18
18
|
`-p, --period <period>`
|
|
19
19
|
: The length of time over which the report is aggregated. Supported values `D7`, `D30`, `D90`, `D180`.
|
|
20
|
-
|
|
21
|
-
`--outputFile [outputFile]`
|
|
22
|
-
: Path to the file where the report should be stored in
|
|
23
20
|
```
|
|
24
21
|
|
|
25
22
|
<Global />
|
|
@@ -20,9 +20,6 @@ m365 outlook report mailappusageuserdetail [options]
|
|
|
20
20
|
|
|
21
21
|
`-d, --date [date]`
|
|
22
22
|
: The date for which you would like to view the users who performed any activity. Supported date format is YYYY-MM-DD. Specify the date or period, but not both
|
|
23
|
-
|
|
24
|
-
`--outputFile [outputFile]`
|
|
25
|
-
: Path to the file where the report should be stored in
|
|
26
23
|
```
|
|
27
24
|
|
|
28
25
|
<Global />
|
|
@@ -17,9 +17,6 @@ m365 outlook report mailappusageversionsusercounts [options]
|
|
|
17
17
|
```md definition-list
|
|
18
18
|
`-p, --period <period>`
|
|
19
19
|
: The length of time over which the report is aggregated. Supported values `D7`, `D30`, `D90`, `D180`.
|
|
20
|
-
|
|
21
|
-
`--outputFile [outputFile]`
|
|
22
|
-
: Path to the file where the report should be stored in
|
|
23
20
|
```
|
|
24
21
|
|
|
25
22
|
<Global />
|
|
@@ -17,9 +17,6 @@ m365 outlook report mailboxusagedetail [options]
|
|
|
17
17
|
```md definition-list
|
|
18
18
|
`-p, --period <period>`
|
|
19
19
|
: The length of time over which the report is aggregated. Supported values `D7`, `D30`, `D90`, `D180`.
|
|
20
|
-
|
|
21
|
-
`--outputFile [outputFile]`
|
|
22
|
-
: Path to the file where the report should be stored in
|
|
23
20
|
```
|
|
24
21
|
|
|
25
22
|
<Global />
|
|
@@ -17,9 +17,6 @@ m365 outlook report mailboxusagemailboxcount [options]
|
|
|
17
17
|
```md definition-list
|
|
18
18
|
`-p, --period <period>`
|
|
19
19
|
: The length of time over which the report is aggregated. Supported values `D7`, `D30`, `D90`, `D180`.
|
|
20
|
-
|
|
21
|
-
`--outputFile [outputFile]`
|
|
22
|
-
: Path to the file where the report should be stored in
|
|
23
20
|
```
|
|
24
21
|
|
|
25
22
|
<Global />
|
|
@@ -17,9 +17,6 @@ m365 outlook report mailboxusagequotastatusmailboxcounts [options]
|
|
|
17
17
|
```md definition-list
|
|
18
18
|
`-p, --period <period>`
|
|
19
19
|
: The length of time over which the report is aggregated. Supported values `D7`, `D30`, `D90`, `D180`.
|
|
20
|
-
|
|
21
|
-
`--outputFile [outputFile]`
|
|
22
|
-
: Path to the file where the report should be stored in
|
|
23
20
|
```
|
|
24
21
|
|
|
25
22
|
<Global />
|
|
@@ -17,9 +17,6 @@ m365 outlook report mailboxusagestorage [options]
|
|
|
17
17
|
```md definition-list
|
|
18
18
|
`-p, --period <period>`
|
|
19
19
|
: The length of time over which the report is aggregated. Supported values `D7`, `D30`, `D90`, `D180`.
|
|
20
|
-
|
|
21
|
-
`--outputFile [outputFile]`
|
|
22
|
-
: Path to the file where the report should be stored in
|
|
23
20
|
```
|
|
24
21
|
|
|
25
22
|
<Global />
|
|
@@ -17,8 +17,6 @@ m365 skype report activitycounts [options]
|
|
|
17
17
|
```md definition-list
|
|
18
18
|
`-p, --period <period>`
|
|
19
19
|
: The length of time over which the report is aggregated. Supported values `D7`, `D30`, `D90`, `D180`.
|
|
20
|
-
`--outputFile [outputFile]`
|
|
21
|
-
: Path to the file where the report should be stored in
|
|
22
20
|
```
|
|
23
21
|
|
|
24
22
|
<Global />
|
|
@@ -17,9 +17,6 @@ m365 skype report activityusercounts [options]
|
|
|
17
17
|
```md definition-list
|
|
18
18
|
`-p, --period <period>`
|
|
19
19
|
: The length of time over which the report is aggregated. Supported values `D7`, `D30`, `D90`, `D180`.
|
|
20
|
-
|
|
21
|
-
`--outputFile [outputFile]`
|
|
22
|
-
: Path to the file where the report should be stored in
|
|
23
20
|
```
|
|
24
21
|
|
|
25
22
|
<Global />
|
|
@@ -20,9 +20,6 @@ m365 skype report activityuserdetail [options]
|
|
|
20
20
|
|
|
21
21
|
`-d, --date [date]`
|
|
22
22
|
: The date for which you would like to view the users who performed any activity. Supported date format is YYYY-MM-DD. Specify the date or period, but not both
|
|
23
|
-
|
|
24
|
-
`--outputFile [outputFile]`
|
|
25
|
-
: Path to the file where the report should be stored in
|
|
26
23
|
```
|
|
27
24
|
|
|
28
25
|
<Global />
|
|
@@ -17,9 +17,6 @@ m365 spo report activityfilecounts [options]
|
|
|
17
17
|
```md definition-list
|
|
18
18
|
`-p, --period <period>`
|
|
19
19
|
: The length of time over which the report is aggregated. Supported values `D7`, `D30`, `D90`, `D180`.
|
|
20
|
-
|
|
21
|
-
`--outputFile [outputFile]`
|
|
22
|
-
: Path to the file where the report should be stored in.
|
|
23
20
|
```
|
|
24
21
|
|
|
25
22
|
<Global />
|
|
@@ -17,9 +17,6 @@ m365 spo report activitypages [options]
|
|
|
17
17
|
```md definition-list
|
|
18
18
|
`-p, --period <period>`
|
|
19
19
|
: The length of time over which the report is aggregated. Supported values `D7`, `D30`, `D90`, `D180`.
|
|
20
|
-
|
|
21
|
-
`--outputFile [outputFile]`
|
|
22
|
-
: Path to the file where the report should be stored in.
|
|
23
20
|
```
|
|
24
21
|
|
|
25
22
|
<Global />
|
|
@@ -17,9 +17,6 @@ m365 spo report activityusercounts [options]
|
|
|
17
17
|
```md definition-list
|
|
18
18
|
`-p, --period <period>`
|
|
19
19
|
: The length of time over which the report is aggregated. Supported values `D7`, `D30`, `D90`, `D180`.
|
|
20
|
-
|
|
21
|
-
`--outputFile [outputFile]`
|
|
22
|
-
: Path to the file where the report should be stored in.
|
|
23
20
|
```
|
|
24
21
|
|
|
25
22
|
<Global />
|
|
@@ -20,9 +20,6 @@ m365 spo report activityuserdetail [options]
|
|
|
20
20
|
|
|
21
21
|
`-p, --period [period]`
|
|
22
22
|
: The length of time over which the report is aggregated. Supported values `D7`, `D30`, `D90`, `D180`. Specify either `date` or `period`, but not both.
|
|
23
|
-
|
|
24
|
-
`--outputFile [outputFile]`
|
|
25
|
-
: Path to the file where the Microsoft Teams device usage by user report should be stored in.
|
|
26
23
|
```
|
|
27
24
|
|
|
28
25
|
<Global />
|
|
@@ -20,9 +20,6 @@ m365 spo report siteusagedetail [options]
|
|
|
20
20
|
|
|
21
21
|
`-p, --period [period]`
|
|
22
22
|
: The length of time over which the report is aggregated. Supported values `D7`, `D30`, `D90`, `D180`. Specify either `date` or `period`, but not both.
|
|
23
|
-
|
|
24
|
-
`--outputFile [outputFile]`
|
|
25
|
-
: Path to the file where the report should be stored in.
|
|
26
23
|
```
|
|
27
24
|
|
|
28
25
|
<Global />
|