@pnp/cli-microsoft365 10.3.0-beta.ea113b7 → 10.3.0-beta.f5e6f85
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/.eslintrc.cjs +1 -0
- package/allCommands.json +1 -1
- package/allCommandsFull.json +1 -1
- package/dist/config.js +1 -0
- package/dist/m365/entra/commands/roledefinition/roledefinition-add.js +58 -0
- package/dist/m365/entra/commands/roledefinition/roledefinition-set.js +84 -0
- package/dist/m365/entra/commands.js +2 -0
- package/dist/m365/outlook/commands/mailbox/mailbox-settings-set.js +163 -0
- package/dist/m365/outlook/commands.js +1 -0
- package/dist/m365/tenant/commands/people/people-pronouns-set.js +46 -0
- package/dist/m365/tenant/commands.js +1 -0
- package/docs/docs/cmd/entra/roledefinition/roledefinition-add.mdx +127 -0
- package/docs/docs/cmd/entra/roledefinition/roledefinition-set.mdx +60 -0
- package/docs/docs/cmd/outlook/mailbox/mailbox-settings-set.mdx +166 -0
- package/docs/docs/cmd/tenant/people/people-pronouns-set.mdx +82 -0
- package/npm-shrinkwrap.json +54 -74
- package/package.json +9 -9
package/dist/config.js
CHANGED
|
@@ -25,6 +25,7 @@ export default {
|
|
|
25
25
|
'https://graph.microsoft.com/Mail.Read.Shared',
|
|
26
26
|
'https://graph.microsoft.com/Mail.ReadWrite',
|
|
27
27
|
'https://graph.microsoft.com/Mail.Send',
|
|
28
|
+
'https://graph.microsoft.com/MailboxSettings.ReadWrite',
|
|
28
29
|
'https://graph.microsoft.com/Notes.ReadWrite.All',
|
|
29
30
|
'https://graph.microsoft.com/OnlineMeetingArtifact.Read.All',
|
|
30
31
|
'https://graph.microsoft.com/OnlineMeetings.ReadWrite',
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { globalOptionsZod } from '../../../../Command.js';
|
|
3
|
+
import { zod } from '../../../../utils/zod.js';
|
|
4
|
+
import GraphCommand from '../../../base/GraphCommand.js';
|
|
5
|
+
import commands from '../../commands.js';
|
|
6
|
+
import request from '../../../../request.js';
|
|
7
|
+
const options = globalOptionsZod
|
|
8
|
+
.extend({
|
|
9
|
+
displayName: zod.alias('n', z.string()),
|
|
10
|
+
allowedResourceActions: zod.alias('a', z.string().transform((value) => value.split(',').map(String))),
|
|
11
|
+
description: zod.alias('d', z.string().optional()),
|
|
12
|
+
enabled: zod.alias('e', z.boolean().optional()),
|
|
13
|
+
version: zod.alias('v', z.string().optional())
|
|
14
|
+
})
|
|
15
|
+
.strict();
|
|
16
|
+
class EntraRoleDefinitionAddCommand extends GraphCommand {
|
|
17
|
+
get name() {
|
|
18
|
+
return commands.ROLEDEFINITION_ADD;
|
|
19
|
+
}
|
|
20
|
+
get description() {
|
|
21
|
+
return 'Creates a custom Microsoft Entra ID role definition';
|
|
22
|
+
}
|
|
23
|
+
get schema() {
|
|
24
|
+
return options;
|
|
25
|
+
}
|
|
26
|
+
async commandAction(logger, args) {
|
|
27
|
+
if (args.options.verbose) {
|
|
28
|
+
await logger.logToStderr(`Creating custom role definition with name ${args.options.displayName}...`);
|
|
29
|
+
}
|
|
30
|
+
const requestOptions = {
|
|
31
|
+
url: `${this.resource}/v1.0/roleManagement/directory/roleDefinitions`,
|
|
32
|
+
headers: {
|
|
33
|
+
accept: 'application/json;odata.metadata=none'
|
|
34
|
+
},
|
|
35
|
+
data: {
|
|
36
|
+
displayName: args.options.displayName,
|
|
37
|
+
rolePermissions: [
|
|
38
|
+
{
|
|
39
|
+
allowedResourceActions: args.options.allowedResourceActions
|
|
40
|
+
}
|
|
41
|
+
],
|
|
42
|
+
description: args.options.description,
|
|
43
|
+
isEnabled: args.options.enabled !== undefined ? args.options.enabled : true,
|
|
44
|
+
version: args.options.version
|
|
45
|
+
},
|
|
46
|
+
responseType: 'json'
|
|
47
|
+
};
|
|
48
|
+
try {
|
|
49
|
+
const result = await request.post(requestOptions);
|
|
50
|
+
await logger.log(result);
|
|
51
|
+
}
|
|
52
|
+
catch (err) {
|
|
53
|
+
this.handleRejectedODataJsonPromise(err);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
export default new EntraRoleDefinitionAddCommand();
|
|
58
|
+
//# sourceMappingURL=roledefinition-add.js.map
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { globalOptionsZod } from '../../../../Command.js';
|
|
3
|
+
import { zod } from '../../../../utils/zod.js';
|
|
4
|
+
import GraphCommand from '../../../base/GraphCommand.js';
|
|
5
|
+
import commands from '../../commands.js';
|
|
6
|
+
import request from '../../../../request.js';
|
|
7
|
+
import { roleDefinition } from '../../../../utils/roleDefinition.js';
|
|
8
|
+
import { validation } from '../../../../utils/validation.js';
|
|
9
|
+
const options = globalOptionsZod
|
|
10
|
+
.extend({
|
|
11
|
+
id: zod.alias('i', z.string().optional()),
|
|
12
|
+
displayName: zod.alias('n', z.string().optional()),
|
|
13
|
+
newDisplayName: z.string().optional(),
|
|
14
|
+
allowedResourceActions: zod.alias('a', z.string().optional()),
|
|
15
|
+
description: zod.alias('d', z.string().optional()),
|
|
16
|
+
enabled: zod.alias('e', z.boolean().optional()),
|
|
17
|
+
version: zod.alias('v', z.string().optional())
|
|
18
|
+
})
|
|
19
|
+
.strict();
|
|
20
|
+
class EntraRoleDefinitionSetCommand extends GraphCommand {
|
|
21
|
+
get name() {
|
|
22
|
+
return commands.ROLEDEFINITION_SET;
|
|
23
|
+
}
|
|
24
|
+
get description() {
|
|
25
|
+
return 'Updates a custom Microsoft Entra ID role definition';
|
|
26
|
+
}
|
|
27
|
+
get schema() {
|
|
28
|
+
return options;
|
|
29
|
+
}
|
|
30
|
+
getRefinedSchema(schema) {
|
|
31
|
+
return schema
|
|
32
|
+
.refine(options => !options.id !== !options.displayName, {
|
|
33
|
+
message: 'Specify either id or displayName, but not both'
|
|
34
|
+
})
|
|
35
|
+
.refine(options => options.id || options.displayName, {
|
|
36
|
+
message: 'Specify either id or displayName'
|
|
37
|
+
})
|
|
38
|
+
.refine(options => (!options.id && !options.displayName) || options.displayName || (options.id && validation.isValidGuid(options.id)), options => ({
|
|
39
|
+
message: `The '${options.id}' must be a valid GUID`,
|
|
40
|
+
path: ['id']
|
|
41
|
+
}))
|
|
42
|
+
.refine(options => Object.values([options.newDisplayName, options.description, options.allowedResourceActions, options.enabled, options.version]).filter(v => typeof v !== 'undefined').length > 0, {
|
|
43
|
+
message: 'Provide value for at least one of the following parameters: newDisplayName, description, allowedResourceActions, enabled or version'
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
async commandAction(logger, args) {
|
|
47
|
+
try {
|
|
48
|
+
let roleDefinitionId = args.options.id;
|
|
49
|
+
if (args.options.displayName) {
|
|
50
|
+
roleDefinitionId = (await roleDefinition.getRoleDefinitionByDisplayName(args.options.displayName, 'id')).id;
|
|
51
|
+
}
|
|
52
|
+
if (args.options.verbose) {
|
|
53
|
+
await logger.logToStderr(`Updating custom role definition with ID ${roleDefinitionId}...`);
|
|
54
|
+
}
|
|
55
|
+
const data = {
|
|
56
|
+
displayName: args.options.newDisplayName,
|
|
57
|
+
description: args.options.description,
|
|
58
|
+
isEnabled: args.options.enabled,
|
|
59
|
+
version: args.options.version
|
|
60
|
+
};
|
|
61
|
+
if (args.options.allowedResourceActions) {
|
|
62
|
+
data['rolePermissions'] = [
|
|
63
|
+
{
|
|
64
|
+
allowedResourceActions: args.options.allowedResourceActions.split(',')
|
|
65
|
+
}
|
|
66
|
+
];
|
|
67
|
+
}
|
|
68
|
+
const requestOptions = {
|
|
69
|
+
url: `${this.resource}/v1.0/roleManagement/directory/roleDefinitions/${roleDefinitionId}`,
|
|
70
|
+
headers: {
|
|
71
|
+
accept: 'application/json;odata.metadata=none'
|
|
72
|
+
},
|
|
73
|
+
data: data,
|
|
74
|
+
responseType: 'json'
|
|
75
|
+
};
|
|
76
|
+
await request.patch(requestOptions);
|
|
77
|
+
}
|
|
78
|
+
catch (err) {
|
|
79
|
+
this.handleRejectedODataJsonPromise(err);
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
export default new EntraRoleDefinitionSetCommand();
|
|
84
|
+
//# sourceMappingURL=roledefinition-set.js.map
|
|
@@ -88,9 +88,11 @@ export default {
|
|
|
88
88
|
PIM_ROLE_ASSIGNMENT_ELIGIBILITY_LIST: `${prefix} pim role assignment eligibility list`,
|
|
89
89
|
PIM_ROLE_REQUEST_LIST: `${prefix} pim role request list`,
|
|
90
90
|
POLICY_LIST: `${prefix} policy list`,
|
|
91
|
+
ROLEDEFINITION_ADD: `${prefix} roledefinition add`,
|
|
91
92
|
ROLEDEFINITION_LIST: `${prefix} roledefinition list`,
|
|
92
93
|
ROLEDEFINITION_GET: `${prefix} roledefinition get`,
|
|
93
94
|
ROLEDEFINITION_REMOVE: `${prefix} roledefinition remove`,
|
|
95
|
+
ROLEDEFINITION_SET: `${prefix} roledefinition set`,
|
|
94
96
|
SITECLASSIFICATION_DISABLE: `${prefix} siteclassification disable`,
|
|
95
97
|
SITECLASSIFICATION_ENABLE: `${prefix} siteclassification enable`,
|
|
96
98
|
SITECLASSIFICATION_GET: `${prefix} siteclassification get`,
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { globalOptionsZod } from '../../../../Command.js';
|
|
3
|
+
import { zod } from '../../../../utils/zod.js';
|
|
4
|
+
import GraphCommand from '../../../base/GraphCommand.js';
|
|
5
|
+
import commands from '../../commands.js';
|
|
6
|
+
import { validation } from '../../../../utils/validation.js';
|
|
7
|
+
import request from '../../../../request.js';
|
|
8
|
+
import { accessToken } from '../../../../utils/accessToken.js';
|
|
9
|
+
import auth from '../../../../Auth.js';
|
|
10
|
+
const options = globalOptionsZod
|
|
11
|
+
.extend({
|
|
12
|
+
userId: zod.alias('i', z.string().refine(id => validation.isValidGuid(id), id => ({
|
|
13
|
+
message: `'${id}' is not a valid GUID.`
|
|
14
|
+
})).optional()),
|
|
15
|
+
userName: zod.alias('n', z.string().refine(name => validation.isValidUserPrincipalName(name), name => ({
|
|
16
|
+
message: `'${name}' is not a valid UPN.`
|
|
17
|
+
})).optional()),
|
|
18
|
+
dateFormat: z.string().optional(),
|
|
19
|
+
timeFormat: z.string().optional(),
|
|
20
|
+
timeZone: z.string().optional(),
|
|
21
|
+
language: z.string().optional(),
|
|
22
|
+
delegateMeetingMessageDeliveryOptions: z.enum(['sendToDelegateAndInformationToPrincipal', 'sendToDelegateAndPrincipal', 'sendToDelegateOnly']).optional(),
|
|
23
|
+
workingDays: z.string().transform((value) => value.split(',')).pipe(z.enum(['monday', 'tuesday', 'wednesday', 'thursday', 'friday', 'saturday', 'sunday']).array()).optional(),
|
|
24
|
+
workingHoursStartTime: z.string().optional(),
|
|
25
|
+
workingHoursEndTime: z.string().optional(),
|
|
26
|
+
workingHoursTimeZone: z.string().optional(),
|
|
27
|
+
autoReplyExternalAudience: z.enum(['none', 'all', 'contactsOnly']).optional(),
|
|
28
|
+
autoReplyExternalMessage: z.string().optional(),
|
|
29
|
+
autoReplyInternalMessage: z.string().optional(),
|
|
30
|
+
autoReplyStartDateTime: z.string().optional(),
|
|
31
|
+
autoReplyStartTimeZone: z.string().optional(),
|
|
32
|
+
autoReplyEndDateTime: z.string().optional(),
|
|
33
|
+
autoReplyEndTimeZone: z.string().optional(),
|
|
34
|
+
autoReplyStatus: z.enum(['disabled', 'scheduled', 'alwaysEnabled']).optional()
|
|
35
|
+
})
|
|
36
|
+
.strict();
|
|
37
|
+
class OutlookMailboxSettingsSetCommand extends GraphCommand {
|
|
38
|
+
get name() {
|
|
39
|
+
return commands.MAILBOX_SETTINGS_SET;
|
|
40
|
+
}
|
|
41
|
+
get description() {
|
|
42
|
+
return 'Updates user mailbox settings';
|
|
43
|
+
}
|
|
44
|
+
get schema() {
|
|
45
|
+
return options;
|
|
46
|
+
}
|
|
47
|
+
getRefinedSchema(schema) {
|
|
48
|
+
return schema
|
|
49
|
+
.refine(options => [options.workingDays, options.workingHoursStartTime, options.workingHoursEndTime, options.workingHoursTimeZone,
|
|
50
|
+
options.autoReplyStatus, options.autoReplyExternalAudience, options.autoReplyExternalMessage, options.autoReplyInternalMessage,
|
|
51
|
+
options.autoReplyStartDateTime, options.autoReplyStartTimeZone, options.autoReplyEndDateTime, options.autoReplyEndTimeZone,
|
|
52
|
+
options.timeFormat, options.timeZone, options.dateFormat, options.delegateMeetingMessageDeliveryOptions, options.language].filter(o => o !== undefined).length > 0, {
|
|
53
|
+
message: 'Specify at least one of the following options: workingDays, workingHoursStartTime, workingHoursEndTime, workingHoursTimeZone, autoReplyStatus, autoReplyExternalAudience, autoReplyExternalMessage, autoReplyInternalMessage, autoReplyStartDateTime, autoReplyStartTimeZone, autoReplyEndDateTime, autoReplyEndTimeZone, timeFormat, timeZone, dateFormat, delegateMeetingMessageDeliveryOptions, or language'
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
async commandAction(logger, args) {
|
|
57
|
+
const isAppOnlyAccessToken = accessToken.isAppOnlyAccessToken(auth.connection.accessTokens[auth.defaultResource].accessToken);
|
|
58
|
+
let requestUrl = `${this.resource}/v1.0/me/mailboxSettings`;
|
|
59
|
+
if (isAppOnlyAccessToken) {
|
|
60
|
+
if (args.options.userId && args.options.userName) {
|
|
61
|
+
throw 'When running with application permissions either userId or userName is required, but not both';
|
|
62
|
+
}
|
|
63
|
+
const userIdentifier = args.options.userId ?? args.options.userName;
|
|
64
|
+
if (this.verbose) {
|
|
65
|
+
await logger.logToStderr(`Updating mailbox settings for user ${userIdentifier}...`);
|
|
66
|
+
}
|
|
67
|
+
requestUrl = `${this.resource}/v1.0/users('${userIdentifier}')/mailboxSettings`;
|
|
68
|
+
}
|
|
69
|
+
else {
|
|
70
|
+
if (args.options.userId || args.options.userName) {
|
|
71
|
+
throw 'You can update mailbox settings of other users only if CLI is authenticated in app-only mode';
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
const requestOptions = {
|
|
75
|
+
url: requestUrl,
|
|
76
|
+
headers: {
|
|
77
|
+
accept: 'application/json;odata.metadata=none'
|
|
78
|
+
},
|
|
79
|
+
responseType: 'json',
|
|
80
|
+
data: this.createRequestBody(args)
|
|
81
|
+
};
|
|
82
|
+
try {
|
|
83
|
+
const result = await request.patch(requestOptions);
|
|
84
|
+
await logger.log(result);
|
|
85
|
+
}
|
|
86
|
+
catch (err) {
|
|
87
|
+
this.handleRejectedODataJsonPromise(err);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
createRequestBody(args) {
|
|
91
|
+
const data = {};
|
|
92
|
+
if (args.options.dateFormat) {
|
|
93
|
+
data.dateFormat = args.options.dateFormat;
|
|
94
|
+
}
|
|
95
|
+
if (args.options.timeFormat) {
|
|
96
|
+
data.timeFormat = args.options.timeFormat;
|
|
97
|
+
}
|
|
98
|
+
if (args.options.timeZone) {
|
|
99
|
+
data.timeZone = args.options.timeZone;
|
|
100
|
+
}
|
|
101
|
+
if (args.options.delegateMeetingMessageDeliveryOptions) {
|
|
102
|
+
data.delegateMeetingMessageDeliveryOptions = args.options.delegateMeetingMessageDeliveryOptions;
|
|
103
|
+
}
|
|
104
|
+
if (args.options.language) {
|
|
105
|
+
data.language = {
|
|
106
|
+
locale: args.options.language
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
if (args.options.workingDays || args.options.workingHoursStartTime || args.options.workingHoursEndTime || args.options.workingHoursTimeZone) {
|
|
110
|
+
data['workingHours'] = {};
|
|
111
|
+
}
|
|
112
|
+
if (args.options.workingDays) {
|
|
113
|
+
data.workingHours.daysOfWeek = args.options.workingDays;
|
|
114
|
+
}
|
|
115
|
+
if (args.options.workingHoursStartTime) {
|
|
116
|
+
data.workingHours.startTime = args.options.workingHoursStartTime;
|
|
117
|
+
}
|
|
118
|
+
if (args.options.workingHoursEndTime) {
|
|
119
|
+
data.workingHours.endTime = args.options.workingHoursEndTime;
|
|
120
|
+
}
|
|
121
|
+
if (args.options.workingHoursTimeZone) {
|
|
122
|
+
data.workingHours.timeZone = {
|
|
123
|
+
name: args.options.workingHoursTimeZone
|
|
124
|
+
};
|
|
125
|
+
}
|
|
126
|
+
if (args.options.autoReplyStatus || args.options.autoReplyExternalAudience || args.options.autoReplyExternalMessage || args.options.autoReplyInternalMessage || args.options.autoReplyStartDateTime || args.options.autoReplyStartTimeZone || args.options.autoReplyEndDateTime || args.options.autoReplyEndTimeZone) {
|
|
127
|
+
data['automaticRepliesSetting'] = {};
|
|
128
|
+
}
|
|
129
|
+
if (args.options.autoReplyStatus) {
|
|
130
|
+
data.automaticRepliesSetting['status'] = args.options.autoReplyStatus;
|
|
131
|
+
}
|
|
132
|
+
if (args.options.autoReplyExternalAudience) {
|
|
133
|
+
data.automaticRepliesSetting['externalAudience'] = args.options.autoReplyExternalAudience;
|
|
134
|
+
}
|
|
135
|
+
if (args.options.autoReplyExternalMessage) {
|
|
136
|
+
data.automaticRepliesSetting['externalReplyMessage'] = args.options.autoReplyExternalMessage;
|
|
137
|
+
}
|
|
138
|
+
if (args.options.autoReplyInternalMessage) {
|
|
139
|
+
data.automaticRepliesSetting['internalReplyMessage'] = args.options.autoReplyInternalMessage;
|
|
140
|
+
}
|
|
141
|
+
if (args.options.autoReplyStartDateTime || args.options.autoReplyStartTimeZone) {
|
|
142
|
+
data.automaticRepliesSetting['scheduledStartDateTime'] = {};
|
|
143
|
+
}
|
|
144
|
+
if (args.options.autoReplyStartDateTime) {
|
|
145
|
+
data.automaticRepliesSetting['scheduledStartDateTime']['dateTime'] = args.options.autoReplyStartDateTime;
|
|
146
|
+
}
|
|
147
|
+
if (args.options.autoReplyStartTimeZone) {
|
|
148
|
+
data.automaticRepliesSetting['scheduledStartDateTime']['timeZone'] = args.options.autoReplyStartTimeZone;
|
|
149
|
+
}
|
|
150
|
+
if (args.options.autoReplyEndDateTime || args.options.autoReplyEndTimeZone) {
|
|
151
|
+
data.automaticRepliesSetting['scheduledEndDateTime'] = {};
|
|
152
|
+
}
|
|
153
|
+
if (args.options.autoReplyEndDateTime) {
|
|
154
|
+
data.automaticRepliesSetting['scheduledEndDateTime']['dateTime'] = args.options.autoReplyEndDateTime;
|
|
155
|
+
}
|
|
156
|
+
if (args.options.autoReplyEndTimeZone) {
|
|
157
|
+
data.automaticRepliesSetting['scheduledEndDateTime']['timeZone'] = args.options.autoReplyEndTimeZone;
|
|
158
|
+
}
|
|
159
|
+
return data;
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
export default new OutlookMailboxSettingsSetCommand();
|
|
163
|
+
//# sourceMappingURL=mailbox-settings-set.js.map
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { globalOptionsZod } from '../../../../Command.js';
|
|
3
|
+
import request from '../../../../request.js';
|
|
4
|
+
import { zod } from '../../../../utils/zod.js';
|
|
5
|
+
import GraphCommand from '../../../base/GraphCommand.js';
|
|
6
|
+
import commands from '../../commands.js';
|
|
7
|
+
const options = globalOptionsZod
|
|
8
|
+
.extend({
|
|
9
|
+
enabled: zod.alias('e', z.boolean())
|
|
10
|
+
})
|
|
11
|
+
.strict();
|
|
12
|
+
class TenantPeoplePronounsSetCommand extends GraphCommand {
|
|
13
|
+
get name() {
|
|
14
|
+
return commands.PEOPLE_PRONOUNS_SET;
|
|
15
|
+
}
|
|
16
|
+
get description() {
|
|
17
|
+
return 'Manage pronouns settings for an organization';
|
|
18
|
+
}
|
|
19
|
+
get schema() {
|
|
20
|
+
return options;
|
|
21
|
+
}
|
|
22
|
+
async commandAction(logger, args) {
|
|
23
|
+
try {
|
|
24
|
+
if (this.verbose) {
|
|
25
|
+
await logger.logToStderr('Updating pronouns settings...');
|
|
26
|
+
}
|
|
27
|
+
const requestOptions = {
|
|
28
|
+
url: `${this.resource}/v1.0/admin/people/pronouns`,
|
|
29
|
+
headers: {
|
|
30
|
+
accept: 'application/json;odata.metadata=none'
|
|
31
|
+
},
|
|
32
|
+
data: {
|
|
33
|
+
isEnabledInOrganization: args.options.enabled
|
|
34
|
+
},
|
|
35
|
+
responseType: 'json'
|
|
36
|
+
};
|
|
37
|
+
const pronouns = await request.patch(requestOptions);
|
|
38
|
+
await logger.log(pronouns);
|
|
39
|
+
}
|
|
40
|
+
catch (err) {
|
|
41
|
+
this.handleRejectedODataJsonPromise(err);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
export default new TenantPeoplePronounsSetCommand();
|
|
46
|
+
//# sourceMappingURL=people-pronouns-set.js.map
|
|
@@ -8,6 +8,7 @@ export default {
|
|
|
8
8
|
PEOPLE_PROFILECARDPROPERTY_REMOVE: `${prefix} people profilecardproperty remove`,
|
|
9
9
|
PEOPLE_PROFILECARDPROPERTY_SET: `${prefix} people profilecardproperty set`,
|
|
10
10
|
PEOPLE_PRONOUNS_GET: `${prefix} people pronouns get`,
|
|
11
|
+
PEOPLE_PRONOUNS_SET: `${prefix} people pronouns set`,
|
|
11
12
|
REPORT_ACTIVEUSERCOUNTS: `${prefix} report activeusercounts`,
|
|
12
13
|
REPORT_ACTIVEUSERDETAIL: `${prefix} report activeuserdetail`,
|
|
13
14
|
REPORT_OFFICE365ACTIVATIONCOUNTS: `${prefix} report office365activationcounts`,
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import Global from '/docs/cmd/_global.mdx';
|
|
2
|
+
import Tabs from '@theme/Tabs';
|
|
3
|
+
import TabItem from '@theme/TabItem';
|
|
4
|
+
|
|
5
|
+
# entra roledefinition add
|
|
6
|
+
|
|
7
|
+
Creates a custom Microsoft Entra ID role definition
|
|
8
|
+
|
|
9
|
+
## Usage
|
|
10
|
+
|
|
11
|
+
```sh
|
|
12
|
+
m365 entra roledefinition add [options]
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Options
|
|
16
|
+
|
|
17
|
+
```md definition-list
|
|
18
|
+
`-n, --displayName <displayName>`
|
|
19
|
+
: The display name for the role definition.
|
|
20
|
+
|
|
21
|
+
`-a, --allowedResourceActions <allowedResourceActions>`
|
|
22
|
+
: Comma-separated list of resource actions allowed for the role.
|
|
23
|
+
|
|
24
|
+
`-d, --description [description]`
|
|
25
|
+
: The description for the role definition.
|
|
26
|
+
|
|
27
|
+
`-e, --enabled [enabled]`
|
|
28
|
+
: Indicates if the role is enabled for the assignment. If not specified, the role is enabled by default.
|
|
29
|
+
|
|
30
|
+
`-v, --version [version]`
|
|
31
|
+
: The version of the role definition.
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
<Global />
|
|
35
|
+
|
|
36
|
+
## Examples
|
|
37
|
+
|
|
38
|
+
Create a custom Microsoft Entra ID role
|
|
39
|
+
|
|
40
|
+
```sh
|
|
41
|
+
m365 entra roledefinition add --displayName 'Application Remover' --description 'Allows to remove any Entra ID application' --allowedResourceActions 'microsoft.directory/applications/delete'
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
Create a custom Microsoft Entra ID role, but disable it for the assignment
|
|
45
|
+
|
|
46
|
+
```sh
|
|
47
|
+
m365 entra roledefinition add --displayName 'Application Remover' --version '1.0' --enabled false --allowedResourceActions 'microsoft.directory/applications/delete,microsoft.directory/applications/owners/update'
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## Response
|
|
51
|
+
|
|
52
|
+
<Tabs>
|
|
53
|
+
<TabItem value="JSON">
|
|
54
|
+
|
|
55
|
+
```json
|
|
56
|
+
{
|
|
57
|
+
"id": "3844129d-f748-4c03-8165-4412ee9b4ceb",
|
|
58
|
+
"description": null,
|
|
59
|
+
"displayName": "Custom Role",
|
|
60
|
+
"isBuiltIn": false,
|
|
61
|
+
"isEnabled": true,
|
|
62
|
+
"resourceScopes": [
|
|
63
|
+
"/"
|
|
64
|
+
],
|
|
65
|
+
"templateId": "3844129d-f748-4c03-8165-4412ee9b4ceb",
|
|
66
|
+
"version": "1",
|
|
67
|
+
"rolePermissions": [
|
|
68
|
+
{
|
|
69
|
+
"allowedResourceActions": [
|
|
70
|
+
"microsoft.directory/groups.unified/create",
|
|
71
|
+
"microsoft.directory/groups.unified/delete"
|
|
72
|
+
],
|
|
73
|
+
"condition": null
|
|
74
|
+
}
|
|
75
|
+
]
|
|
76
|
+
}
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
</TabItem>
|
|
80
|
+
<TabItem value="Text">
|
|
81
|
+
|
|
82
|
+
```text
|
|
83
|
+
description : null
|
|
84
|
+
displayName : Custom Role
|
|
85
|
+
id : 3844129d-f748-4c03-8165-4412ee9b4ceb
|
|
86
|
+
isBuiltIn : false
|
|
87
|
+
isEnabled : true
|
|
88
|
+
resourceScopes : ["/"]
|
|
89
|
+
rolePermissions: [{"allowedResourceActions":["microsoft.directory/groups.unified/create","microsoft.directory/groups.unified/delete"],"condition":null}]
|
|
90
|
+
templateId : 3844129d-f748-4c03-8165-4412ee9b4ceb
|
|
91
|
+
version : 1
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
</TabItem>
|
|
95
|
+
<TabItem value="CSV">
|
|
96
|
+
|
|
97
|
+
```csv
|
|
98
|
+
id,description,displayName,isBuiltIn,isEnabled,templateId,version
|
|
99
|
+
3844129d-f748-4c03-8165-4412ee9b4ceb,,Custom Role,0,1,3844129d-f748-4c03-8165-4412ee9b4ceb,1
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
</TabItem>
|
|
103
|
+
<TabItem value="Markdown">
|
|
104
|
+
|
|
105
|
+
```md
|
|
106
|
+
# entra roledefinition add --displayName "Custom Role" --allowedResourceActions "microsoft.directory/groups.unified/create,microsoft.directory/groups.unified/delete" --version 1
|
|
107
|
+
|
|
108
|
+
Date: 12/15/2024
|
|
109
|
+
|
|
110
|
+
## Custom Role (3844129d-f748-4c03-8165-4412ee9b4ceb)
|
|
111
|
+
|
|
112
|
+
Property | Value
|
|
113
|
+
---------|-------
|
|
114
|
+
id | 3844129d-f748-4c03-8165-4412ee9b4ceb
|
|
115
|
+
displayName | Custom Role
|
|
116
|
+
isBuiltIn | false
|
|
117
|
+
isEnabled | true
|
|
118
|
+
templateId | 3844129d-f748-4c03-8165-4412ee9b4ceb
|
|
119
|
+
version | 1
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
</TabItem>
|
|
123
|
+
</Tabs>
|
|
124
|
+
|
|
125
|
+
## More information
|
|
126
|
+
|
|
127
|
+
- https://learn.microsoft.com/graph/api/rbacapplication-post-roledefinitions
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import Global from '/docs/cmd/_global.mdx';
|
|
2
|
+
|
|
3
|
+
# entra roledefinition set
|
|
4
|
+
|
|
5
|
+
Updates a custom Microsoft Entra ID role definition
|
|
6
|
+
|
|
7
|
+
## Usage
|
|
8
|
+
|
|
9
|
+
```sh
|
|
10
|
+
m365 entra roledefinition set [options]
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Options
|
|
14
|
+
|
|
15
|
+
```md definition-list
|
|
16
|
+
`-i, --id [id]`
|
|
17
|
+
: The id of the role definition to be updated. Specify either `id` or `displayName`, but not both.
|
|
18
|
+
|
|
19
|
+
`-n, --displayName [displayName]`
|
|
20
|
+
: The display name of the role definition to be updated. Specify either `id` or `displayName`, but not both.
|
|
21
|
+
|
|
22
|
+
`--newDisplayName [newDisplayName]`
|
|
23
|
+
: Updated display name for the role definition.
|
|
24
|
+
|
|
25
|
+
`-d, --description [description]`
|
|
26
|
+
: Updated description for the role definition.
|
|
27
|
+
|
|
28
|
+
`-e, --enabled [enabled]`
|
|
29
|
+
: Indicates if the role is enabled for the assignment.
|
|
30
|
+
|
|
31
|
+
`a-, --allowedResourceActions [allowedResourceActions]`
|
|
32
|
+
: Updated comma-separated list of resource actions allowed for the role.
|
|
33
|
+
|
|
34
|
+
`-v, --version [version]`
|
|
35
|
+
: Updated version of the role definition.
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
<Global />
|
|
39
|
+
|
|
40
|
+
## Examples
|
|
41
|
+
|
|
42
|
+
Update a custom Microsoft Entra ID role specified by the id
|
|
43
|
+
|
|
44
|
+
```sh
|
|
45
|
+
m365 entra roledefinition set --id fadbc488-151d-4431-9143-6abbffae759f --newDisplayName 'Application Remover' --description 'Allows to remove any Entra ID application' --allowedResourceActions 'microsoft.directory/applications/delete'
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
Update a custom Microsoft Entra ID role specified by the display name
|
|
49
|
+
|
|
50
|
+
```sh
|
|
51
|
+
m365 entra roledefinition set --displayName 'Application Remover' --version '1.0' --enabled true --allowedResourceActions 'microsoft.directory/applications/delete,microsoft.directory/applications/owners/update'
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
## Response
|
|
55
|
+
|
|
56
|
+
The command won't return a response on success
|
|
57
|
+
|
|
58
|
+
## More information
|
|
59
|
+
|
|
60
|
+
- https://learn.microsoft.com/graph/api/rbacapplication-post-roledefinitions
|