@pnp/cli-microsoft365 5.1.0-beta.55e5dfb → 5.1.0-beta.c27e2b5

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.
Files changed (50) hide show
  1. package/.eslintrc.js +1 -0
  2. package/dist/Auth.js +10 -0
  3. package/dist/cli/index.js +5 -1
  4. package/dist/m365/aad/commands/app/app-add.js +68 -10
  5. package/dist/m365/aad/commands/app/{app-delete.js → app-remove.js} +9 -5
  6. package/dist/m365/aad/commands/app/{app-role-delete.js → app-role-remove.js} +11 -7
  7. package/dist/m365/aad/commands/o365group/o365group-add.js +39 -1
  8. package/dist/m365/aad/commands/o365group/o365group-conversation-post-list.js +87 -0
  9. package/dist/m365/aad/commands.js +4 -1
  10. package/dist/m365/base/PowerPlatformCommand.js +10 -0
  11. package/dist/m365/cli/commands/config/config-set.js +3 -2
  12. package/dist/m365/pp/commands/managementapp/managementapp-add.js +98 -0
  13. package/dist/m365/pp/commands.js +7 -0
  14. package/dist/m365/spfx/commands/project/model/index.js +5 -1
  15. package/dist/m365/spfx/commands/project/project-externalize/index.js +5 -1
  16. package/dist/m365/spfx/commands/project/project-externalize/rules/index.js +5 -1
  17. package/dist/m365/spfx/commands/project/project-upgrade/index.js +5 -1
  18. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN001033_DEP_tslib.js +14 -0
  19. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN023002_GITIGNORE_heft.js +40 -0
  20. package/dist/m365/spfx/commands/project/project-upgrade/upgrade-1.12.0.js +0 -2
  21. package/dist/m365/spfx/commands/project/project-upgrade/upgrade-1.15.0-beta.1.js +63 -0
  22. package/dist/m365/spfx/commands/project/project-upgrade.js +24 -19
  23. package/dist/m365/spo/commands/site/site-recyclebinitem-restore.js +66 -0
  24. package/dist/m365/spo/commands.js +1 -0
  25. package/dist/m365/teams/commands/chat/chat-message-send.js +50 -58
  26. package/dist/m365/tenant/commands.js +1 -6
  27. package/dist/settingsNames.js +1 -0
  28. package/dist/utils/formatting.js +3 -0
  29. package/dist/utils/index.js +5 -1
  30. package/docs/docs/cmd/aad/app/{app-delete.md → app-remove.md} +15 -9
  31. package/docs/docs/cmd/aad/app/{app-role-delete.md → app-role-remove.md} +25 -19
  32. package/docs/docs/cmd/aad/o365group/o365group-add.md +42 -6
  33. package/docs/docs/cmd/aad/o365group/o365group-conversation-post-list.md +36 -0
  34. package/docs/docs/cmd/pp/managementapp/managementapp-add.md +50 -0
  35. package/docs/docs/cmd/spfx/project/project-upgrade.md +1 -1
  36. package/docs/docs/cmd/spo/site/site-recyclebinitem-restore.md +27 -0
  37. package/docs/docs/cmd/teams/chat/chat-message-send.md +4 -4
  38. package/npm-shrinkwrap.json +443 -192
  39. package/package.json +13 -11
  40. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN015006_FILE_editorconfig.js +0 -14
  41. package/dist/m365/tenant/commands/auditlog/auditlog-report.js +0 -231
  42. package/dist/m365/tenant/commands/service/service-list.js +0 -41
  43. package/dist/m365/tenant/commands/service/service-message-list.js +0 -55
  44. package/dist/m365/tenant/commands/service/service-report-historicalservicestatus.js +0 -54
  45. package/dist/m365/tenant/commands/status/status-list.js +0 -55
  46. package/docs/docs/cmd/tenant/auditlog/auditlog-report.md +0 -61
  47. package/docs/docs/cmd/tenant/service/service-list.md +0 -25
  48. package/docs/docs/cmd/tenant/service/service-message-list.md +0 -34
  49. package/docs/docs/cmd/tenant/service/service-report-historicalservicestatus.md +0 -38
  50. package/docs/docs/cmd/tenant/status/status-list.md +0 -34
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pnp/cli-microsoft365",
3
- "version": "5.1.0-beta.55e5dfb",
3
+ "version": "5.1.0-beta.c27e2b5",
4
4
  "description": "Manage Microsoft 365 and SharePoint Framework projects on any platform",
5
5
  "license": "MIT",
6
6
  "main": "./dist/api.js",
@@ -107,9 +107,10 @@
107
107
  "Georgiev, Velin <velin.georgiev@gmail.com>",
108
108
  "Ghuge, Pramod <pramod7@gmail.com>",
109
109
  "Gölles, Thomas <thomy@outlook.at>",
110
- "Hagström, Joakim <joakim.hogberg@bravero.se>",
110
+ "Hagström, Joakim <johags@johags-sb2.localdomain>",
111
111
  "Harding, Phil <pil.harding@platinumdogs.co.uk>",
112
112
  "Hawrylak, Paweł <phawrylak@outlook.com>",
113
+ "Holemans, Milan <Milan.Holemans@vanroey.be>",
113
114
  "Högberg, Joakim <joakim.hogberg@bravero.se>",
114
115
  "Hvam, Allan <ahp@delegate.dk>",
115
116
  "Jaakke, Robert <robert.jaakke@mavention.nl>",
@@ -183,9 +184,10 @@
183
184
  "adaptivecards": "^2.10.0",
184
185
  "adaptivecards-templating": "^2.2.0",
185
186
  "adm-zip": "^0.5.9",
186
- "applicationinsights": "^2.2.1",
187
- "axios": "^0.25.0",
187
+ "applicationinsights": "^2.2.2",
188
+ "axios": "^0.26.0",
188
189
  "chalk": "^4.1.2",
190
+ "clipboardy": "^2.3.0",
189
191
  "csv-stringify": "^6.0.5",
190
192
  "easy-table": "^1.2.0",
191
193
  "inquirer": "^8.2.0",
@@ -198,35 +200,35 @@
198
200
  "open": "^8.4.0",
199
201
  "semver": "^7.3.4",
200
202
  "strip-json-comments": "^3.1.1",
201
- "typescript": "^4.5.5",
203
+ "typescript": "^4.6.2",
202
204
  "update-notifier": "^5.1.0",
203
205
  "uuid": "^8.3.2"
204
206
  },
205
207
  "devDependencies": {
206
- "@microsoft/microsoft-graph-types": "^2.13.0",
208
+ "@microsoft/microsoft-graph-types": "^2.16.0",
207
209
  "@types/adm-zip": "^0.4.34",
208
210
  "@types/inquirer": "^8.2.0",
209
211
  "@types/jmespath": "^0.15.0",
210
212
  "@types/json-to-ast": "^2.1.2",
211
213
  "@types/minimist": "^1.2.2",
212
214
  "@types/mocha": "^9.1.0",
213
- "@types/node": "^16.11.22",
215
+ "@types/node": "^16.11.26",
214
216
  "@types/node-forge": "^1.0.0",
215
217
  "@types/semver": "^7.3.9",
216
218
  "@types/sinon": "^10.0.11",
217
219
  "@types/update-notifier": "^5.1.0",
218
220
  "@types/uuid": "^8.3.4",
219
- "@typescript-eslint/eslint-plugin": "^5.11.0",
220
- "@typescript-eslint/parser": "^5.11.0",
221
+ "@typescript-eslint/eslint-plugin": "^5.13.0",
222
+ "@typescript-eslint/parser": "^5.13.0",
221
223
  "c8": "^7.11.0",
222
224
  "coveralls": "^3.1.1",
223
- "eslint": "^8.8.0",
225
+ "eslint": "^8.10.0",
224
226
  "eslint-config-standard": "^16.0.3",
225
227
  "eslint-plugin-cli-microsoft365": "file:eslint-rules",
226
228
  "eslint-plugin-import": "^2.25.4",
227
229
  "eslint-plugin-node": "^11.1.0",
228
230
  "eslint-plugin-promise": "^6.0.0",
229
- "mocha": "^9.2.0",
231
+ "mocha": "^9.2.1",
230
232
  "rimraf": "^3.0.2",
231
233
  "sinon": "^13.0.1",
232
234
  "source-map-support": "^0.5.21"
@@ -1,14 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.FN015006_FILE_editorconfig = void 0;
4
- const FileAddRemoveRule_1 = require("./FileAddRemoveRule");
5
- class FN015006_FILE_editorconfig extends FileAddRemoveRule_1.FileAddRemoveRule {
6
- constructor(add) {
7
- super('.editorconfig', add);
8
- }
9
- get id() {
10
- return 'FN015006';
11
- }
12
- }
13
- exports.FN015006_FILE_editorconfig = FN015006_FILE_editorconfig;
14
- //# sourceMappingURL=FN015006_FILE_editorconfig.js.map
@@ -1,231 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const Auth_1 = require("../../../../Auth");
4
- const Command_1 = require("../../../../Command");
5
- const request_1 = require("../../../../request");
6
- const utils_1 = require("../../../../utils");
7
- const commands_1 = require("../../commands");
8
- var AuditContentTypes;
9
- (function (AuditContentTypes) {
10
- AuditContentTypes["AzureActiveDirectory"] = "Audit.AzureActiveDirectory";
11
- AuditContentTypes["Exchange"] = "Audit.Exchange";
12
- AuditContentTypes["SharePoint"] = "Audit.SharePoint";
13
- AuditContentTypes["General"] = "Audit.General";
14
- AuditContentTypes["DLP"] = "DLP.All";
15
- })(AuditContentTypes || (AuditContentTypes = {}));
16
- class TenantAuditlogReportCommand extends Command_1.default {
17
- constructor() {
18
- super(...arguments);
19
- this.serviceUrl = 'https://manage.office.com/api/v1.0';
20
- this.completeAuditReports = [];
21
- }
22
- get name() {
23
- return commands_1.default.AUDITLOG_REPORT;
24
- }
25
- get description() {
26
- return 'Gets audit logs from the Office 365 Management API';
27
- }
28
- getTelemetryProperties(args) {
29
- const telemetryProps = super.getTelemetryProperties(args);
30
- telemetryProps.startTime = typeof args.options.startTime !== 'undefined';
31
- telemetryProps.endTime = typeof args.options.endTime !== 'undefined';
32
- telemetryProps.contentType = args.options.contentType;
33
- return telemetryProps;
34
- }
35
- defaultProperties() {
36
- return ['CreationTime', 'Operation', 'ClientIP', 'UserId', 'Workload'];
37
- }
38
- commandAction(logger, args, cb) {
39
- if (this.verbose) {
40
- logger.logToStderr(`Start retrieving Audit Log Report`);
41
- }
42
- this.tenantId = utils_1.accessToken.getTenantIdFromAccessToken(Auth_1.default.service.accessTokens[Auth_1.default.defaultResource].accessToken);
43
- this
44
- .getCompleteAuditReports(args, logger)
45
- .then((res) => {
46
- logger.log(res);
47
- cb();
48
- }, (err) => this.handleRejectedODataJsonPromise(err, logger, cb));
49
- }
50
- getCompleteAuditReports(args, logger) {
51
- return this
52
- .startContentSubscriptionIfNotActive(args, logger)
53
- .then(() => this.getAuditContentList(args, logger))
54
- .then((auditContentLists) => this.getBatchedPromises(auditContentLists, 10))
55
- .then((batchedPromise) => {
56
- return new Promise((resolve, reject) => {
57
- if (batchedPromise.length > 0) {
58
- this.getBatchedAuditlogData(logger, batchedPromise, 0, resolve, reject);
59
- }
60
- else {
61
- resolve();
62
- }
63
- });
64
- })
65
- .then(_ => this.completeAuditReports);
66
- }
67
- startContentSubscriptionIfNotActive(args, logger) {
68
- if (this.verbose) {
69
- logger.logToStderr(`Checking if subscription is active...`);
70
- }
71
- const subscriptionListEndpoint = 'activity/feed/subscriptions/list';
72
- const requestOptions = {
73
- url: `${this.serviceUrl}/${this.tenantId}/${subscriptionListEndpoint}`,
74
- headers: {
75
- accept: 'application/json;odata.metadata=none'
76
- },
77
- responseType: 'json'
78
- };
79
- return request_1.default
80
- .get(requestOptions)
81
- .then((subscriptionLists) => {
82
- return subscriptionLists.some(subscriptionList => subscriptionList.contentType === AuditContentTypes[args.options.contentType] &&
83
- subscriptionList.status === 'enabled');
84
- })
85
- .then((hasActiveSubscription) => {
86
- if (hasActiveSubscription) {
87
- return Promise.resolve();
88
- }
89
- if (this.verbose) {
90
- logger.logToStderr(`Starting subscription since subscription is not active for the content type`);
91
- }
92
- const startSubscriptionEndPoint = `activity/feed/subscriptions/start?contentType=${AuditContentTypes[args.options.contentType]}&PublisherIdentifier=${this.tenantId}`;
93
- const requestOptions = {
94
- url: `${this.serviceUrl}/${this.tenantId}/${startSubscriptionEndPoint}`,
95
- headers: {
96
- accept: 'application/json;odata.metadata=none'
97
- },
98
- responseType: 'json'
99
- };
100
- return request_1.default.post(requestOptions);
101
- });
102
- }
103
- getAuditContentList(args, logger) {
104
- if (this.verbose) {
105
- logger.logToStderr(`Start listing Audit Content URL`);
106
- }
107
- let subscriptionListEndpoint = `activity/feed/subscriptions/content?contentType=${AuditContentTypes[args.options.contentType]}&PublisherIdentifier=${this.tenantId}`;
108
- if (typeof args.options.startTime !== 'undefined') {
109
- if (typeof args.options.endTime !== 'undefined') {
110
- subscriptionListEndpoint += `&starttime=${escape(args.options.startTime)}&endTime=${escape(args.options.endTime)}`;
111
- }
112
- else {
113
- const parsedEndDate = new Date(args.options.startTime);
114
- parsedEndDate.setDate(parsedEndDate.getDate() + 1);
115
- subscriptionListEndpoint += `&starttime=${escape(args.options.startTime)}&endTime=${escape(parsedEndDate.toISOString())}`;
116
- }
117
- }
118
- const requestOptions = {
119
- url: `${this.serviceUrl}/${this.tenantId}/${subscriptionListEndpoint}`,
120
- headers: {
121
- accept: 'application/json;odata.metadata=none'
122
- },
123
- responseType: 'json'
124
- };
125
- return request_1.default.get(requestOptions);
126
- }
127
- getBatchedPromises(auditContentLists, batchSize) {
128
- const batchedPromises = [];
129
- for (let i = 0; i < auditContentLists.length; i += batchSize) {
130
- const promiseRequestBatch = auditContentLists
131
- .slice(i, i + batchSize < auditContentLists.length ? i + batchSize : auditContentLists.length)
132
- .map((AuditContentList) => this.getAuditLogReportForSingleContentUrl(AuditContentList.contentUri));
133
- batchedPromises.push(promiseRequestBatch);
134
- }
135
- return Promise.resolve(batchedPromises);
136
- }
137
- getBatchedAuditlogData(logger, batchedPromiseList, batchNumber, resolve, reject) {
138
- if (this.verbose) {
139
- logger.logToStderr(`Starting Batch : ${batchNumber}`);
140
- }
141
- Promise
142
- .all(batchedPromiseList[batchNumber])
143
- .then((data) => {
144
- data.forEach(d1 => {
145
- d1.forEach(d2 => {
146
- this.completeAuditReports.push(d2);
147
- });
148
- });
149
- if (batchNumber < batchedPromiseList.length - 1) {
150
- this.getBatchedAuditlogData(logger, batchedPromiseList, ++batchNumber, resolve, reject);
151
- }
152
- else {
153
- resolve();
154
- }
155
- }, (err) => reject(err));
156
- }
157
- getAuditLogReportForSingleContentUrl(auditURL) {
158
- const requestOptions = {
159
- url: auditURL,
160
- headers: {
161
- accept: 'application/json'
162
- },
163
- responseType: 'json'
164
- };
165
- return request_1.default.get(requestOptions);
166
- }
167
- get auditContentTypeLists() {
168
- const result = [];
169
- for (const auditContentType in AuditContentTypes) {
170
- result.push(auditContentType);
171
- }
172
- return result;
173
- }
174
- options() {
175
- const options = [
176
- {
177
- option: '-c, --contentType <contentType>',
178
- autocomplete: this.auditContentTypeLists
179
- },
180
- {
181
- option: '-s, --startTime [startTime]'
182
- },
183
- {
184
- option: '-e, --endTime [endTime]'
185
- }
186
- ];
187
- const parentOptions = super.options();
188
- return options.concat(parentOptions);
189
- }
190
- validate(args) {
191
- if (AuditContentTypes[args.options.contentType] === undefined) {
192
- return `${args.options.contentType} is not a valid value for the contentType option. Allowed values are ${this.auditContentTypeLists.join(' | ')}`;
193
- }
194
- if (args.options.startTime || args.options.endTime) {
195
- if (!args.options.startTime) {
196
- return `Please specify startTime`;
197
- }
198
- const parsedStartTime = Date.parse(args.options.startTime);
199
- if (isNaN(parsedStartTime)) {
200
- return `${args.options.startTime} is not a valid startTime. Provide the date in one of the following formats:
201
- 'YYYY-MM-DD'
202
- 'YYYY-MM-DDThh:mm'
203
- 'YYYY-MM-DDThh:mmZ'
204
- 'YYYY-MM-DDThh:mm±hh:mm'`;
205
- }
206
- const startdateTodayDifference = (new Date().getTime() - parsedStartTime) / (1000 * 60 * 60 * 24);
207
- if (startdateTodayDifference > 7) {
208
- return `Start time should be no more than 7 days in the past`;
209
- }
210
- if (args.options.endTime) {
211
- const parsedEndTime = Date.parse(args.options.endTime);
212
- if (isNaN(parsedEndTime)) {
213
- return `${args.options.endTime} is not a valid endTime. Provide the date in one of the following formats:
214
- 'YYYY-MM-DD'
215
- 'YYYY-MM-DDThh:mm'
216
- 'YYYY-MM-DDThh:mmZ'
217
- 'YYYY-MM-DDThh:mm±hh:mm'`;
218
- }
219
- if (parsedStartTime && parsedEndTime) {
220
- const startEndDateDifference = (parsedEndTime - parsedStartTime) / (1000 * 60 * 60 * 24);
221
- if (startEndDateDifference < 0 || startEndDateDifference > 1) {
222
- return `startTime and endTime must be less than or equal to 24 hours apart, with the start time prior to end time.`;
223
- }
224
- }
225
- }
226
- }
227
- return true;
228
- }
229
- }
230
- module.exports = new TenantAuditlogReportCommand();
231
- //# sourceMappingURL=auditlog-report.js.map
@@ -1,41 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const Auth_1 = require("../../../../Auth");
4
- const Command_1 = require("../../../../Command");
5
- const request_1 = require("../../../../request");
6
- const utils_1 = require("../../../../utils");
7
- const commands_1 = require("../../commands");
8
- class TenantServiceListCommand extends Command_1.default {
9
- get name() {
10
- return commands_1.default.SERVICE_LIST;
11
- }
12
- get description() {
13
- return 'Gets services available in Microsoft 365';
14
- }
15
- defaultProperties() {
16
- return ['Id', 'DisplayName'];
17
- }
18
- commandAction(logger, args, cb) {
19
- if (this.verbose) {
20
- logger.logToStderr(`Getting the health status of the different services in Microsoft 365.`);
21
- }
22
- const serviceUrl = 'https://manage.office.com/api/v1.0';
23
- const statusEndpoint = 'ServiceComms/Services';
24
- const tenantId = utils_1.accessToken.getTenantIdFromAccessToken(Auth_1.default.service.accessTokens[Auth_1.default.defaultResource].accessToken);
25
- const requestOptions = {
26
- url: `${serviceUrl}/${tenantId}/${statusEndpoint}`,
27
- headers: {
28
- accept: 'application/json;odata.metadata=none'
29
- },
30
- responseType: 'json'
31
- };
32
- request_1.default
33
- .get(requestOptions)
34
- .then((res) => {
35
- logger.log(res.value);
36
- cb();
37
- }, (err) => this.handleRejectedODataJsonPromise(err, logger, cb));
38
- }
39
- }
40
- module.exports = new TenantServiceListCommand();
41
- //# sourceMappingURL=service-list.js.map
@@ -1,55 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const Auth_1 = require("../../../../Auth");
4
- const Command_1 = require("../../../../Command");
5
- const request_1 = require("../../../../request");
6
- const utils_1 = require("../../../../utils");
7
- const commands_1 = require("../../commands");
8
- class TenantServiceMessageListCommand extends Command_1.default {
9
- get name() {
10
- return commands_1.default.SERVICE_MESSAGE_LIST;
11
- }
12
- get description() {
13
- return 'Gets service messages Microsoft 365';
14
- }
15
- defaultProperties() {
16
- return ['Workload', 'Id', 'Message'];
17
- }
18
- commandAction(logger, args, cb) {
19
- if (this.verbose) {
20
- logger.logToStderr(`Getting service messages...`);
21
- }
22
- const serviceUrl = 'https://manage.office.com/api/v1.0';
23
- const statusEndpoint = args.options.workload ? `ServiceComms/Messages?$filter=Workload eq '${encodeURIComponent(args.options.workload)}'` : 'ServiceComms/Messages';
24
- const tenantId = utils_1.accessToken.getTenantIdFromAccessToken(Auth_1.default.service.accessTokens[Auth_1.default.defaultResource].accessToken);
25
- const requestOptions = {
26
- url: `${serviceUrl}/${tenantId}/${statusEndpoint}`,
27
- headers: {
28
- accept: 'application/json;odata.metadata=none'
29
- },
30
- responseType: 'json'
31
- };
32
- request_1.default
33
- .get(requestOptions)
34
- .then((res) => {
35
- res.value.forEach(r => {
36
- r.Workload = r.Id.startsWith('MC') ? r.AffectedWorkloadDisplayNames.join(', ') : r.Workload;
37
- r.Id = r.Id;
38
- r.Message = r.Id.startsWith('MC') ? r.Title : r.ImpactDescription;
39
- });
40
- logger.log(res.value);
41
- cb();
42
- }, (err) => this.handleRejectedODataJsonPromise(err, logger, cb));
43
- }
44
- options() {
45
- const options = [
46
- {
47
- option: '-w, --workload [workload] '
48
- }
49
- ];
50
- const parentOptions = super.options();
51
- return options.concat(parentOptions);
52
- }
53
- }
54
- module.exports = new TenantServiceMessageListCommand();
55
- //# sourceMappingURL=service-message-list.js.map
@@ -1,54 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const Auth_1 = require("../../../../Auth");
4
- const Command_1 = require("../../../../Command");
5
- const request_1 = require("../../../../request");
6
- const utils_1 = require("../../../../utils");
7
- const commands_1 = require("../../commands");
8
- class TenantServiceReportHistoricalServiceStatusCommand extends Command_1.default {
9
- get name() {
10
- return commands_1.default.SERVICE_REPORT_HISTORICALSERVICESTATUS;
11
- }
12
- get description() {
13
- return 'Gets the historical service status of Microsoft 365 Services of the last 7 days';
14
- }
15
- getTelemetryProperties(args) {
16
- const telemetryProps = super.getTelemetryProperties(args);
17
- telemetryProps.workload = args.options.workload;
18
- return telemetryProps;
19
- }
20
- defaultProperties() {
21
- return ['WorkloadDisplayName', 'StatusDisplayName', 'StatusTime'];
22
- }
23
- commandAction(logger, args, cb) {
24
- if (this.verbose) {
25
- logger.logToStderr(`Gets the historical service status of Microsoft 365 Services of the last 7 days`);
26
- }
27
- const serviceUrl = 'https://manage.office.com/api/v1.0';
28
- const statusEndpoint = typeof args.options.workload !== 'undefined' ? `ServiceComms/HistoricalStatus?$filter=Workload eq '${encodeURIComponent(args.options.workload)}'` : 'ServiceComms/HistoricalStatus';
29
- const tenantId = utils_1.accessToken.getTenantIdFromAccessToken(Auth_1.default.service.accessTokens[Auth_1.default.defaultResource].accessToken);
30
- const requestOptions = {
31
- url: `${serviceUrl}/${tenantId}/${statusEndpoint}`,
32
- headers: {
33
- accept: 'application/json;odata.metadata=none'
34
- },
35
- responseType: 'json'
36
- };
37
- request_1.default.get(requestOptions)
38
- .then((res) => {
39
- logger.log(res);
40
- cb();
41
- }, (err) => this.handleRejectedODataJsonPromise(err, logger, cb));
42
- }
43
- options() {
44
- const options = [
45
- {
46
- option: '-w, --workload [workload]'
47
- }
48
- ];
49
- const parentOptions = super.options();
50
- return options.concat(parentOptions);
51
- }
52
- }
53
- module.exports = new TenantServiceReportHistoricalServiceStatusCommand();
54
- //# sourceMappingURL=service-report-historicalservicestatus.js.map
@@ -1,55 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const Auth_1 = require("../../../../Auth");
4
- const Command_1 = require("../../../../Command");
5
- const request_1 = require("../../../../request");
6
- const utils_1 = require("../../../../utils");
7
- const commands_1 = require("../../commands");
8
- class TenantStatusListCommand extends Command_1.default {
9
- get name() {
10
- return commands_1.default.STATUS_LIST;
11
- }
12
- get description() {
13
- return 'Gets health status of the different services in Microsoft 365';
14
- }
15
- getTelemetryProperties(args) {
16
- const telemetryProps = super.getTelemetryProperties(args);
17
- telemetryProps.workload = args.options.workload;
18
- return telemetryProps;
19
- }
20
- defaultProperties() {
21
- return ['WorkloadDisplayName', 'StatusDisplayName'];
22
- }
23
- commandAction(logger, args, cb) {
24
- if (this.verbose) {
25
- logger.logToStderr(`Getting the health status of the different services in Microsoft 365.`);
26
- }
27
- const serviceUrl = 'https://manage.office.com/api/v1.0';
28
- const statusEndpoint = typeof args.options.workload !== 'undefined' ? `ServiceComms/CurrentStatus?$filter=Workload eq '${encodeURIComponent(args.options.workload)}'` : 'ServiceComms/CurrentStatus';
29
- const tenantId = utils_1.accessToken.getTenantIdFromAccessToken(Auth_1.default.service.accessTokens[Auth_1.default.defaultResource].accessToken);
30
- const requestOptions = {
31
- url: `${serviceUrl}/${tenantId}/${statusEndpoint}`,
32
- headers: {
33
- accept: 'application/json;odata.metadata=none'
34
- },
35
- responseType: 'json'
36
- };
37
- request_1.default
38
- .get(requestOptions)
39
- .then((res) => {
40
- logger.log(res.value);
41
- cb();
42
- }, (err) => this.handleRejectedODataJsonPromise(err, logger, cb));
43
- }
44
- options() {
45
- const options = [
46
- {
47
- option: '-w, --workload [workload]'
48
- }
49
- ];
50
- const parentOptions = super.options();
51
- return options.concat(parentOptions);
52
- }
53
- }
54
- module.exports = new TenantStatusListCommand();
55
- //# sourceMappingURL=status-list.js.map
@@ -1,61 +0,0 @@
1
- # tenant auditlog report
2
-
3
- Gets audit logs from the Office 365 Management API
4
-
5
- ## Usage
6
-
7
- ```sh
8
- m365 tenant auditlog report [options]
9
- ```
10
-
11
- ## Options
12
-
13
- `-c, --contentType <contentType>`
14
- : Audit content type of logs to be retrieved, should be one of the following: `AzureActiveDirectory`, `Exchange`, `SharePoint`, `General`, `DLP`.
15
-
16
- `-s, --startTime [startTime]`
17
- : Start time of logs to be retrieved. Start time and end time must be less than or equal to 24 hours apart. Start time is mandatory if End time is specified.
18
-
19
- `-e, --endTime [endTime]`
20
- : End time of logs to be retrieved. Start time and end time must be less than or equal to 24 hours apart. If End time is not specified, command will assume the End time to be 24 hours from the specified Start time.
21
-
22
- --8<-- "docs/cmd/_global.md"
23
-
24
- ## Remarks
25
-
26
- By default, if `startTime` and `endTime` are not mentioned, then the content available in the last **24 hours** is returned. `startTime` and `endTime` must be less than or equal to **24 hours** apart, with the `startTime` prior to `endTime` and `startTime` no more than 7 days in the past.
27
-
28
- If `endTime` is not specified, command will assume the `endTime` to be **24 hours** from the specified `startTime`.
29
- `startTime` is mandatory if `endTime` is specified.
30
-
31
- `DLP` audit log data is only available to users that have been granted “Read DLP sensitive data” permission. Otherwise you will get `Error: Request failed with status code 401`
32
-
33
- ## Examples
34
-
35
- Gets audit logs from the Office 365 Management API for the `Exchange` content type.
36
-
37
- ```sh
38
- m365 tenant auditlog report --contentType "Exchange"
39
- ```
40
-
41
- Gets audit logs from the Office 365 Management API for the `Exchange` content type in the date range between `2020-12-13` and `2020-12-14`
42
-
43
- ```sh
44
- m365 tenant auditlog report --contentType "Exchange" --startTime "2020-12-13" --endTime "2020-12-14"
45
- ```
46
-
47
- Gets audit logs from the Office 365 Management API for the `Exchange` content type between `15:00` hours and `16:00` hours on `2020-12-13`
48
-
49
- ```sh
50
- m365 tenant auditlog report --contentType "Exchange" --startTime "2020-12-13T15:00:00" --endTime "2020-12-13T16:00:00"
51
- ```
52
-
53
- Gets audit logs from the Office 365 Management API for the `Exchange` content type between `23:00` hours on `2020-12-13` and `05:00` hours on `2020-12-14`
54
-
55
- ```sh
56
- m365 tenant auditlog report --contentType "Exchange" --startTime "2020-12-13T23:00:00" --endTime "2020-12-14T05:00:00"
57
- ```
58
-
59
- ## More information
60
-
61
- - Office 365 Management Activity API reference: [https://docs.microsoft.com/en-us/office/office-365-management-api/office-365-management-activity-api-reference](https://docs.microsoft.com/en-us/office/office-365-management-api/office-365-management-activity-api-reference)
@@ -1,25 +0,0 @@
1
- # tenant service list
2
-
3
- Gets services available in Microsoft 365
4
-
5
- ## Usage
6
-
7
- ```sh
8
- m365 tenant service list [options]
9
- ```
10
-
11
- ## Options
12
-
13
- --8<-- "docs/cmd/_global.md"
14
-
15
- ## Examples
16
-
17
- Get services available in Microsoft 365
18
-
19
- ```sh
20
- m365 tenant service list
21
- ```
22
-
23
- ## More information
24
-
25
- - Microsoft 365 Service Communications API reference: [https://docs.microsoft.com/en-us/office/office-365-management-api/office-365-service-communications-api-reference#get-services](https://docs.microsoft.com/en-us/office/office-365-management-api/office-365-service-communications-api-reference#get-services)
@@ -1,34 +0,0 @@
1
- # tenant service message list
2
-
3
- Gets service messages Microsoft 365
4
-
5
- ## Usage
6
-
7
- ```sh
8
- m365 tenant service message list [options]
9
- ```
10
-
11
- ## Options
12
-
13
- `-w, --workload [workload]`
14
- : Retrieve service messages for the particular workload. If not provided, retrieves messages for all workloads
15
-
16
- --8<-- "docs/cmd/_global.md"
17
-
18
- ## Examples
19
-
20
- Get service messages of all services in Microsoft 365
21
-
22
- ```sh
23
- m365 tenant service message list
24
- ```
25
-
26
- Get service messages for Microsoft Teams
27
-
28
- ```sh
29
- m365 tenant service message list --workload microsoftteams
30
- ```
31
-
32
- ## More information
33
-
34
- - Microsoft 365 Service Communications API reference: [https://docs.microsoft.com/office/office-365-management-api/office-365-service-communications-api-reference#get-messages](https://docs.microsoft.com/office/office-365-management-api/office-365-service-communications-api-reference#get-messages)