@pnp/cli-microsoft365 10.1.0 → 10.2.0-beta.382f561

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.
@@ -67,7 +67,14 @@ class EntraAppPermissionRemoveCommand extends GraphCommand {
67
67
  await request.patch(removePermissionRequestOptions);
68
68
  if (args.options.revokeAdminConsent) {
69
69
  const appServicePrincipal = servicePrincipals.find(sp => sp.appId === appObject.appId);
70
- await this.revokeAdminConsent(appServicePrincipal, appPermissions, logger);
70
+ if (appServicePrincipal) {
71
+ await this.revokeAdminConsent(appServicePrincipal, appPermissions, logger);
72
+ }
73
+ else {
74
+ if (this.debug) {
75
+ await logger.logToStderr(`No service principal found for the appId: ${appObject.appId}. Skipping revoking admin consent.`);
76
+ }
77
+ }
71
78
  }
72
79
  }
73
80
  catch (err) {
@@ -0,0 +1,58 @@
1
+ import GraphCommand from '../../../base/GraphCommand.js';
2
+ import commands from '../../commands.js';
3
+ import { z } from 'zod';
4
+ import { globalOptionsZod } from '../../../../Command.js';
5
+ import { zod } from '../../../../utils/zod.js';
6
+ import { roleDefinition } from '../../../../utils/roleDefinition.js';
7
+ import { validation } from '../../../../utils/validation.js';
8
+ const options = globalOptionsZod
9
+ .extend({
10
+ id: zod.alias('i', z.string().optional()),
11
+ displayName: zod.alias('n', z.string().optional()),
12
+ properties: zod.alias('p', z.string().optional())
13
+ })
14
+ .strict();
15
+ class EntraRoleDefinitionGetCommand extends GraphCommand {
16
+ get name() {
17
+ return commands.ROLEDEFINITION_GET;
18
+ }
19
+ get description() {
20
+ return 'Gets a specific Microsoft Entra ID role definition';
21
+ }
22
+ get schema() {
23
+ return options;
24
+ }
25
+ getRefinedSchema(schema) {
26
+ return schema
27
+ .refine(options => !options.id !== !options.displayName, {
28
+ message: 'Specify either id or displayName, but not both'
29
+ })
30
+ .refine(options => options.id || options.displayName, {
31
+ message: 'Specify either id or displayName'
32
+ })
33
+ .refine(options => (!options.id && !options.displayName) || options.displayName || (options.id && validation.isValidGuid(options.id)), options => ({
34
+ message: `The '${options.id}' must be a valid GUID`,
35
+ path: ['id']
36
+ }));
37
+ }
38
+ async commandAction(logger, args) {
39
+ if (this.verbose) {
40
+ await logger.logToStderr('Getting Microsoft Entra ID role definition...');
41
+ }
42
+ try {
43
+ let result;
44
+ if (args.options.id) {
45
+ result = await roleDefinition.getRoleDefinitionById(args.options.id, args.options.properties);
46
+ }
47
+ else {
48
+ result = await roleDefinition.getRoleDefinitionByDisplayName(args.options.displayName, args.options.properties);
49
+ }
50
+ await logger.log(result);
51
+ }
52
+ catch (err) {
53
+ this.handleRejectedODataJsonPromise(err);
54
+ }
55
+ }
56
+ }
57
+ export default new EntraRoleDefinitionGetCommand();
58
+ //# sourceMappingURL=roledefinition-get.js.map
@@ -0,0 +1,50 @@
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
+ properties: zod.alias('p', z.string().optional()),
10
+ filter: zod.alias('f', z.string().optional())
11
+ })
12
+ .strict();
13
+ class EntraRoleDefinitionListCommand extends GraphCommand {
14
+ get name() {
15
+ return commands.ROLEDEFINITION_LIST;
16
+ }
17
+ get description() {
18
+ return 'Lists all Microsoft Entra ID role definitions';
19
+ }
20
+ defaultProperties() {
21
+ return ['id', 'displayName', 'isBuiltIn', 'isEnabled'];
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 definitions...');
29
+ }
30
+ try {
31
+ const queryParameters = [];
32
+ if (args.options.properties) {
33
+ queryParameters.push(`$select=${args.options.properties}`);
34
+ }
35
+ if (args.options.filter) {
36
+ queryParameters.push(`$filter=${args.options.filter}`);
37
+ }
38
+ const queryString = queryParameters.length > 0
39
+ ? `?${queryParameters.join('&')}`
40
+ : '';
41
+ const results = await odata.getAllItems(`${this.resource}/v1.0/roleManagement/directory/roleDefinitions${queryString}`);
42
+ await logger.log(results);
43
+ }
44
+ catch (err) {
45
+ this.handleRejectedODataJsonPromise(err);
46
+ }
47
+ }
48
+ }
49
+ export default new EntraRoleDefinitionListCommand();
50
+ //# sourceMappingURL=roledefinition-list.js.map
@@ -0,0 +1,74 @@
1
+ import GraphCommand from '../../../base/GraphCommand.js';
2
+ import commands from '../../commands.js';
3
+ import { z } from 'zod';
4
+ import { globalOptionsZod } from '../../../../Command.js';
5
+ import { zod } from '../../../../utils/zod.js';
6
+ import { roleDefinition } from '../../../../utils/roleDefinition.js';
7
+ import { validation } from '../../../../utils/validation.js';
8
+ import request from '../../../../request.js';
9
+ import { cli } from '../../../../cli/cli.js';
10
+ const options = globalOptionsZod
11
+ .extend({
12
+ id: zod.alias('i', z.string().optional()),
13
+ displayName: zod.alias('n', z.string().optional()),
14
+ force: zod.alias('f', z.boolean().optional())
15
+ })
16
+ .strict();
17
+ class EntraRoleDefinitionRemoveCommand extends GraphCommand {
18
+ get name() {
19
+ return commands.ROLEDEFINITION_REMOVE;
20
+ }
21
+ get description() {
22
+ return 'Removes a specific Microsoft Entra ID role definition';
23
+ }
24
+ get schema() {
25
+ return options;
26
+ }
27
+ getRefinedSchema(schema) {
28
+ return schema
29
+ .refine(options => !options.id !== !options.displayName, {
30
+ message: 'Specify either id or displayName, but not both'
31
+ })
32
+ .refine(options => options.id || options.displayName, {
33
+ message: 'Specify either id or displayName'
34
+ })
35
+ .refine(options => (!options.id && !options.displayName) || options.displayName || (options.id && validation.isValidGuid(options.id)), options => ({
36
+ message: `The '${options.id}' must be a valid GUID`,
37
+ path: ['id']
38
+ }));
39
+ }
40
+ async commandAction(logger, args) {
41
+ const removeRoleDefinition = async () => {
42
+ try {
43
+ let roleDefinitionId = args.options.id;
44
+ if (args.options.displayName) {
45
+ roleDefinitionId = (await roleDefinition.getRoleDefinitionByDisplayName(args.options.displayName, 'id')).id;
46
+ }
47
+ if (args.options.verbose) {
48
+ await logger.logToStderr(`Removing role definition with ID ${roleDefinitionId}...`);
49
+ }
50
+ const requestOptions = {
51
+ url: `${this.resource}/v1.0/roleManagement/directory/roleDefinitions/${roleDefinitionId}`,
52
+ headers: {
53
+ accept: 'application/json;odata.metadata=none'
54
+ }
55
+ };
56
+ await request.delete(requestOptions);
57
+ }
58
+ catch (err) {
59
+ this.handleRejectedODataJsonPromise(err);
60
+ }
61
+ };
62
+ if (args.options.force) {
63
+ await removeRoleDefinition();
64
+ }
65
+ else {
66
+ const result = await cli.promptForConfirmation({ message: `Are you sure you want to remove role definition '${args.options.id || args.options.displayName}'?` });
67
+ if (result) {
68
+ await removeRoleDefinition();
69
+ }
70
+ }
71
+ }
72
+ }
73
+ export default new EntraRoleDefinitionRemoveCommand();
74
+ //# sourceMappingURL=roledefinition-remove.js.map
@@ -87,6 +87,9 @@ export default {
87
87
  PIM_ROLE_ASSIGNMENT_ELIGIBILITY_LIST: `${prefix} pim role assignment eligibility list`,
88
88
  PIM_ROLE_REQUEST_LIST: `${prefix} pim role request list`,
89
89
  POLICY_LIST: `${prefix} policy list`,
90
+ ROLEDEFINITION_LIST: `${prefix} roledefinition list`,
91
+ ROLEDEFINITION_GET: `${prefix} roledefinition get`,
92
+ ROLEDEFINITION_REMOVE: `${prefix} roledefinition remove`,
90
93
  SITECLASSIFICATION_DISABLE: `${prefix} siteclassification disable`,
91
94
  SITECLASSIFICATION_ENABLE: `${prefix} siteclassification enable`,
92
95
  SITECLASSIFICATION_GET: `${prefix} siteclassification get`,
@@ -0,0 +1,32 @@
1
+ import request from '../../../../request.js';
2
+ import GraphCommand from '../../../base/GraphCommand.js';
3
+ import commands from '../../commands.js';
4
+ class TenantPeoplePronounsGetCommand extends GraphCommand {
5
+ get name() {
6
+ return commands.PEOPLE_PRONOUNS_GET;
7
+ }
8
+ get description() {
9
+ return 'Retrieves information about pronouns settings for an organization';
10
+ }
11
+ async commandAction(logger) {
12
+ try {
13
+ if (this.verbose) {
14
+ await logger.logToStderr('Retrieving information about pronouns settings...');
15
+ }
16
+ const requestOptions = {
17
+ url: `${this.resource}/v1.0/admin/people/pronouns`,
18
+ headers: {
19
+ accept: 'application/json;odata.metadata=none'
20
+ },
21
+ responseType: 'json'
22
+ };
23
+ const pronouns = await request.get(requestOptions);
24
+ await logger.log(pronouns);
25
+ }
26
+ catch (err) {
27
+ this.handleRejectedODataJsonPromise(err);
28
+ }
29
+ }
30
+ }
31
+ export default new TenantPeoplePronounsGetCommand();
32
+ //# sourceMappingURL=people-pronouns-get.js.map
@@ -7,6 +7,7 @@ export default {
7
7
  PEOPLE_PROFILECARDPROPERTY_LIST: `${prefix} people profilecardproperty list`,
8
8
  PEOPLE_PROFILECARDPROPERTY_REMOVE: `${prefix} people profilecardproperty remove`,
9
9
  PEOPLE_PROFILECARDPROPERTY_SET: `${prefix} people profilecardproperty set`,
10
+ PEOPLE_PRONOUNS_GET: `${prefix} people pronouns get`,
10
11
  REPORT_ACTIVEUSERCOUNTS: `${prefix} report activeusercounts`,
11
12
  REPORT_ACTIVEUSERDETAIL: `${prefix} report activeuserdetail`,
12
13
  REPORT_OFFICE365ACTIVATIONCOUNTS: `${prefix} report office365activationcounts`,
@@ -1,15 +1,21 @@
1
1
  import { cli } from '../cli/cli.js';
2
2
  import { formatting } from './formatting.js';
3
3
  import { odata } from './odata.js';
4
+ import request from '../request.js';
4
5
  export const roleDefinition = {
5
6
  /**
6
- * Get a directory (Microsoft Entra) role
7
+ * Get an Entra ID (directory) role by its name
7
8
  * @param displayName Role definition display name.
9
+ * @param properties Comma-separated list of properties to include in the response.
8
10
  * @returns The role definition.
9
11
  * @throws Error when role definition was not found.
10
12
  */
11
- async getRoleDefinitionByDisplayName(displayName) {
12
- const roleDefinitions = await odata.getAllItems(`https://graph.microsoft.com/v1.0/roleManagement/directory/roleDefinitions?$filter=displayName eq '${formatting.encodeQueryParameter(displayName)}'`);
13
+ async getRoleDefinitionByDisplayName(displayName, properties) {
14
+ let url = `https://graph.microsoft.com/v1.0/roleManagement/directory/roleDefinitions?$filter=displayName eq '${formatting.encodeQueryParameter(displayName)}'`;
15
+ if (properties) {
16
+ url += `&$select=${properties}`;
17
+ }
18
+ const roleDefinitions = await odata.getAllItems(url);
13
19
  if (roleDefinitions.length === 0) {
14
20
  throw `The specified role definition '${displayName}' does not exist.`;
15
21
  }
@@ -19,6 +25,27 @@ export const roleDefinition = {
19
25
  return selectedRoleDefinition;
20
26
  }
21
27
  return roleDefinitions[0];
28
+ },
29
+ /**
30
+ * Get an Entra ID (directory) role by its id
31
+ * @param id Role definition id.
32
+ * @param properties Comma-separated list of properties to include in the response.
33
+ * @returns The role definition.
34
+ * @throws Error when role definition was not found.
35
+ */
36
+ async getRoleDefinitionById(id, properties) {
37
+ let url = `https://graph.microsoft.com/v1.0/roleManagement/directory/roleDefinitions/${id}`;
38
+ if (properties) {
39
+ url += `?$select=${properties}`;
40
+ }
41
+ const requestOptions = {
42
+ url: url,
43
+ headers: {
44
+ accept: 'application/json;odata.metadata=none'
45
+ },
46
+ responseType: 'json'
47
+ };
48
+ return await request.get(requestOptions);
22
49
  }
23
50
  };
24
51
  //# sourceMappingURL=roleDefinition.js.map
@@ -0,0 +1,150 @@
1
+ import Global from '/docs/cmd/_global.mdx';
2
+ import Tabs from '@theme/Tabs';
3
+ import TabItem from '@theme/TabItem';
4
+
5
+ # entra roledefinition get
6
+
7
+ Gets a specific Microsoft Entra ID role definition.
8
+
9
+ ## Usage
10
+
11
+ ```sh
12
+ m365 entra roledefinition get [options]
13
+ ```
14
+
15
+ ## Options
16
+
17
+ ```md definition-list
18
+ `-i, --id [id]`
19
+ : The id of the role definition. Specify either `id` or `displayName`, but not both.
20
+
21
+ `-n, --displayName [displayName]`
22
+ : The display name of the role definition. Specify either `id` or `displayName`, but not both.
23
+
24
+ `-p, --properties [properties]`
25
+ : Comma-separated list of properties to retrieve.
26
+ ```
27
+
28
+ <Global />
29
+
30
+ ## Examples
31
+
32
+ Get info about a role specified by the id
33
+
34
+ ```sh
35
+ m365 entra roledefinition get --id 62e90394-69f5-4237-9190-012177145e10
36
+ ```
37
+
38
+ Get limited info about a role specified by the display name
39
+
40
+ ```sh
41
+ m365 entra roledefinition get --displayName 'Custom SharePoint Role' --properties 'description,isEnabled'
42
+ ```
43
+
44
+ ## Response
45
+
46
+ ### Standard response
47
+
48
+ <Tabs>
49
+ <TabItem value="JSON">
50
+
51
+ ```json
52
+ {
53
+ "id": "f28a1f50-f6e7-4571-818b-6a12f2af6b6c",
54
+ "description": "Can manage all aspects of the SharePoint service.",
55
+ "displayName": "SharePoint Administrator",
56
+ "isBuiltIn": true,
57
+ "isEnabled": true,
58
+ "resourceScopes": [
59
+ "/"
60
+ ],
61
+ "templateId": "f28a1f50-f6e7-4571-818b-6a12f2af6b6c",
62
+ "version": "1",
63
+ "rolePermissions": [
64
+ {
65
+ "allowedResourceActions": [
66
+ "microsoft.azure.serviceHealth/allEntities/allTasks",
67
+ "microsoft.azure.supportTickets/allEntities/allTasks",
68
+ "microsoft.backup/oneDriveForBusinessProtectionPolicies/allProperties/allTasks",
69
+ "microsoft.backup/oneDriveForBusinessRestoreSessions/allProperties/allTasks",
70
+ "microsoft.backup/restorePoints/sites/allProperties/allTasks",
71
+ "microsoft.backup/restorePoints/userDrives/allProperties/allTasks",
72
+ "microsoft.backup/sharePointProtectionPolicies/allProperties/allTasks",
73
+ "microsoft.backup/sharePointRestoreSessions/allProperties/allTasks",
74
+ "microsoft.backup/siteProtectionUnits/allProperties/allTasks",
75
+ "microsoft.backup/siteRestoreArtifacts/allProperties/allTasks",
76
+ "microsoft.backup/userDriveProtectionUnits/allProperties/allTasks",
77
+ "microsoft.backup/userDriveRestoreArtifacts/allProperties/allTasks",
78
+ "microsoft.directory/groups/hiddenMembers/read",
79
+ "microsoft.directory/groups.unified/basic/update",
80
+ "microsoft.directory/groups.unified/create",
81
+ "microsoft.directory/groups.unified/delete",
82
+ "microsoft.directory/groups.unified/members/update",
83
+ "microsoft.directory/groups.unified/owners/update",
84
+ "microsoft.directory/groups.unified/restore",
85
+ "microsoft.office365.migrations/allEntities/allProperties/allTasks",
86
+ "microsoft.office365.network/performance/allProperties/read",
87
+ "microsoft.office365.serviceHealth/allEntities/allTasks",
88
+ "microsoft.office365.sharePoint/allEntities/allTasks",
89
+ "microsoft.office365.supportTickets/allEntities/allTasks",
90
+ "microsoft.office365.usageReports/allEntities/allProperties/read",
91
+ "microsoft.office365.webPortal/allEntities/standard/read"
92
+ ],
93
+ "condition": null
94
+ }
95
+ ],
96
+ "inheritsPermissionsFrom": [
97
+ {
98
+ "id": "88d8e3e3-8f55-4a1e-953a-9b9898b8876b"
99
+ }
100
+ ]
101
+ }
102
+ ```
103
+
104
+ </TabItem>
105
+ <TabItem value="Text">
106
+
107
+ ```text
108
+ description : Can manage all aspects of the SharePoint service.
109
+ displayName : SharePoint Administrator
110
+ id : f28a1f50-f6e7-4571-818b-6a12f2af6b6c
111
+ inheritsPermissionsFrom: [{"id":"88d8e3e3-8f55-4a1e-953a-9b9898b8876b"}]
112
+ isBuiltIn : true
113
+ isEnabled : true
114
+ resourceScopes : ["/"]
115
+ rolePermissions : [{"allowedResourceActions":["microsoft.azure.serviceHealth/allEntities/allTasks","microsoft.azure.supportTickets/allEntities/allTasks","microsoft.office365.webPortal/allEntities/standard/read"],"condition":null}]
116
+ templateId : f28a1f50-f6e7-4571-818b-6a12f2af6b6c
117
+ version : 1
118
+ ```
119
+
120
+ </TabItem>
121
+ <TabItem value="CSV">
122
+
123
+ ```csv
124
+ id,description,displayName,isBuiltIn,isEnabled,templateId,version
125
+ f28a1f50-f6e7-4571-818b-6a12f2af6b6c,Can manage all aspects of the SharePoint service.,SharePoint Administrator,1,1,f28a1f50-f6e7-4571-818b-6a12f2af6b6c,1
126
+ ```
127
+
128
+ </TabItem>
129
+ <TabItem value="Markdown">
130
+
131
+ ```md
132
+ # entra roledefinition get --id "f28a1f50-f6e7-4571-818b-6a12f2af6b6c"
133
+
134
+ Date: 11/15/2024
135
+
136
+ ## SharePoint Administrator (f28a1f50-f6e7-4571-818b-6a12f2af6b6c)
137
+
138
+ Property | Value
139
+ ---------|-------
140
+ id | f28a1f50-f6e7-4571-818b-6a12f2af6b6c
141
+ description | Can manage all aspects of the SharePoint service.
142
+ displayName | SharePoint Administrator
143
+ isBuiltIn | true
144
+ isEnabled | true
145
+ templateId | f28a1f50-f6e7-4571-818b-6a12f2af6b6c
146
+ version | 1
147
+ ```
148
+
149
+ </TabItem>
150
+ </Tabs>
@@ -0,0 +1,148 @@
1
+ import Global from '/docs/cmd/_global.mdx';
2
+ import Tabs from '@theme/Tabs';
3
+ import TabItem from '@theme/TabItem';
4
+
5
+ # entra roledefinition list
6
+
7
+ Lists all Microsoft Entra ID role definitions.
8
+
9
+ ## Usage
10
+
11
+ ```sh
12
+ m365 entra roledefinition list [options]
13
+ ```
14
+
15
+ ## Options
16
+
17
+ ```md definition-list
18
+ `-p, --properties [properties]`
19
+ : Comma-separated list of properties to retrieve.
20
+
21
+ `-f, --filter [filter]`
22
+ : OData filter to apply when retrieving the role definitions.
23
+ ```
24
+
25
+ <Global />
26
+
27
+ ## Examples
28
+
29
+ Retrieve all Microsoft Entra ID role definitions
30
+
31
+ ```sh
32
+ m365 entra roledefinition list
33
+ ```
34
+
35
+ Retrieve only the names of the role definitions
36
+
37
+ ```sh
38
+ m365 entra roledefinition list --properties 'displayName'
39
+ ```
40
+
41
+ Retrieve only custom role definitions
42
+
43
+ ```sh
44
+ m365 entra roledefinition list --filter 'isBuiltIn eq false'
45
+ ```
46
+
47
+ ## Response
48
+
49
+ ### Standard response
50
+
51
+ <Tabs>
52
+ <TabItem value="JSON">
53
+
54
+ ```json
55
+ [
56
+ {
57
+ "id": "f28a1f50-f6e7-4571-818b-6a12f2af6b6c",
58
+ "description": "Can manage all aspects of the SharePoint service.",
59
+ "displayName": "SharePoint Administrator",
60
+ "isBuiltIn": true,
61
+ "isEnabled": true,
62
+ "resourceScopes": [
63
+ "/"
64
+ ],
65
+ "templateId": "f28a1f50-f6e7-4571-818b-6a12f2af6b6c",
66
+ "version": "1",
67
+ "rolePermissions": [
68
+ {
69
+ "allowedResourceActions": [
70
+ "microsoft.azure.serviceHealth/allEntities/allTasks",
71
+ "microsoft.azure.supportTickets/allEntities/allTasks",
72
+ "microsoft.backup/oneDriveForBusinessProtectionPolicies/allProperties/allTasks",
73
+ "microsoft.backup/oneDriveForBusinessRestoreSessions/allProperties/allTasks",
74
+ "microsoft.backup/restorePoints/sites/allProperties/allTasks",
75
+ "microsoft.backup/restorePoints/userDrives/allProperties/allTasks",
76
+ "microsoft.backup/sharePointProtectionPolicies/allProperties/allTasks",
77
+ "microsoft.backup/sharePointRestoreSessions/allProperties/allTasks",
78
+ "microsoft.backup/siteProtectionUnits/allProperties/allTasks",
79
+ "microsoft.backup/siteRestoreArtifacts/allProperties/allTasks",
80
+ "microsoft.backup/userDriveProtectionUnits/allProperties/allTasks",
81
+ "microsoft.backup/userDriveRestoreArtifacts/allProperties/allTasks",
82
+ "microsoft.directory/groups/hiddenMembers/read",
83
+ "microsoft.directory/groups.unified/basic/update",
84
+ "microsoft.directory/groups.unified/create",
85
+ "microsoft.directory/groups.unified/delete",
86
+ "microsoft.directory/groups.unified/members/update",
87
+ "microsoft.directory/groups.unified/owners/update",
88
+ "microsoft.directory/groups.unified/restore",
89
+ "microsoft.office365.migrations/allEntities/allProperties/allTasks",
90
+ "microsoft.office365.network/performance/allProperties/read",
91
+ "microsoft.office365.serviceHealth/allEntities/allTasks",
92
+ "microsoft.office365.sharePoint/allEntities/allTasks",
93
+ "microsoft.office365.supportTickets/allEntities/allTasks",
94
+ "microsoft.office365.usageReports/allEntities/allProperties/read",
95
+ "microsoft.office365.webPortal/allEntities/standard/read"
96
+ ],
97
+ "condition": null
98
+ }
99
+ ],
100
+ "inheritsPermissionsFrom": [
101
+ {
102
+ "id": "88d8e3e3-8f55-4a1e-953a-9b9898b8876b"
103
+ }
104
+ ]
105
+ }
106
+ ]
107
+ ```
108
+
109
+ </TabItem>
110
+ <TabItem value="Text">
111
+
112
+ ```text
113
+ id displayName isBuiltIn isEnabled
114
+ ------------------------------------ --------------------------------------------- --------- ---------
115
+ f28a1f50-f6e7-4571-818b-6a12f2af6b6c SharePoint Administrator true true
116
+ ```
117
+
118
+ </TabItem>
119
+ <TabItem value="CSV">
120
+
121
+ ```csv
122
+ id,description,displayName,isBuiltIn,isEnabled,templateId,version
123
+ f28a1f50-f6e7-4571-818b-6a12f2af6b6c,Can manage all aspects of the SharePoint service.,SharePoint Administrator,1,1,f28a1f50-f6e7-4571-818b-6a12f2af6b6c,1
124
+ ```
125
+
126
+ </TabItem>
127
+ <TabItem value="Markdown">
128
+
129
+ ```md
130
+ # entra roledefinition list
131
+
132
+ Date: 11/7/2024
133
+
134
+ ## SharePoint Administrator (f28a1f50-f6e7-4571-818b-6a12f2af6b6c)
135
+
136
+ Property | Value
137
+ ---------|-------
138
+ id | f28a1f50-f6e7-4571-818b-6a12f2af6b6c
139
+ description | Can manage all aspects of the SharePoint service.
140
+ displayName | SharePoint Administrator
141
+ isBuiltIn | true
142
+ isEnabled | true
143
+ templateId | f28a1f50-f6e7-4571-818b-6a12f2af6b6c
144
+ version | 1
145
+ ```
146
+
147
+ </TabItem>
148
+ </Tabs>
@@ -0,0 +1,52 @@
1
+ import Global from '/docs/cmd/_global.mdx';
2
+
3
+ # entra roledefinition remove
4
+
5
+ Removes a custom Microsoft Entra role definition
6
+
7
+ ## Usage
8
+
9
+ ```sh
10
+ m365 entra roledefinition remove [options]
11
+ ```
12
+
13
+ ## Options
14
+
15
+ ```md definition-list
16
+ `-i, --id [id]`
17
+ : The id of the role definition. Specify either `id` or `displayName`, but not both.
18
+
19
+ `-n, --displayName [displayName]`
20
+ : The name of the role definition. Specify either `id` or `displayName`, but not both.
21
+
22
+ `-f, --force`
23
+ : Don't prompt for confirmation.
24
+ ```
25
+
26
+ <Global />
27
+
28
+ ## Remarks
29
+
30
+ :::info
31
+
32
+ When the role definition is removed, all the associated role assignments are deleted.
33
+
34
+ :::
35
+
36
+ ## Examples
37
+
38
+ Remove a role definition specified by id without prompting
39
+
40
+ ```sh
41
+ m365 entra roledefinition remove --id 0bed8b86-5026-4a93-ac7d-56750cc099f1 --force
42
+ ```
43
+
44
+ Remove a role definition specified by name and prompt for confirmation
45
+
46
+ ```sh
47
+ m365 entra roledefinition remove --displayName 'Custom Role'
48
+ ```
49
+
50
+ ## Response
51
+
52
+ The command won't return a response on success