@pnp/cli-microsoft365 4.4.0 → 5.0.0-beta.2df6db4
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/dist/m365/aad/commands/oauth2grant/oauth2grant-list.js +7 -7
- package/dist/m365/aad/commands/oauth2grant/oauth2grant-remove.js +36 -12
- package/dist/m365/aad/commands/sp/sp-get.js +44 -21
- package/dist/m365/aad/commands/user/user-list.js +7 -4
- package/dist/m365/flow/commands/flow-get.js +2 -2
- package/dist/m365/tenant/commands/serviceannouncement/serviceannouncement-health-get.js +57 -0
- package/dist/m365/tenant/commands/serviceannouncement/serviceannouncement-health-list.js +56 -0
- package/dist/m365/tenant/commands.js +2 -0
- package/docs/docs/cmd/aad/oauth2grant/oauth2grant-list.md +4 -3
- package/docs/docs/cmd/aad/oauth2grant/oauth2grant-remove.md +9 -0
- package/docs/docs/cmd/aad/sp/sp-get.md +2 -1
- package/docs/docs/cmd/aad/user/user-list.md +9 -0
- package/docs/docs/cmd/tenant/serviceannouncement/serviceannouncement-health-get.md +33 -0
- package/docs/docs/cmd/tenant/serviceannouncement/serviceannouncement-health-list.md +30 -0
- package/npm-shrinkwrap.json +2 -2
- package/package.json +2 -2
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const request_1 = require("../../../../request");
|
|
4
4
|
const Utils_1 = require("../../../../Utils");
|
|
5
|
-
const
|
|
5
|
+
const GraphCommand_1 = require("../../../base/GraphCommand");
|
|
6
6
|
const commands_1 = require("../../commands");
|
|
7
|
-
class AadOAuth2GrantListCommand extends
|
|
7
|
+
class AadOAuth2GrantListCommand extends GraphCommand_1.default {
|
|
8
8
|
get name() {
|
|
9
9
|
return commands_1.default.OAUTH2GRANT_LIST;
|
|
10
10
|
}
|
|
@@ -19,9 +19,9 @@ class AadOAuth2GrantListCommand extends AadCommand_1.default {
|
|
|
19
19
|
logger.logToStderr(`Retrieving list of OAuth grants for the service principal...`);
|
|
20
20
|
}
|
|
21
21
|
const requestOptions = {
|
|
22
|
-
url: `${this.resource}/
|
|
22
|
+
url: `${this.resource}/v1.0/oauth2PermissionGrants?$filter=clientId eq '${encodeURIComponent(args.options.spObjectId)}'`,
|
|
23
23
|
headers: {
|
|
24
|
-
accept: 'application/json;odata=
|
|
24
|
+
accept: 'application/json;odata.metadata=none'
|
|
25
25
|
},
|
|
26
26
|
responseType: 'json'
|
|
27
27
|
};
|
|
@@ -37,15 +37,15 @@ class AadOAuth2GrantListCommand extends AadCommand_1.default {
|
|
|
37
37
|
options() {
|
|
38
38
|
const options = [
|
|
39
39
|
{
|
|
40
|
-
option: '-i, --
|
|
40
|
+
option: '-i, --spObjectId <spObjectId>'
|
|
41
41
|
}
|
|
42
42
|
];
|
|
43
43
|
const parentOptions = super.options();
|
|
44
44
|
return options.concat(parentOptions);
|
|
45
45
|
}
|
|
46
46
|
validate(args) {
|
|
47
|
-
if (!Utils_1.default.isValidGuid(args.options.
|
|
48
|
-
return `${args.options.
|
|
47
|
+
if (!Utils_1.default.isValidGuid(args.options.spObjectId)) {
|
|
48
|
+
return `${args.options.spObjectId} is not a valid GUID`;
|
|
49
49
|
}
|
|
50
50
|
return true;
|
|
51
51
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const cli_1 = require("../../../../cli");
|
|
3
4
|
const request_1 = require("../../../../request");
|
|
4
5
|
const GraphCommand_1 = require("../../../base/GraphCommand");
|
|
5
6
|
const commands_1 = require("../../commands");
|
|
@@ -11,24 +12,47 @@ class AadOAuth2GrantRemoveCommand extends GraphCommand_1.default {
|
|
|
11
12
|
return 'Remove specified service principal OAuth2 permissions';
|
|
12
13
|
}
|
|
13
14
|
commandAction(logger, args, cb) {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
15
|
+
const removeOauth2Grant = () => {
|
|
16
|
+
if (this.verbose) {
|
|
17
|
+
logger.logToStderr(`Removing OAuth2 permissions...`);
|
|
18
|
+
}
|
|
19
|
+
const requestOptions = {
|
|
20
|
+
url: `${this.resource}/v1.0/oauth2PermissionGrants/${encodeURIComponent(args.options.grantId)}`,
|
|
21
|
+
headers: {
|
|
22
|
+
'accept': 'application/json;odata.metadata=none'
|
|
23
|
+
},
|
|
24
|
+
responseType: 'json'
|
|
25
|
+
};
|
|
26
|
+
request_1.default
|
|
27
|
+
.delete(requestOptions)
|
|
28
|
+
.then(_ => cb(), (rawRes) => this.handleRejectedODataJsonPromise(rawRes, logger, cb));
|
|
23
29
|
};
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
30
|
+
if (args.options.confirm) {
|
|
31
|
+
removeOauth2Grant();
|
|
32
|
+
}
|
|
33
|
+
else {
|
|
34
|
+
cli_1.Cli.prompt({
|
|
35
|
+
type: 'confirm',
|
|
36
|
+
name: 'continue',
|
|
37
|
+
default: false,
|
|
38
|
+
message: `Are you sure you want to remove the OAuth2 permissions for ${args.options.grantId}?`
|
|
39
|
+
}, (result) => {
|
|
40
|
+
if (!result.continue) {
|
|
41
|
+
cb();
|
|
42
|
+
}
|
|
43
|
+
else {
|
|
44
|
+
removeOauth2Grant();
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
}
|
|
27
48
|
}
|
|
28
49
|
options() {
|
|
29
50
|
const options = [
|
|
30
51
|
{
|
|
31
52
|
option: '-i, --grantId <grantId>'
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
option: '--confirm'
|
|
32
56
|
}
|
|
33
57
|
];
|
|
34
58
|
const parentOptions = super.options();
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const request_1 = require("../../../../request");
|
|
4
4
|
const Utils_1 = require("../../../../Utils");
|
|
5
|
-
const
|
|
5
|
+
const GraphCommand_1 = require("../../../base/GraphCommand");
|
|
6
6
|
const commands_1 = require("../../commands");
|
|
7
|
-
class AadSpGetCommand extends
|
|
7
|
+
class AadSpGetCommand extends GraphCommand_1.default {
|
|
8
8
|
get name() {
|
|
9
9
|
return commands_1.default.SP_GET;
|
|
10
10
|
}
|
|
@@ -18,35 +18,58 @@ class AadSpGetCommand extends AadCommand_1.default {
|
|
|
18
18
|
telemetryProps.objectId = (!(!args.options.objectId)).toString();
|
|
19
19
|
return telemetryProps;
|
|
20
20
|
}
|
|
21
|
-
|
|
22
|
-
if (
|
|
23
|
-
|
|
21
|
+
getSpId(args) {
|
|
22
|
+
if (args.options.objectId) {
|
|
23
|
+
return Promise.resolve(args.options.objectId);
|
|
24
24
|
}
|
|
25
25
|
let spMatchQuery = '';
|
|
26
|
-
if (args.options.
|
|
27
|
-
spMatchQuery = `appId eq '${encodeURIComponent(args.options.appId)}'`;
|
|
28
|
-
}
|
|
29
|
-
else if (args.options.objectId) {
|
|
30
|
-
spMatchQuery = `objectId eq '${encodeURIComponent(args.options.objectId)}'`;
|
|
31
|
-
}
|
|
32
|
-
else {
|
|
26
|
+
if (args.options.displayName) {
|
|
33
27
|
spMatchQuery = `displayName eq '${encodeURIComponent(args.options.displayName)}'`;
|
|
34
28
|
}
|
|
35
|
-
|
|
36
|
-
|
|
29
|
+
else if (args.options.appId) {
|
|
30
|
+
spMatchQuery = `appId eq '${encodeURIComponent(args.options.appId)}'`;
|
|
31
|
+
}
|
|
32
|
+
const idRequestOptions = {
|
|
33
|
+
url: `${this.resource}/v1.0/servicePrincipals?$filter=${spMatchQuery}`,
|
|
37
34
|
headers: {
|
|
38
|
-
accept: 'application/json;odata=
|
|
35
|
+
accept: 'application/json;odata.metadata=none'
|
|
39
36
|
},
|
|
40
37
|
responseType: 'json'
|
|
41
38
|
};
|
|
42
|
-
request_1.default
|
|
43
|
-
.get(
|
|
44
|
-
.then(
|
|
45
|
-
|
|
46
|
-
|
|
39
|
+
return request_1.default
|
|
40
|
+
.get(idRequestOptions)
|
|
41
|
+
.then(response => {
|
|
42
|
+
const spItem = response.value[0];
|
|
43
|
+
if (!spItem) {
|
|
44
|
+
return Promise.reject(`The specified Azure AD app does not exist`);
|
|
45
|
+
}
|
|
46
|
+
if (response.value.length > 1) {
|
|
47
|
+
return Promise.reject(`Multiple Azure AD apps with name ${args.options.displayName} found: ${response.value.map(x => x.id)}`);
|
|
47
48
|
}
|
|
49
|
+
return Promise.resolve(spItem.id);
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
commandAction(logger, args, cb) {
|
|
53
|
+
if (this.verbose) {
|
|
54
|
+
logger.logToStderr(`Retrieving service principal information...`);
|
|
55
|
+
}
|
|
56
|
+
this
|
|
57
|
+
.getSpId(args)
|
|
58
|
+
.then((id) => {
|
|
59
|
+
const requestOptions = {
|
|
60
|
+
url: `${this.resource}/v1.0/servicePrincipals/${id}`,
|
|
61
|
+
headers: {
|
|
62
|
+
accept: 'application/json;odata.metadata=none',
|
|
63
|
+
'content-type': 'application/json;odata.metadata=none'
|
|
64
|
+
},
|
|
65
|
+
responseType: 'json'
|
|
66
|
+
};
|
|
67
|
+
return request_1.default.get(requestOptions);
|
|
68
|
+
})
|
|
69
|
+
.then((res) => {
|
|
70
|
+
logger.log(res);
|
|
48
71
|
cb();
|
|
49
|
-
}, (
|
|
72
|
+
}, (err) => this.handleRejectedODataJsonPromise(err, logger, cb));
|
|
50
73
|
}
|
|
51
74
|
options() {
|
|
52
75
|
const options = [
|
|
@@ -15,6 +15,7 @@ class AadUserListCommand extends GraphItemsListCommand_1.GraphItemsListCommand {
|
|
|
15
15
|
getTelemetryProperties(args) {
|
|
16
16
|
const telemetryProps = super.getTelemetryProperties(args);
|
|
17
17
|
telemetryProps.properties = args.options.properties;
|
|
18
|
+
telemetryProps.deleted = typeof args.options.deleted !== 'undefined';
|
|
18
19
|
return telemetryProps;
|
|
19
20
|
}
|
|
20
21
|
commandAction(logger, args, cb) {
|
|
@@ -22,7 +23,8 @@ class AadUserListCommand extends GraphItemsListCommand_1.GraphItemsListCommand {
|
|
|
22
23
|
args.options.properties.split(',').map(p => p.trim()) :
|
|
23
24
|
['userPrincipalName', 'displayName'];
|
|
24
25
|
const filter = this.getFilter(args.options);
|
|
25
|
-
const
|
|
26
|
+
const endpoint = args.options.deleted ? 'directory/deletedItems/microsoft.graph.user' : 'users';
|
|
27
|
+
const url = `${this.resource}/v1.0/${endpoint}?$select=${properties.join(',')}${(filter.length > 0 ? '&' + filter : '')}&$top=100`;
|
|
26
28
|
this
|
|
27
29
|
.getAllItems(url, logger, true)
|
|
28
30
|
.then(() => {
|
|
@@ -35,6 +37,8 @@ class AadUserListCommand extends GraphItemsListCommand_1.GraphItemsListCommand {
|
|
|
35
37
|
const excludeOptions = [
|
|
36
38
|
'properties',
|
|
37
39
|
'p',
|
|
40
|
+
'deleted',
|
|
41
|
+
'd',
|
|
38
42
|
'debug',
|
|
39
43
|
'verbose',
|
|
40
44
|
'output',
|
|
@@ -55,9 +59,8 @@ class AadUserListCommand extends GraphItemsListCommand_1.GraphItemsListCommand {
|
|
|
55
59
|
}
|
|
56
60
|
options() {
|
|
57
61
|
const options = [
|
|
58
|
-
{
|
|
59
|
-
|
|
60
|
-
}
|
|
62
|
+
{ option: '-p, --properties [properties]' },
|
|
63
|
+
{ option: '-d, --deleted' }
|
|
61
64
|
];
|
|
62
65
|
const parentOptions = super.options();
|
|
63
66
|
return options.concat(parentOptions);
|
|
@@ -29,8 +29,8 @@ class FlowGetCommand extends AzmgmtCommand_1.default {
|
|
|
29
29
|
.then((res) => {
|
|
30
30
|
res.displayName = res.properties.displayName;
|
|
31
31
|
res.description = res.properties.definitionSummary.description || '';
|
|
32
|
-
res.triggers =
|
|
33
|
-
res.actions =
|
|
32
|
+
res.triggers = res.properties.definitionSummary.triggers.map((t) => (t.type + (t.kind ? "-" + t.kind : ''))).join(', ');
|
|
33
|
+
res.actions = res.properties.definitionSummary.actions.map((a) => (a.type + (a.swaggerOperationId ? "-" + a.swaggerOperationId : ''))).join(', ');
|
|
34
34
|
logger.log(res);
|
|
35
35
|
cb();
|
|
36
36
|
}, (rawRes) => this.handleRejectedODataJsonPromise(rawRes, logger, cb));
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const GraphCommand_1 = require("../../../base/GraphCommand");
|
|
4
|
+
const request_1 = require("../../../../request");
|
|
5
|
+
const commands_1 = require("../../commands");
|
|
6
|
+
class TenantServiceAnnouncementHealthGetCommand extends GraphCommand_1.default {
|
|
7
|
+
get name() {
|
|
8
|
+
return commands_1.default.SERVICEANNOUNCEMENT_HEALTH_GET;
|
|
9
|
+
}
|
|
10
|
+
get description() {
|
|
11
|
+
return 'This operation provides the health information of a specified service for a tenant';
|
|
12
|
+
}
|
|
13
|
+
getTelemetryProperties(args) {
|
|
14
|
+
const telemetryProps = super.getTelemetryProperties(args);
|
|
15
|
+
telemetryProps.issues = typeof args.options.issues !== 'undefined';
|
|
16
|
+
return telemetryProps;
|
|
17
|
+
}
|
|
18
|
+
defaultProperties() {
|
|
19
|
+
return ['id', 'status', 'service'];
|
|
20
|
+
}
|
|
21
|
+
commandAction(logger, args, cb) {
|
|
22
|
+
this
|
|
23
|
+
.getServiceHealth(args.options)
|
|
24
|
+
.then((res) => {
|
|
25
|
+
logger.log(res);
|
|
26
|
+
cb();
|
|
27
|
+
}, (err) => this.handleRejectedODataJsonPromise(err, logger, cb));
|
|
28
|
+
}
|
|
29
|
+
getServiceHealth(options) {
|
|
30
|
+
const requestOptions = {
|
|
31
|
+
url: `${this.resource}/v1.0/admin/serviceAnnouncement/healthOverviews/${options.serviceName}${options.issues && (!options.output || options.output.toLocaleLowerCase() === 'json') ? '?$expand=issues' : ''}`,
|
|
32
|
+
headers: {
|
|
33
|
+
accept: 'application/json;odata.metadata=none'
|
|
34
|
+
},
|
|
35
|
+
responseType: 'json'
|
|
36
|
+
};
|
|
37
|
+
return request_1.default
|
|
38
|
+
.get(requestOptions)
|
|
39
|
+
.then(response => {
|
|
40
|
+
const serviceHealth = response;
|
|
41
|
+
if (!serviceHealth) {
|
|
42
|
+
return Promise.reject(`Error fetching service health`);
|
|
43
|
+
}
|
|
44
|
+
return Promise.resolve(serviceHealth);
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
options() {
|
|
48
|
+
const options = [
|
|
49
|
+
{ option: '-s, --serviceName <serviceName>' },
|
|
50
|
+
{ option: '-i, --issues' }
|
|
51
|
+
];
|
|
52
|
+
const parentOptions = super.options();
|
|
53
|
+
return options.concat(parentOptions);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
module.exports = new TenantServiceAnnouncementHealthGetCommand();
|
|
57
|
+
//# sourceMappingURL=serviceannouncement-health-get.js.map
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const GraphCommand_1 = require("../../../base/GraphCommand");
|
|
4
|
+
const request_1 = require("../../../../request");
|
|
5
|
+
const commands_1 = require("../../commands");
|
|
6
|
+
class TenantServiceAnnouncementHealthListCommand extends GraphCommand_1.default {
|
|
7
|
+
get name() {
|
|
8
|
+
return commands_1.default.SERVICEANNOUNCEMENT_HEALTH_LIST;
|
|
9
|
+
}
|
|
10
|
+
get description() {
|
|
11
|
+
return 'This operation provides the health report of all subscribed services for a tenant';
|
|
12
|
+
}
|
|
13
|
+
getTelemetryProperties(args) {
|
|
14
|
+
const telemetryProps = super.getTelemetryProperties(args);
|
|
15
|
+
telemetryProps.issues = typeof args.options.issues !== 'undefined';
|
|
16
|
+
return telemetryProps;
|
|
17
|
+
}
|
|
18
|
+
defaultProperties() {
|
|
19
|
+
return ['id', 'status', 'service'];
|
|
20
|
+
}
|
|
21
|
+
commandAction(logger, args, cb) {
|
|
22
|
+
this
|
|
23
|
+
.listServiceHealth(args.options)
|
|
24
|
+
.then((res) => {
|
|
25
|
+
logger.log(res);
|
|
26
|
+
cb();
|
|
27
|
+
}, (err) => this.handleRejectedODataJsonPromise(err, logger, cb));
|
|
28
|
+
}
|
|
29
|
+
listServiceHealth(options) {
|
|
30
|
+
const requestOptions = {
|
|
31
|
+
url: `${this.resource}/v1.0/admin/serviceAnnouncement/healthOverviews${options.issues && (!options.output || options.output.toLocaleLowerCase() === 'json') ? '?$expand=issues' : ''}`,
|
|
32
|
+
headers: {
|
|
33
|
+
accept: 'application/json;odata.metadata=none'
|
|
34
|
+
},
|
|
35
|
+
responseType: 'json'
|
|
36
|
+
};
|
|
37
|
+
return request_1.default
|
|
38
|
+
.get(requestOptions)
|
|
39
|
+
.then(response => {
|
|
40
|
+
const serviceHealthList = response.value;
|
|
41
|
+
if (!serviceHealthList) {
|
|
42
|
+
return Promise.reject(`Error fetching service health`);
|
|
43
|
+
}
|
|
44
|
+
return Promise.resolve(serviceHealthList);
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
options() {
|
|
48
|
+
const options = [
|
|
49
|
+
{ option: '-i, --issues' }
|
|
50
|
+
];
|
|
51
|
+
const parentOptions = super.options();
|
|
52
|
+
return options.concat(parentOptions);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
module.exports = new TenantServiceAnnouncementHealthListCommand();
|
|
56
|
+
//# sourceMappingURL=serviceannouncement-health-list.js.map
|
|
@@ -13,6 +13,8 @@ exports.default = {
|
|
|
13
13
|
SERVICE_LIST: `${prefix} service list`,
|
|
14
14
|
SERVICE_MESSAGE_LIST: `${prefix} service message list`,
|
|
15
15
|
SERVICE_REPORT_HISTORICALSERVICESTATUS: `${prefix} service report historicalservicestatus`,
|
|
16
|
+
SERVICEANNOUNCEMENT_HEALTH_GET: `${prefix} serviceannouncement health get`,
|
|
17
|
+
SERVICEANNOUNCEMENT_HEALTH_LIST: `${prefix} serviceannouncement health list`,
|
|
16
18
|
STATUS_LIST: `${prefix} status list`
|
|
17
19
|
};
|
|
18
20
|
//# sourceMappingURL=commands.js.map
|
|
@@ -10,7 +10,7 @@ m365 aad oauth2grant list [options]
|
|
|
10
10
|
|
|
11
11
|
## Options
|
|
12
12
|
|
|
13
|
-
`-i, --
|
|
13
|
+
`-i, --spObjectId <spObjectId>`
|
|
14
14
|
: objectId of the service principal for which the configured OAuth2 permission grants should be retrieved
|
|
15
15
|
|
|
16
16
|
--8<-- "docs/cmd/_global.md"
|
|
@@ -26,9 +26,10 @@ When using the text output type (default), the command lists only the values of
|
|
|
26
26
|
List OAuth2 permissions granted to service principal with `objectId` _b2307a39-e878-458b-bc90-03bc578531d6_.
|
|
27
27
|
|
|
28
28
|
```sh
|
|
29
|
-
m365 aad oauth2grant list --
|
|
29
|
+
m365 aad oauth2grant list --spObjectId b2307a39-e878-458b-bc90-03bc578531d6
|
|
30
30
|
```
|
|
31
31
|
|
|
32
32
|
## More information
|
|
33
33
|
|
|
34
|
-
- Application and service principal objects in Azure Active Directory (Azure AD): [https://docs.microsoft.com/en-us/azure/active-directory/develop/active-directory-application-objects](https://docs.microsoft.com/en-us/azure/active-directory/develop/active-directory-application-objects)
|
|
34
|
+
- Application and service principal objects in Azure Active Directory (Azure AD): [https://docs.microsoft.com/en-us/azure/active-directory/develop/active-directory-application-objects](https://docs.microsoft.com/en-us/azure/active-directory/develop/active-directory-application-objects)
|
|
35
|
+
- List oauth2PermissionGrants: [https://docs.microsoft.com/en-us/graph/api/oauth2permissiongrant-list?view=graph-rest-1.0](https://docs.microsoft.com/en-us/graph/api/oauth2permissiongrant-list?view=graph-rest-1.0)
|
|
@@ -13,6 +13,9 @@ m365 aad oauth2grant remove [options]
|
|
|
13
13
|
`-i, --grantId <grantId>`
|
|
14
14
|
: `objectId` of OAuth2 permission grant to remove
|
|
15
15
|
|
|
16
|
+
`--confirm`
|
|
17
|
+
: Do not prompt for confirmation before removing OAuth2 permission grant
|
|
18
|
+
|
|
16
19
|
--8<-- "docs/cmd/_global.md"
|
|
17
20
|
|
|
18
21
|
## Remarks
|
|
@@ -33,6 +36,12 @@ Remove the OAuth2 permission grant with ID _YgA60KYa4UOPSdc-lpxYEnQkr8KVLDpCsOXk
|
|
|
33
36
|
m365 aad oauth2grant remove --grantId YgA60KYa4UOPSdc-lpxYEnQkr8KVLDpCsOXkiV8i-ek
|
|
34
37
|
```
|
|
35
38
|
|
|
39
|
+
Remove the OAuth2 permission grant with ID _YgA60KYa4UOPSdc-lpxYEnQkr8KVLDpCsOXkiV8i-ek_ without being asked for confirmation
|
|
40
|
+
|
|
41
|
+
```sh
|
|
42
|
+
m365 aad oauth2grant remove --grantId YgA60KYa4UOPSdc-lpxYEnQkr8KVLDpCsOXkiV8i-ek --confirm
|
|
43
|
+
```
|
|
44
|
+
|
|
36
45
|
## More information
|
|
37
46
|
|
|
38
47
|
- Application and service principal objects in Azure Active Directory (Azure AD): [https://docs.microsoft.com/en-us/azure/active-directory/develop/active-directory-application-objects](https://docs.microsoft.com/en-us/azure/active-directory/develop/active-directory-application-objects)
|
|
@@ -47,4 +47,5 @@ m365 aad sp get --objectId b2307a39-e878-458b-bc90-03bc578531dd
|
|
|
47
47
|
|
|
48
48
|
## More information
|
|
49
49
|
|
|
50
|
-
- Application and service principal objects in Azure Active Directory (Azure AD): [https://docs.microsoft.com/en-us/azure/active-directory/develop/active-directory-application-objects](https://docs.microsoft.com/en-us/azure/active-directory/develop/active-directory-application-objects)
|
|
50
|
+
- Application and service principal objects in Azure Active Directory (Azure AD): [https://docs.microsoft.com/en-us/azure/active-directory/develop/active-directory-application-objects](https://docs.microsoft.com/en-us/azure/active-directory/develop/active-directory-application-objects)
|
|
51
|
+
- Get servicePrincipal: [https://docs.microsoft.com/en-us/graph/api/serviceprincipal-get?view=graph-rest-1.0](https://docs.microsoft.com/en-us/graph/api/serviceprincipal-get?view=graph-rest-1.0)
|
|
@@ -13,6 +13,9 @@ m365 aad user list [options]
|
|
|
13
13
|
`-p, --properties [properties]`
|
|
14
14
|
: Comma-separated list of properties to retrieve
|
|
15
15
|
|
|
16
|
+
`-d, --deleted`
|
|
17
|
+
: Use to retrieve deleted users
|
|
18
|
+
|
|
16
19
|
--8<-- "docs/cmd/_global.md"
|
|
17
20
|
|
|
18
21
|
## Remarks
|
|
@@ -31,6 +34,12 @@ List all users in the tenant
|
|
|
31
34
|
m365 aad user list
|
|
32
35
|
```
|
|
33
36
|
|
|
37
|
+
List all recently deleted users in the tenant
|
|
38
|
+
|
|
39
|
+
```sh
|
|
40
|
+
m365 aad user list --deleted
|
|
41
|
+
```
|
|
42
|
+
|
|
34
43
|
List all users in the tenant. For each one return the display name and e-mail address
|
|
35
44
|
|
|
36
45
|
```sh
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# tenant service announcement health get
|
|
2
|
+
|
|
3
|
+
Get the health report of a specified service for a tenant
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
```sh
|
|
8
|
+
m365 tenant serviceannouncement health get [options]
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Options
|
|
12
|
+
|
|
13
|
+
`-s, --serviceName <serviceName>`
|
|
14
|
+
: The service name to retrieve the health report for.
|
|
15
|
+
|
|
16
|
+
`-i, --issues`
|
|
17
|
+
: Return the collection of issues that happened on the service, with detailed information for each issue. Is only returned in JSON output mode.
|
|
18
|
+
|
|
19
|
+
--8<-- "docs/cmd/\_global.md"
|
|
20
|
+
|
|
21
|
+
## Examples
|
|
22
|
+
|
|
23
|
+
Get the health report for the service _Exchange Online_
|
|
24
|
+
|
|
25
|
+
```sh
|
|
26
|
+
m365 tenant serviceannouncement health get --serviceName "Exchange Online"
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
Get the health report for the service _Exchange Online_ including the issues of the service
|
|
30
|
+
|
|
31
|
+
```sh
|
|
32
|
+
m365 tenant serviceannouncement health get --serviceName "Exchange Online" --issues
|
|
33
|
+
```
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# tenant service announcement health list
|
|
2
|
+
|
|
3
|
+
Gets the health report of all subscribed services for a tenant
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
```sh
|
|
8
|
+
m365 tenant serviceannouncement health list [options]
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Options
|
|
12
|
+
|
|
13
|
+
`-i, --issues`
|
|
14
|
+
: Return the collection of issues that happened on the service, with detailed information for each issue. Is only returned in JSON output mode.
|
|
15
|
+
|
|
16
|
+
--8<-- "docs/cmd/_global.md"
|
|
17
|
+
|
|
18
|
+
## Examples
|
|
19
|
+
|
|
20
|
+
Get the health report of all subscribed services for a tenant
|
|
21
|
+
|
|
22
|
+
```sh
|
|
23
|
+
m365 tenant serviceannouncement health list
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
Get the health report of all subscribed services for a tenant including the issues that happend on each service
|
|
27
|
+
|
|
28
|
+
```sh
|
|
29
|
+
m365 tenant serviceannouncement health list --issues
|
|
30
|
+
```
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pnp/cli-microsoft365",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "5.0.0",
|
|
4
4
|
"lockfileVersion": 2,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "@pnp/cli-microsoft365",
|
|
9
|
-
"version": "
|
|
9
|
+
"version": "5.0.0",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@azure/msal-node": "^1.5.0",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pnp/cli-microsoft365",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "5.0.0-beta.2df6db4",
|
|
4
4
|
"description": "Manage Microsoft 365 and SharePoint Framework projects on any platform",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -226,4 +226,4 @@
|
|
|
226
226
|
"rimraf": "^3.0.2",
|
|
227
227
|
"sinon": "^12.0.1"
|
|
228
228
|
}
|
|
229
|
-
}
|
|
229
|
+
}
|