@pnp/cli-microsoft365 12.0.0-beta.c9bd7f3 → 12.0.0-beta.d654135
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/m365/entra/commands/m365group/m365group-remove.js +2 -8
- package/dist/m365/spo/commands/navigation/navigation-node-list.js +6 -4
- package/dist/m365/spo/commands/site/site-remove.js +3 -9
- package/dist/m365/spo/commands/tenant/tenant-appcatalog-add.js +1 -1
- package/dist/m365/spo/commands/web/web-rule-get.js +47 -0
- package/dist/m365/spo/commands/web/web-rule-list.js +113 -0
- package/dist/m365/spo/commands/web/web-rule-remove.js +54 -0
- package/dist/m365/spo/commands.js +3 -0
- package/docs/docs/cmd/entra/m365group/m365group-remove.mdx +0 -3
- package/docs/docs/cmd/spo/navigation/navigation-node-list.mdx +37 -27
- package/docs/docs/cmd/spo/site/site-remove.mdx +0 -3
- package/docs/docs/cmd/spo/web/web-rule-get.mdx +108 -0
- package/docs/docs/cmd/spo/web/web-rule-list.mdx +189 -0
- package/docs/docs/cmd/spo/web/web-rule-remove.mdx +65 -0
- package/docs/docs/cmd/tenant/people/people-profilecardproperty-add.mdx +19 -0
- package/docs/docs/cmd/tenant/people/people-profilecardproperty-get.mdx +19 -0
- package/docs/docs/cmd/tenant/people/people-profilecardproperty-list.mdx +19 -0
- package/docs/docs/cmd/tenant/people/people-profilecardproperty-remove.mdx +19 -0
- package/docs/docs/cmd/tenant/people/people-profilecardproperty-set.mdx +19 -0
- package/docs/docs/cmd/tenant/serviceannouncement/serviceannouncement-health-get.mdx +19 -0
- package/docs/docs/cmd/tenant/serviceannouncement/serviceannouncement-health-list.mdx +19 -0
- package/docs/docs/cmd/tenant/serviceannouncement/serviceannouncement-healthissue-get.mdx +19 -0
- package/docs/docs/cmd/tenant/serviceannouncement/serviceannouncement-healthissue-list.mdx +19 -0
- package/docs/docs/cmd/tenant/serviceannouncement/serviceannouncement-message-get.mdx +19 -0
- package/docs/docs/cmd/tenant/serviceannouncement/serviceannouncement-message-list.mdx +19 -0
- package/npm-shrinkwrap.json +377 -113
- package/package.json +4 -4
|
@@ -32,10 +32,6 @@ class EntraM365GroupRemoveCommand extends GraphCommand {
|
|
|
32
32
|
__classPrivateFieldGet(this, _EntraM365GroupRemoveCommand_instances, "m", _EntraM365GroupRemoveCommand_initTypes).call(this);
|
|
33
33
|
}
|
|
34
34
|
async commandAction(logger, args) {
|
|
35
|
-
if (args.options.skipRecycleBin) {
|
|
36
|
-
await this.warn(logger, `Option 'skipRecycleBin' is deprecated. Please use 'permanent' instead.`);
|
|
37
|
-
args.options.permanent = true;
|
|
38
|
-
}
|
|
39
35
|
const removeGroup = async () => {
|
|
40
36
|
if (this.verbose) {
|
|
41
37
|
await logger.logToStderr(`Removing Microsoft 365 Group: ${args.options.id || args.options.displayName}...`);
|
|
@@ -173,7 +169,7 @@ _EntraM365GroupRemoveCommand_instances = new WeakSet(), _EntraM365GroupRemoveCom
|
|
|
173
169
|
this.telemetry.push((args) => {
|
|
174
170
|
Object.assign(this.telemetryProperties, {
|
|
175
171
|
force: (!(!args.options.force)).toString(),
|
|
176
|
-
permanent: !!
|
|
172
|
+
permanent: !!args.options.permanent
|
|
177
173
|
});
|
|
178
174
|
});
|
|
179
175
|
}, _EntraM365GroupRemoveCommand_initOptions = function _EntraM365GroupRemoveCommand_initOptions() {
|
|
@@ -185,8 +181,6 @@ _EntraM365GroupRemoveCommand_instances = new WeakSet(), _EntraM365GroupRemoveCom
|
|
|
185
181
|
option: '-f, --force'
|
|
186
182
|
}, {
|
|
187
183
|
option: '--permanent'
|
|
188
|
-
}, {
|
|
189
|
-
option: '--skipRecycleBin'
|
|
190
184
|
});
|
|
191
185
|
}, _EntraM365GroupRemoveCommand_initValidators = function _EntraM365GroupRemoveCommand_initValidators() {
|
|
192
186
|
this.validators.push(async (args) => {
|
|
@@ -199,7 +193,7 @@ _EntraM365GroupRemoveCommand_instances = new WeakSet(), _EntraM365GroupRemoveCom
|
|
|
199
193
|
this.optionSets.push({ options: ['id', 'displayName'] });
|
|
200
194
|
}, _EntraM365GroupRemoveCommand_initTypes = function _EntraM365GroupRemoveCommand_initTypes() {
|
|
201
195
|
this.types.string.push('id', 'displayName');
|
|
202
|
-
this.types.boolean.push('permanent'
|
|
196
|
+
this.types.boolean.push('permanent');
|
|
203
197
|
};
|
|
204
198
|
EntraM365GroupRemoveCommand.maxRetries = 10;
|
|
205
199
|
export default new EntraM365GroupRemoveCommand();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { globalOptionsZod } from '../../../../Command.js';
|
|
2
2
|
import { z } from 'zod';
|
|
3
|
-
import {
|
|
3
|
+
import { spo } from '../../../../utils/spo.js';
|
|
4
4
|
import { validation } from '../../../../utils/validation.js';
|
|
5
5
|
import SpoCommand from '../../../base/SpoCommand.js';
|
|
6
6
|
import commands from '../../commands.js';
|
|
@@ -21,7 +21,7 @@ class SpoNavigationNodeListCommand extends SpoCommand {
|
|
|
21
21
|
return 'Lists nodes from the specified site navigation';
|
|
22
22
|
}
|
|
23
23
|
defaultProperties() {
|
|
24
|
-
return ['
|
|
24
|
+
return ['Key', 'Title', 'SimpleUrl'];
|
|
25
25
|
}
|
|
26
26
|
get schema() {
|
|
27
27
|
return options;
|
|
@@ -31,8 +31,10 @@ class SpoNavigationNodeListCommand extends SpoCommand {
|
|
|
31
31
|
await logger.logToStderr(`Retrieving navigation nodes...`);
|
|
32
32
|
}
|
|
33
33
|
try {
|
|
34
|
-
const
|
|
35
|
-
|
|
34
|
+
const menuState = args.options.location === 'TopNavigationBar'
|
|
35
|
+
? await spo.getTopNavigationMenuState(args.options.webUrl)
|
|
36
|
+
: await spo.getQuickLaunchMenuState(args.options.webUrl);
|
|
37
|
+
await logger.log(menuState.Nodes);
|
|
36
38
|
}
|
|
37
39
|
catch (err) {
|
|
38
40
|
this.handleRejectedODataJsonPromise(err);
|
|
@@ -31,10 +31,6 @@ class SpoSiteRemoveCommand extends SpoCommand {
|
|
|
31
31
|
__classPrivateFieldGet(this, _SpoSiteRemoveCommand_instances, "m", _SpoSiteRemoveCommand_initTypes).call(this);
|
|
32
32
|
}
|
|
33
33
|
async commandAction(logger, args) {
|
|
34
|
-
if (args.options.skipRecycleBin) {
|
|
35
|
-
await this.warn(logger, `Option 'skipRecycleBin' is deprecated. Please use 'permanent' instead.`);
|
|
36
|
-
args.options.permanent = true;
|
|
37
|
-
}
|
|
38
34
|
if (args.options.force) {
|
|
39
35
|
await this.removeSite(logger, args.options);
|
|
40
36
|
}
|
|
@@ -195,7 +191,7 @@ class SpoSiteRemoveCommand extends SpoCommand {
|
|
|
195
191
|
_SpoSiteRemoveCommand_instances = new WeakSet(), _SpoSiteRemoveCommand_initTelemetry = function _SpoSiteRemoveCommand_initTelemetry() {
|
|
196
192
|
this.telemetry.push((args) => {
|
|
197
193
|
Object.assign(this.telemetryProperties, {
|
|
198
|
-
permanent: !!
|
|
194
|
+
permanent: !!args.options.permanent,
|
|
199
195
|
fromRecycleBin: !!args.options.fromRecycleBin,
|
|
200
196
|
force: !!args.options.force
|
|
201
197
|
});
|
|
@@ -205,8 +201,6 @@ _SpoSiteRemoveCommand_instances = new WeakSet(), _SpoSiteRemoveCommand_initTelem
|
|
|
205
201
|
option: '-u, --url <url>'
|
|
206
202
|
}, {
|
|
207
203
|
option: '--permanent'
|
|
208
|
-
}, {
|
|
209
|
-
option: '--skipRecycleBin'
|
|
210
204
|
}, {
|
|
211
205
|
option: '--fromRecycleBin'
|
|
212
206
|
}, {
|
|
@@ -223,14 +217,14 @@ _SpoSiteRemoveCommand_instances = new WeakSet(), _SpoSiteRemoveCommand_initTelem
|
|
|
223
217
|
if (rootUrl.toLowerCase() === urlUtil.removeTrailingSlashes(args.options.url.toLowerCase())) {
|
|
224
218
|
return `The root site cannot be deleted.`;
|
|
225
219
|
}
|
|
226
|
-
if (args.options.fromRecycleBin &&
|
|
220
|
+
if (args.options.fromRecycleBin && args.options.permanent) {
|
|
227
221
|
return 'Specify either fromRecycleBin or permanent, but not both.';
|
|
228
222
|
}
|
|
229
223
|
return true;
|
|
230
224
|
});
|
|
231
225
|
}, _SpoSiteRemoveCommand_initTypes = function _SpoSiteRemoveCommand_initTypes() {
|
|
232
226
|
this.types.string.push('url');
|
|
233
|
-
this.types.boolean.push('permanent', '
|
|
227
|
+
this.types.boolean.push('permanent', 'fromRecycleBin', 'force');
|
|
234
228
|
};
|
|
235
229
|
export default new SpoSiteRemoveCommand();
|
|
236
230
|
//# sourceMappingURL=site-remove.js.map
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { globalOptionsZod } from '../../../../Command.js';
|
|
3
|
+
import request from '../../../../request.js';
|
|
4
|
+
import { formatting } from '../../../../utils/formatting.js';
|
|
5
|
+
import { validation } from '../../../../utils/validation.js';
|
|
6
|
+
import SpoCommand from '../../../base/SpoCommand.js';
|
|
7
|
+
import commands from '../../commands.js';
|
|
8
|
+
const options = z.strictObject({
|
|
9
|
+
...globalOptionsZod.shape,
|
|
10
|
+
webUrl: z.string().alias('u')
|
|
11
|
+
.refine(url => validation.isValidSharePointUrl(url) === true, {
|
|
12
|
+
error: e => `'${e.input}' is not a valid SharePoint URL.`
|
|
13
|
+
}),
|
|
14
|
+
id: z.uuid()
|
|
15
|
+
});
|
|
16
|
+
class SpoWebRuleGetCommand extends SpoCommand {
|
|
17
|
+
get name() {
|
|
18
|
+
return commands.WEB_RULE_GET;
|
|
19
|
+
}
|
|
20
|
+
get description() {
|
|
21
|
+
return 'Retrieves details of a specific rule from a SharePoint site list';
|
|
22
|
+
}
|
|
23
|
+
get schema() {
|
|
24
|
+
return options;
|
|
25
|
+
}
|
|
26
|
+
async commandAction(logger, args) {
|
|
27
|
+
try {
|
|
28
|
+
if (this.verbose) {
|
|
29
|
+
await logger.logToStderr(`Retrieving rule with id '${args.options.id}' from site '${args.options.webUrl}'...`);
|
|
30
|
+
}
|
|
31
|
+
const requestOptions = {
|
|
32
|
+
url: `${args.options.webUrl}/_api/web/alerts/GetById('${formatting.encodeQueryParameter(args.options.id)}')?$expand=List,User,List/Rootfolder&$select=*,List/Id,List/Title,List/Rootfolder/ServerRelativeUrl`,
|
|
33
|
+
headers: {
|
|
34
|
+
accept: 'application/json;odata=nometadata'
|
|
35
|
+
},
|
|
36
|
+
responseType: 'json'
|
|
37
|
+
};
|
|
38
|
+
const res = await request.get(requestOptions);
|
|
39
|
+
await logger.log(res);
|
|
40
|
+
}
|
|
41
|
+
catch (err) {
|
|
42
|
+
this.handleRejectedODataJsonPromise(err);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
export default new SpoWebRuleGetCommand();
|
|
47
|
+
//# sourceMappingURL=web-rule-get.js.map
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { cli } from '../../../../cli/cli.js';
|
|
3
|
+
import { globalOptionsZod } from '../../../../Command.js';
|
|
4
|
+
import { entraUser } from '../../../../utils/entraUser.js';
|
|
5
|
+
import { formatting } from '../../../../utils/formatting.js';
|
|
6
|
+
import { odata } from '../../../../utils/odata.js';
|
|
7
|
+
import { spo } from '../../../../utils/spo.js';
|
|
8
|
+
import { validation } from '../../../../utils/validation.js';
|
|
9
|
+
import SpoCommand from '../../../base/SpoCommand.js';
|
|
10
|
+
import commands from '../../commands.js';
|
|
11
|
+
export const options = z.strictObject({
|
|
12
|
+
...globalOptionsZod.shape,
|
|
13
|
+
webUrl: z.string().alias('u')
|
|
14
|
+
.refine(url => validation.isValidSharePointUrl(url) === true, {
|
|
15
|
+
error: e => `'${e.input}' is not a valid SharePoint site URL.`
|
|
16
|
+
}),
|
|
17
|
+
listId: z.uuid().optional(),
|
|
18
|
+
listUrl: z.string().optional(),
|
|
19
|
+
listTitle: z.string().optional(),
|
|
20
|
+
userName: z.string().optional().refine(upn => typeof upn === 'undefined' || validation.isValidUserPrincipalName(upn), {
|
|
21
|
+
error: e => `'${e.input}' is not a valid UPN.`
|
|
22
|
+
}),
|
|
23
|
+
userId: z.uuid().optional()
|
|
24
|
+
});
|
|
25
|
+
class SpoWebRuleListCommand extends SpoCommand {
|
|
26
|
+
get name() {
|
|
27
|
+
return commands.WEB_RULE_LIST;
|
|
28
|
+
}
|
|
29
|
+
get description() {
|
|
30
|
+
return 'Lists all SharePoint list alerts';
|
|
31
|
+
}
|
|
32
|
+
defaultProperties() {
|
|
33
|
+
return ['ID', 'Title', 'UserPrincipalName'];
|
|
34
|
+
}
|
|
35
|
+
get schema() {
|
|
36
|
+
return options;
|
|
37
|
+
}
|
|
38
|
+
getRefinedSchema(schema) {
|
|
39
|
+
return schema
|
|
40
|
+
.refine(options => [options.listId, options.listUrl, options.listTitle].filter(x => x !== undefined).length <= 1, {
|
|
41
|
+
error: `Specify either listId, listUrl, or listTitle, but not more than one.`,
|
|
42
|
+
params: {
|
|
43
|
+
customCode: 'optionSet',
|
|
44
|
+
options: ['listId', 'listUrl', 'listTitle']
|
|
45
|
+
}
|
|
46
|
+
})
|
|
47
|
+
.refine(options => [options.userName, options.userId].filter(x => x !== undefined).length <= 1, {
|
|
48
|
+
error: `Specify either userName or userId, but not both.`,
|
|
49
|
+
params: {
|
|
50
|
+
customCode: 'optionSet',
|
|
51
|
+
options: ['userName', 'userId']
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
async commandAction(logger, args) {
|
|
56
|
+
if (this.verbose) {
|
|
57
|
+
const listParams = args.options.listId || args.options.listTitle || args.options.listUrl;
|
|
58
|
+
const userParams = args.options.userName || args.options.userId;
|
|
59
|
+
let message = `Retrieving alerts from site '${args.options.webUrl}'`;
|
|
60
|
+
if (listParams) {
|
|
61
|
+
message += ` for list '${listParams}'`;
|
|
62
|
+
}
|
|
63
|
+
if (userParams) {
|
|
64
|
+
message += `${listParams ? ' and' : ''} for user '${userParams}'`;
|
|
65
|
+
}
|
|
66
|
+
await logger.logToStderr(`${message}...`);
|
|
67
|
+
}
|
|
68
|
+
let requestUrl = `${args.options.webUrl}/_api/web/alerts?$expand=List,User,List/Rootfolder,Item&$select=*,List/Id,List/Title,List/Rootfolder/ServerRelativeUrl,Item/ID,Item/FileRef,Item/Guid`;
|
|
69
|
+
const filters = [];
|
|
70
|
+
let listId;
|
|
71
|
+
if (args.options.listId) {
|
|
72
|
+
listId = args.options.listId;
|
|
73
|
+
}
|
|
74
|
+
else if (args.options.listUrl || args.options.listTitle) {
|
|
75
|
+
try {
|
|
76
|
+
listId = await spo.getListId(args.options.webUrl, args.options.listTitle, args.options.listUrl, logger, this.verbose);
|
|
77
|
+
}
|
|
78
|
+
catch (err) {
|
|
79
|
+
this.handleRejectedODataJsonPromise(err);
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
if (listId) {
|
|
83
|
+
filters.push(`List/Id eq guid'${formatting.encodeQueryParameter(listId)}'`);
|
|
84
|
+
}
|
|
85
|
+
if (args.options.userName) {
|
|
86
|
+
filters.push(`User/UserPrincipalName eq '${formatting.encodeQueryParameter(args.options.userName)}'`);
|
|
87
|
+
}
|
|
88
|
+
else if (args.options.userId) {
|
|
89
|
+
const userPrincipalName = await entraUser.getUpnByUserId(args.options.userId);
|
|
90
|
+
filters.push(`User/UserPrincipalName eq '${formatting.encodeQueryParameter(userPrincipalName)}'`);
|
|
91
|
+
}
|
|
92
|
+
if (filters.length > 0) {
|
|
93
|
+
requestUrl += `&$filter=${filters.join(' and ')}`;
|
|
94
|
+
}
|
|
95
|
+
try {
|
|
96
|
+
const res = await odata.getAllItems(requestUrl);
|
|
97
|
+
res.forEach(alert => {
|
|
98
|
+
if (alert.Item) {
|
|
99
|
+
delete alert.Item['ID'];
|
|
100
|
+
}
|
|
101
|
+
if (cli.shouldTrimOutput(args.options.output)) {
|
|
102
|
+
alert.UserPrincipalName = alert.User?.UserPrincipalName;
|
|
103
|
+
}
|
|
104
|
+
});
|
|
105
|
+
await logger.log(res);
|
|
106
|
+
}
|
|
107
|
+
catch (err) {
|
|
108
|
+
this.handleRejectedODataJsonPromise(err);
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
export default new SpoWebRuleListCommand();
|
|
113
|
+
//# sourceMappingURL=web-rule-list.js.map
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { cli } from '../../../../cli/cli.js';
|
|
3
|
+
import { globalOptionsZod } from '../../../../Command.js';
|
|
4
|
+
import request from '../../../../request.js';
|
|
5
|
+
import { formatting } from '../../../../utils/formatting.js';
|
|
6
|
+
import { validation } from '../../../../utils/validation.js';
|
|
7
|
+
import SpoCommand from '../../../base/SpoCommand.js';
|
|
8
|
+
import commands from '../../commands.js';
|
|
9
|
+
const options = z.strictObject({
|
|
10
|
+
...globalOptionsZod.shape,
|
|
11
|
+
webUrl: z.string().alias('u')
|
|
12
|
+
.refine(url => validation.isValidSharePointUrl(url) === true, {
|
|
13
|
+
error: e => `'${e.input}' is not a valid SharePoint URL.`
|
|
14
|
+
}),
|
|
15
|
+
id: z.uuid(),
|
|
16
|
+
force: z.boolean().optional().alias('f')
|
|
17
|
+
});
|
|
18
|
+
class SpoWebRuleRemoveCommand extends SpoCommand {
|
|
19
|
+
get name() {
|
|
20
|
+
return commands.WEB_RULE_REMOVE;
|
|
21
|
+
}
|
|
22
|
+
get description() {
|
|
23
|
+
return 'Removes an alert from a SharePoint list';
|
|
24
|
+
}
|
|
25
|
+
get schema() {
|
|
26
|
+
return options;
|
|
27
|
+
}
|
|
28
|
+
async commandAction(logger, args) {
|
|
29
|
+
if (!args.options.force) {
|
|
30
|
+
const result = await cli.promptForConfirmation({ message: `Are you sure you want to remove the alert with id '${args.options.id}' from site '${args.options.webUrl}'?` });
|
|
31
|
+
if (!result) {
|
|
32
|
+
return;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
try {
|
|
36
|
+
if (this.verbose) {
|
|
37
|
+
await logger.logToStderr(`Removing alert with ID '${args.options.id}' from site '${args.options.webUrl}'...`);
|
|
38
|
+
}
|
|
39
|
+
const requestOptions = {
|
|
40
|
+
url: `${args.options.webUrl}/_api/web/Alerts/DeleteAlert('${formatting.encodeQueryParameter(args.options.id)}')`,
|
|
41
|
+
headers: {
|
|
42
|
+
accept: 'application/json;odata=nometadata'
|
|
43
|
+
},
|
|
44
|
+
responseType: 'json'
|
|
45
|
+
};
|
|
46
|
+
await request.delete(requestOptions);
|
|
47
|
+
}
|
|
48
|
+
catch (err) {
|
|
49
|
+
this.handleRejectedODataJsonPromise(err);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
export default new SpoWebRuleRemoveCommand();
|
|
54
|
+
//# sourceMappingURL=web-rule-remove.js.map
|
|
@@ -377,6 +377,9 @@ export default {
|
|
|
377
377
|
WEB_ROLEASSIGNMENT_ADD: `${prefix} web roleassignment add`,
|
|
378
378
|
WEB_ROLEINHERITANCE_BREAK: `${prefix} web roleinheritance break`,
|
|
379
379
|
WEB_ROLEINHERITANCE_RESET: `${prefix} web roleinheritance reset`,
|
|
380
|
+
WEB_RULE_GET: `${prefix} web rule get`,
|
|
381
|
+
WEB_RULE_LIST: `${prefix} web rule list`,
|
|
382
|
+
WEB_RULE_REMOVE: `${prefix} web rule remove`,
|
|
380
383
|
WEB_SET: `${prefix} web set`
|
|
381
384
|
};
|
|
382
385
|
//# sourceMappingURL=commands.js.map
|
|
@@ -69,27 +69,35 @@ m365 spo navigation node list --webUrl https://contoso.sharepoint.com/sites/Mark
|
|
|
69
69
|
"5786b8e8-c495-4734-b345-756733960730"
|
|
70
70
|
],
|
|
71
71
|
"CurrentLCID": 1033,
|
|
72
|
-
"
|
|
73
|
-
"
|
|
74
|
-
"
|
|
75
|
-
"
|
|
76
|
-
"
|
|
77
|
-
"
|
|
78
|
-
"
|
|
79
|
-
"Children": [
|
|
72
|
+
"CustomProperties": [],
|
|
73
|
+
"FriendlyUrlSegment": "",
|
|
74
|
+
"IsDeleted": false,
|
|
75
|
+
"IsHidden": false,
|
|
76
|
+
"IsTitleForExistingLanguage": false,
|
|
77
|
+
"Key": "2032",
|
|
78
|
+
"Nodes": [
|
|
80
79
|
{
|
|
81
|
-
"AudienceIds":
|
|
80
|
+
"AudienceIds": [],
|
|
82
81
|
"CurrentLCID": 1033,
|
|
83
|
-
"
|
|
84
|
-
"
|
|
85
|
-
"
|
|
86
|
-
"
|
|
87
|
-
"
|
|
82
|
+
"CustomProperties": [],
|
|
83
|
+
"FriendlyUrlSegment": "",
|
|
84
|
+
"IsDeleted": false,
|
|
85
|
+
"IsHidden": false,
|
|
86
|
+
"IsTitleForExistingLanguage": false,
|
|
87
|
+
"Key": "2033",
|
|
88
|
+
"Nodes": [],
|
|
89
|
+
"NodeType": 0,
|
|
90
|
+
"OpenInNewWindow": true,
|
|
91
|
+
"SimpleUrl": "https://microsoft365.com",
|
|
88
92
|
"Title": "Microsoft 365",
|
|
89
|
-
"
|
|
90
|
-
"Children": []
|
|
93
|
+
"Translations": []
|
|
91
94
|
}
|
|
92
|
-
]
|
|
95
|
+
],
|
|
96
|
+
"NodeType": 0,
|
|
97
|
+
"OpenInNewWindow": false,
|
|
98
|
+
"SimpleUrl": "https://contoso.sharepoint.com",
|
|
99
|
+
"Title": "Navigation Link",
|
|
100
|
+
"Translations": []
|
|
93
101
|
}
|
|
94
102
|
]
|
|
95
103
|
```
|
|
@@ -98,7 +106,7 @@ m365 spo navigation node list --webUrl https://contoso.sharepoint.com/sites/Mark
|
|
|
98
106
|
<TabItem value="Text">
|
|
99
107
|
|
|
100
108
|
```text
|
|
101
|
-
|
|
109
|
+
Key Title SimpleUrl
|
|
102
110
|
---- --------------- ------------------------------
|
|
103
111
|
2032 Navigation Link https://contoso.sharepoint.com
|
|
104
112
|
```
|
|
@@ -107,8 +115,8 @@ m365 spo navigation node list --webUrl https://contoso.sharepoint.com/sites/Mark
|
|
|
107
115
|
<TabItem value="CSV">
|
|
108
116
|
|
|
109
117
|
```csv
|
|
110
|
-
|
|
111
|
-
2032,
|
|
118
|
+
CurrentLCID,FriendlyUrlSegment,IsDeleted,IsHidden,IsTitleForExistingLanguage,Key,NodeType,OpenInNewWindow,SimpleUrl,Title
|
|
119
|
+
1033,,0,0,0,2032,0,0,https://contoso.sharepoint.com,Navigation Link
|
|
112
120
|
```
|
|
113
121
|
|
|
114
122
|
</TabItem>
|
|
@@ -119,18 +127,20 @@ m365 spo navigation node list --webUrl https://contoso.sharepoint.com/sites/Mark
|
|
|
119
127
|
|
|
120
128
|
Date: 27/1/2023
|
|
121
129
|
|
|
122
|
-
##
|
|
130
|
+
## Navigation Link
|
|
123
131
|
|
|
124
132
|
Property | Value
|
|
125
133
|
---------|-------
|
|
126
134
|
CurrentLCID | 1033
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
135
|
+
FriendlyUrlSegment |
|
|
136
|
+
IsDeleted | false
|
|
137
|
+
IsHidden | false
|
|
138
|
+
IsTitleForExistingLanguage | false
|
|
139
|
+
Key | 2032
|
|
140
|
+
NodeType | 0
|
|
141
|
+
OpenInNewWindow | false
|
|
142
|
+
SimpleUrl | https://contoso.sharepoint.com
|
|
132
143
|
Title | Navigation Link
|
|
133
|
-
Url | https://contoso.sharepoint.com
|
|
134
144
|
```
|
|
135
145
|
|
|
136
146
|
</TabItem>
|
|
@@ -19,9 +19,6 @@ m365 spo site remove [options]
|
|
|
19
19
|
`--permanent`
|
|
20
20
|
: Permanently remove the site without leaving it in the recycle bin.
|
|
21
21
|
|
|
22
|
-
`--skipRecycleBin`
|
|
23
|
-
: Deprecated: use `--permanent` instead.
|
|
24
|
-
|
|
25
22
|
`--fromRecycleBin`
|
|
26
23
|
: Set to remove the site from the recycle bin.
|
|
27
24
|
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import Global from '../../_global.mdx';
|
|
2
|
+
import Tabs from '@theme/Tabs';
|
|
3
|
+
import TabItem from '@theme/TabItem';
|
|
4
|
+
|
|
5
|
+
# spo web rule get
|
|
6
|
+
|
|
7
|
+
Retrieves information about a specific alert from a SharePoint list
|
|
8
|
+
|
|
9
|
+
## Usage
|
|
10
|
+
|
|
11
|
+
```sh
|
|
12
|
+
m365 spo web rule get [options]
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Options
|
|
16
|
+
|
|
17
|
+
```md definition-list
|
|
18
|
+
`-u, --webUrl <webUrl>`
|
|
19
|
+
: The URL of the SharePoint site.
|
|
20
|
+
|
|
21
|
+
`--id <id>`
|
|
22
|
+
: The ID of the rule.
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
<Global />
|
|
26
|
+
|
|
27
|
+
## Permissions
|
|
28
|
+
|
|
29
|
+
<Tabs>
|
|
30
|
+
<TabItem value="Delegated">
|
|
31
|
+
|
|
32
|
+
| Resource | Permissions |
|
|
33
|
+
|-----------------|----------------------|
|
|
34
|
+
| SharePoint | AllSites.FullControl |
|
|
35
|
+
| Microsoft Graph | User.ReadBasic.All |
|
|
36
|
+
|
|
37
|
+
</TabItem>
|
|
38
|
+
<TabItem value="Application">
|
|
39
|
+
|
|
40
|
+
| Resource | Permissions |
|
|
41
|
+
|-----------------|-----------------------|
|
|
42
|
+
| SharePoint | Sites.FullControl.All |
|
|
43
|
+
| Microsoft Graph | User.ReadBasic.All |
|
|
44
|
+
|
|
45
|
+
</TabItem>
|
|
46
|
+
</Tabs>
|
|
47
|
+
|
|
48
|
+
## Examples
|
|
49
|
+
|
|
50
|
+
Retrieve a rule by ID
|
|
51
|
+
|
|
52
|
+
```sh
|
|
53
|
+
m365 spo web rule get --webUrl https://contoso.sharepoint.com/sites/Marketing --id 7cbb4c8d-8e4d-4d2e-9c6f-3f1d8b2e6a0e
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
## Response
|
|
57
|
+
|
|
58
|
+
<Tabs>
|
|
59
|
+
<TabItem value="JSON">
|
|
60
|
+
|
|
61
|
+
```json
|
|
62
|
+
{
|
|
63
|
+
"AlertFrequency": 0,
|
|
64
|
+
"AlertTemplateName": "SPAlertTemplateType.DocumentLibrary",
|
|
65
|
+
"AlertType": 0,
|
|
66
|
+
"AlwaysNotify": false,
|
|
67
|
+
"DeliveryChannels": 1,
|
|
68
|
+
"EventType": -1,
|
|
69
|
+
"Filter": "",
|
|
70
|
+
"ID": "7cbb4c8d-8e4d-4d2e-9c6f-3f1d8b2e6a0e",
|
|
71
|
+
"Status": 0,
|
|
72
|
+
"Title": "Marketing documents",
|
|
73
|
+
"UserId": 8,
|
|
74
|
+
"List": {
|
|
75
|
+
"Id": "39d9e102-9e8f-4e74-8f17-84a92f972fcf",
|
|
76
|
+
"Title": "Documents",
|
|
77
|
+
"RootFolder": {
|
|
78
|
+
"ServerRelativeUrl": "/sites/Marketing/Shared Documents"
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
"User": {
|
|
82
|
+
"Id": 8,
|
|
83
|
+
"UserPrincipalName": "jane.doe@contoso.com"
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
</TabItem>
|
|
89
|
+
<TabItem value="Text">
|
|
90
|
+
|
|
91
|
+
```text
|
|
92
|
+
AlertFrequency : 0
|
|
93
|
+
AlertTemplateName: SPAlertTemplateType.DocumentLibrary
|
|
94
|
+
AlertType : 0
|
|
95
|
+
AlwaysNotify : false
|
|
96
|
+
DeliveryChannels : 1
|
|
97
|
+
EventType : -1
|
|
98
|
+
Filter :
|
|
99
|
+
ID : 7cbb4c8d-8e4d-4d2e-9c6f-3f1d8b2e6a0e
|
|
100
|
+
Status : 0
|
|
101
|
+
Title : Marketing documents
|
|
102
|
+
UserId : 8
|
|
103
|
+
List : {"Id":"39d9e102-9e8f-4e74-8f17-84a92f972fcf","Title":"Documents","RootFolder":{"ServerRelativeUrl":"/sites/Marketing/Shared Documents"}}
|
|
104
|
+
User : {"Id":8,"UserPrincipalName":"jane.doe@contoso.com"}
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
</TabItem>
|
|
108
|
+
</Tabs>
|