@pnp/cli-microsoft365 10.3.0-beta.737bf17 → 10.3.0-beta.bc96c3e
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/config.js +1 -1
- package/dist/m365/entra/commands/rolepermission/rolepermission-list.js +42 -0
- package/dist/m365/entra/commands.js +1 -0
- package/dist/m365/tenant/commands/report/report-settings-set.js +47 -0
- package/dist/m365/tenant/commands.js +1 -0
- package/docs/docs/cmd/entra/roledefinition/roledefinition-add.mdx +4 -0
- package/docs/docs/cmd/entra/roledefinition/roledefinition-set.mdx +4 -0
- package/docs/docs/cmd/entra/rolepermission/rolepermission-list.mdx +162 -0
- package/docs/docs/cmd/tenant/report/report-settings-set.mdx +32 -0
- package/package.json +1 -1
package/dist/config.js
CHANGED
|
@@ -34,7 +34,7 @@ export default {
|
|
|
34
34
|
'https://graph.microsoft.com/Place.Read.All',
|
|
35
35
|
'https://graph.microsoft.com/Policy.Read.All',
|
|
36
36
|
'https://graph.microsoft.com/RecordsManagement.ReadWrite.All',
|
|
37
|
-
'https://graph.microsoft.com/Reports.
|
|
37
|
+
'https://graph.microsoft.com/Reports.ReadWrite.All',
|
|
38
38
|
'https://graph.microsoft.com/RoleAssignmentSchedule.ReadWrite.Directory',
|
|
39
39
|
'https://graph.microsoft.com/RoleEligibilitySchedule.Read.Directory',
|
|
40
40
|
'https://graph.microsoft.com/SecurityEvents.Read.All',
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { odata } from '../../../../utils/odata.js';
|
|
2
|
+
import GraphCommand from '../../../base/GraphCommand.js';
|
|
3
|
+
import commands from '../../commands.js';
|
|
4
|
+
import { z } from 'zod';
|
|
5
|
+
import { globalOptionsZod } from '../../../../Command.js';
|
|
6
|
+
import { zod } from '../../../../utils/zod.js';
|
|
7
|
+
const options = globalOptionsZod
|
|
8
|
+
.extend({
|
|
9
|
+
resourceNamespace: zod.alias('n', z.string()),
|
|
10
|
+
privileged: zod.alias('p', z.boolean().optional())
|
|
11
|
+
})
|
|
12
|
+
.strict();
|
|
13
|
+
class EntraRolePermissionListCommand extends GraphCommand {
|
|
14
|
+
get name() {
|
|
15
|
+
return commands.ROLEPERMISSION_LIST;
|
|
16
|
+
}
|
|
17
|
+
get description() {
|
|
18
|
+
return 'Lists all Microsoft Entra ID role permissions';
|
|
19
|
+
}
|
|
20
|
+
defaultProperties() {
|
|
21
|
+
return ['id', 'name', 'actionVerb', 'isPrivileged'];
|
|
22
|
+
}
|
|
23
|
+
get schema() {
|
|
24
|
+
return options;
|
|
25
|
+
}
|
|
26
|
+
async commandAction(logger, args) {
|
|
27
|
+
if (this.verbose) {
|
|
28
|
+
await logger.logToStderr('Getting Microsoft Entra ID role permissions...');
|
|
29
|
+
}
|
|
30
|
+
try {
|
|
31
|
+
const queryString = args.options.privileged ? '?$filter=isPrivileged eq true' : '';
|
|
32
|
+
const url = `${this.resource}/beta/roleManagement/directory/resourceNamespaces/${args.options.resourceNamespace}/resourceActions${queryString}`;
|
|
33
|
+
const results = await odata.getAllItems(url);
|
|
34
|
+
await logger.log(results);
|
|
35
|
+
}
|
|
36
|
+
catch (err) {
|
|
37
|
+
this.handleRejectedODataJsonPromise(err);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
export default new EntraRolePermissionListCommand();
|
|
42
|
+
//# sourceMappingURL=rolepermission-list.js.map
|
|
@@ -93,6 +93,7 @@ export default {
|
|
|
93
93
|
ROLEDEFINITION_GET: `${prefix} roledefinition get`,
|
|
94
94
|
ROLEDEFINITION_REMOVE: `${prefix} roledefinition remove`,
|
|
95
95
|
ROLEDEFINITION_SET: `${prefix} roledefinition set`,
|
|
96
|
+
ROLEPERMISSION_LIST: `${prefix} rolepermission list`,
|
|
96
97
|
SITECLASSIFICATION_DISABLE: `${prefix} siteclassification disable`,
|
|
97
98
|
SITECLASSIFICATION_ENABLE: `${prefix} siteclassification enable`,
|
|
98
99
|
SITECLASSIFICATION_GET: `${prefix} siteclassification get`,
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import request from '../../../../request.js';
|
|
2
|
+
import GraphCommand from '../../../base/GraphCommand.js';
|
|
3
|
+
import commands from '../../commands.js';
|
|
4
|
+
import { z } from 'zod';
|
|
5
|
+
import { globalOptionsZod } from '../../../../Command.js';
|
|
6
|
+
import { zod } from '../../../../utils/zod.js';
|
|
7
|
+
const options = globalOptionsZod
|
|
8
|
+
.extend({
|
|
9
|
+
displayConcealedNames: zod.alias('d', z.boolean())
|
|
10
|
+
})
|
|
11
|
+
.strict();
|
|
12
|
+
class TenantReportSettingsSetCommand extends GraphCommand {
|
|
13
|
+
get name() {
|
|
14
|
+
return commands.REPORT_SETTINGS_SET;
|
|
15
|
+
}
|
|
16
|
+
get description() {
|
|
17
|
+
return 'Update tenant-level settings for Microsoft 365 reports';
|
|
18
|
+
}
|
|
19
|
+
get schema() {
|
|
20
|
+
return options;
|
|
21
|
+
}
|
|
22
|
+
async commandAction(logger, args) {
|
|
23
|
+
try {
|
|
24
|
+
const { displayConcealedNames } = args.options;
|
|
25
|
+
if (this.verbose) {
|
|
26
|
+
await logger.logToStderr(`Updating report setting displayConcealedNames to ${displayConcealedNames}`);
|
|
27
|
+
}
|
|
28
|
+
const requestOptions = {
|
|
29
|
+
url: `${this.resource}/v1.0/admin/reportSettings`,
|
|
30
|
+
headers: {
|
|
31
|
+
accept: 'application/json;odata.metadata=none',
|
|
32
|
+
'content-type': 'application/json'
|
|
33
|
+
},
|
|
34
|
+
responseType: 'json',
|
|
35
|
+
data: {
|
|
36
|
+
displayConcealedNames
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
await request.patch(requestOptions);
|
|
40
|
+
}
|
|
41
|
+
catch (err) {
|
|
42
|
+
this.handleRejectedODataJsonPromise(err);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
export default new TenantReportSettingsSetCommand();
|
|
47
|
+
//# sourceMappingURL=report-settings-set.js.map
|
|
@@ -15,6 +15,7 @@ export default {
|
|
|
15
15
|
REPORT_OFFICE365ACTIVATIONSUSERDETAIL: `${prefix} report office365activationsuserdetail`,
|
|
16
16
|
REPORT_OFFICE365ACTIVATIONSUSERCOUNTS: `${prefix} report office365activationsusercounts`,
|
|
17
17
|
REPORT_SERVICESUSERCOUNTS: `${prefix} report servicesusercounts`,
|
|
18
|
+
REPORT_SETTINGS_SET: `${prefix} report settings set`,
|
|
18
19
|
SECURITY_ALERTS_LIST: `${prefix} security alerts list`,
|
|
19
20
|
SERVICEANNOUNCEMENT_HEALTHISSUE_GET: `${prefix} serviceannouncement healthissue get`,
|
|
20
21
|
SERVICEANNOUNCEMENT_HEALTH_GET: `${prefix} serviceannouncement health get`,
|
|
@@ -33,6 +33,10 @@ m365 entra roledefinition add [options]
|
|
|
33
33
|
|
|
34
34
|
<Global />
|
|
35
35
|
|
|
36
|
+
## Remarks
|
|
37
|
+
|
|
38
|
+
Use the `m365 entra rolepermission list --resourceNamespace microsoft.directory` command to get a list of available resource actions.
|
|
39
|
+
|
|
36
40
|
## Examples
|
|
37
41
|
|
|
38
42
|
Create a custom Microsoft Entra ID role
|
|
@@ -37,6 +37,10 @@ m365 entra roledefinition set [options]
|
|
|
37
37
|
|
|
38
38
|
<Global />
|
|
39
39
|
|
|
40
|
+
## Remarks
|
|
41
|
+
|
|
42
|
+
Use the `m365 entra rolepermission list --resourceNamespace microsoft.directory` command to get a list of available resource actions.
|
|
43
|
+
|
|
40
44
|
## Examples
|
|
41
45
|
|
|
42
46
|
Update a custom Microsoft Entra ID role specified by the id
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
import Global from '/docs/cmd/_global.mdx';
|
|
2
|
+
import Tabs from '@theme/Tabs';
|
|
3
|
+
import TabItem from '@theme/TabItem';
|
|
4
|
+
|
|
5
|
+
# entra rolepermission list
|
|
6
|
+
|
|
7
|
+
Lists all Microsoft Entra ID role permissions
|
|
8
|
+
|
|
9
|
+
## Usage
|
|
10
|
+
|
|
11
|
+
```sh
|
|
12
|
+
m365 entra rolepermission list [options]
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Options
|
|
16
|
+
|
|
17
|
+
```md definition-list
|
|
18
|
+
`-n, --resourceNamespace [resourceNamespace]`
|
|
19
|
+
: The namespace of the resource for which to retrieve role permissions.
|
|
20
|
+
|
|
21
|
+
`-p, --privileged`
|
|
22
|
+
: Retrieve only sensitive role permissions.
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
<Global />
|
|
26
|
+
|
|
27
|
+
## Remarks
|
|
28
|
+
|
|
29
|
+
:::warning
|
|
30
|
+
|
|
31
|
+
The command is based on an API that is currently in preview and is subject to change once the API reached general availability.
|
|
32
|
+
|
|
33
|
+
:::
|
|
34
|
+
|
|
35
|
+
## Examples
|
|
36
|
+
|
|
37
|
+
Get a list of role permissions
|
|
38
|
+
|
|
39
|
+
```sh
|
|
40
|
+
m365 entra rolepermission list --resourceNamespace 'microsoft.directory'
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
Get a list of sensitive role permissions
|
|
44
|
+
|
|
45
|
+
```sh
|
|
46
|
+
m365 entra rolepermission list --resourceNamespace 'microsoft.directory' --privileged
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## Response
|
|
50
|
+
|
|
51
|
+
<Tabs>
|
|
52
|
+
<TabItem value="JSON">
|
|
53
|
+
|
|
54
|
+
```json
|
|
55
|
+
[
|
|
56
|
+
{
|
|
57
|
+
"actionVerb": null,
|
|
58
|
+
"description": "Create and delete access reviews, and read and update all properties of access reviews in Microsoft Entra ID",
|
|
59
|
+
"id": "microsoft.directory-accessReviews-allProperties-allTasks",
|
|
60
|
+
"isPrivileged": false,
|
|
61
|
+
"name": "microsoft.directory/accessReviews/allProperties/allTasks",
|
|
62
|
+
"resourceScopeId": null
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"actionVerb": "GET",
|
|
66
|
+
"description": "Read all properties of access reviews",
|
|
67
|
+
"id": "microsoft.directory-accessReviews-allProperties-read-get",
|
|
68
|
+
"isPrivileged": false,
|
|
69
|
+
"name": "microsoft.directory/accessReviews/allProperties/read",
|
|
70
|
+
"resourceScopeId": null
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
"actionVerb": null,
|
|
74
|
+
"description": "Manage access reviews of application role assignments in Microsoft Entra ID",
|
|
75
|
+
"id": "microsoft.directory-accessReviews-definitions.applications-allProperties-allTasks",
|
|
76
|
+
"isPrivileged": false,
|
|
77
|
+
"name": "microsoft.directory/accessReviews/definitions.applications/allProperties/allTasks",
|
|
78
|
+
"resourceScopeId": null
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
"actionVerb": "GET",
|
|
82
|
+
"description": "Read all properties of access reviews of application role assignments in Microsoft Entra ID",
|
|
83
|
+
"id": "microsoft.directory-accessReviews-definitions.applications-allProperties-read-get",
|
|
84
|
+
"isPrivileged": false,
|
|
85
|
+
"name": "microsoft.directory/accessReviews/definitions.applications/allProperties/read",
|
|
86
|
+
"resourceScopeId": null
|
|
87
|
+
}
|
|
88
|
+
]
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
</TabItem>
|
|
92
|
+
<TabItem value="Text">
|
|
93
|
+
|
|
94
|
+
```text
|
|
95
|
+
id name actionVerb isPrivileged
|
|
96
|
+
-------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------- ---------- ------------
|
|
97
|
+
microsoft.directory-accessReviews-allProperties-allTasks microsoft.directory/accessReviews/allProperties/allTasks null false
|
|
98
|
+
microsoft.directory-accessReviews-allProperties-read-get microsoft.directory/accessReviews/allProperties/read GET false
|
|
99
|
+
microsoft.directory-accessReviews-definitions.applications-allProperties-allTasks microsoft.directory/accessReviews/definitions.applications/allProperties/allTasks null false
|
|
100
|
+
microsoft.directory-accessReviews-definitions.applications-allProperties-read-get microsoft.directory/accessReviews/definitions.applications/allProperties/read GET false
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
</TabItem>
|
|
104
|
+
<TabItem value="CSV">
|
|
105
|
+
|
|
106
|
+
```csv
|
|
107
|
+
actionVerb,description,id,isPrivileged,name,resourceScopeId
|
|
108
|
+
,"Create and delete access reviews, and read and update all properties of access reviews in Microsoft Entra ID",microsoft.directory-accessReviews-allProperties-allTasks,0,microsoft.directory/accessReviews/allProperties/allTasks,
|
|
109
|
+
GET,Read all properties of access reviews,microsoft.directory-accessReviews-allProperties-read-get,0,microsoft.directory/accessReviews/allProperties/read,
|
|
110
|
+
,Manage access reviews of application role assignments in Microsoft Entra ID,microsoft.directory-accessReviews-definitions.applications-allProperties-allTasks,0,microsoft.directory/accessReviews/definitions.applications/allProperties/allTasks,
|
|
111
|
+
GET,Read all properties of access reviews of application role assignments in Microsoft Entra ID,microsoft.directory-accessReviews-definitions.applications-allProperties-read-get,0,microsoft.directory/accessReviews/definitions.applications/allProperties/read,
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
</TabItem>
|
|
115
|
+
<TabItem value="Markdown">
|
|
116
|
+
|
|
117
|
+
```md
|
|
118
|
+
# entra rolepermission list --resourceNamespace "microsoft.directory"
|
|
119
|
+
|
|
120
|
+
Date: 1/16/2025
|
|
121
|
+
|
|
122
|
+
## microsoft.directory/accessReviews/allProperties/allTasks (microsoft.directory-accessReviews-allProperties-allTasks)
|
|
123
|
+
|
|
124
|
+
Property | Value
|
|
125
|
+
---------|-------
|
|
126
|
+
description | Create and delete access reviews, and read and update all properties of access reviews in Microsoft Entra ID
|
|
127
|
+
id | microsoft.directory-accessReviews-allProperties-allTasks
|
|
128
|
+
isPrivileged | false
|
|
129
|
+
name | microsoft.directory/accessReviews/allProperties/allTasks
|
|
130
|
+
|
|
131
|
+
## microsoft.directory/accessReviews/allProperties/read (microsoft.directory-accessReviews-allProperties-read-get)
|
|
132
|
+
|
|
133
|
+
Property | Value
|
|
134
|
+
---------|-------
|
|
135
|
+
actionVerb | GET
|
|
136
|
+
description | Read all properties of access reviews
|
|
137
|
+
id | microsoft.directory-accessReviews-allProperties-read-get
|
|
138
|
+
isPrivileged | false
|
|
139
|
+
name | microsoft.directory/accessReviews/allProperties/read
|
|
140
|
+
|
|
141
|
+
## microsoft.directory/accessReviews/definitions.applications/allProperties/allTasks (microsoft.directory-accessReviews-definitions.applications-allProperties-allTasks)
|
|
142
|
+
|
|
143
|
+
Property | Value
|
|
144
|
+
---------|-------
|
|
145
|
+
description | Manage access reviews of application role assignments in Microsoft Entra ID
|
|
146
|
+
id | microsoft.directory-accessReviews-definitions.applications-allProperties-allTasks
|
|
147
|
+
isPrivileged | false
|
|
148
|
+
name | microsoft.directory/accessReviews/definitions.applications/allProperties/allTasks
|
|
149
|
+
|
|
150
|
+
## microsoft.directory/accessReviews/definitions.applications/allProperties/read (microsoft.directory-accessReviews-definitions.applications-allProperties-read-get)
|
|
151
|
+
|
|
152
|
+
Property | Value
|
|
153
|
+
---------|-------
|
|
154
|
+
actionVerb | GET
|
|
155
|
+
description | Read all properties of access reviews of application role assignments in Microsoft Entra ID
|
|
156
|
+
id | microsoft.directory-accessReviews-definitions.applications-allProperties-read-get
|
|
157
|
+
isPrivileged | false
|
|
158
|
+
name | microsoft.directory/accessReviews/definitions.applications/allProperties/read
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
</TabItem>
|
|
162
|
+
</Tabs>
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import Global from '/docs/cmd/_global.mdx';
|
|
2
|
+
|
|
3
|
+
# tenant report settings set
|
|
4
|
+
|
|
5
|
+
Update tenant-level settings for Microsoft 365 reports
|
|
6
|
+
|
|
7
|
+
## Usage
|
|
8
|
+
|
|
9
|
+
```sh
|
|
10
|
+
m365 tenant report settings set [options]
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Options
|
|
14
|
+
|
|
15
|
+
```md definition-list
|
|
16
|
+
`-d, --displayConcealedNames <displayConcealedNames>`
|
|
17
|
+
: Determines whether all reports conceal user information such as usernames, groups, and sites. If false, all reports show identifiable information.
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
<Global />
|
|
21
|
+
|
|
22
|
+
## Examples
|
|
23
|
+
|
|
24
|
+
Configure the tenant to display concealed user information in Microsoft 365 reports
|
|
25
|
+
|
|
26
|
+
```sh
|
|
27
|
+
m365 tenant report settings set --displayConcealedNames true
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## Response
|
|
31
|
+
|
|
32
|
+
The command won't return a response on success
|
package/package.json
CHANGED