@pnp/cli-microsoft365 11.10.0-beta.6474466 → 11.10.0-beta.fdeb2ae
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/pp/commands/website/Webrole.js +2 -0
- package/dist/m365/pp/commands/website/website-remove.js +80 -0
- package/dist/m365/pp/commands/website/website-webrole-list.js +61 -0
- package/dist/m365/pp/commands.js +3 -1
- package/dist/utils/powerPlatform.js +20 -0
- package/docs/docs/cmd/pp/website/website-remove.mdx +89 -0
- package/docs/docs/cmd/pp/website/website-webrole-list.mdx +139 -0
- package/docs/docs/cmd/spo/field/field-add.mdx +19 -0
- package/docs/docs/cmd/spo/field/field-get.mdx +19 -0
- package/docs/docs/cmd/spo/field/field-list.mdx +19 -0
- package/docs/docs/cmd/spo/field/field-remove.mdx +21 -0
- package/docs/docs/cmd/spo/field/field-set.mdx +21 -0
- package/package.json +1 -1
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { globalOptionsZod } from '../../../../Command.js';
|
|
2
|
+
import { powerPlatform } from '../../../../utils/powerPlatform.js';
|
|
3
|
+
import { validation } from '../../../../utils/validation.js';
|
|
4
|
+
import PowerPlatformCommand from '../../../base/PowerPlatformCommand.js';
|
|
5
|
+
import commands from '../../commands.js';
|
|
6
|
+
import { z } from 'zod';
|
|
7
|
+
import request from '../../../../request.js';
|
|
8
|
+
import { cli } from '../../../../cli/cli.js';
|
|
9
|
+
export const options = z.strictObject({
|
|
10
|
+
...globalOptionsZod.shape,
|
|
11
|
+
url: z.string().optional()
|
|
12
|
+
.refine(url => url === undefined || validation.isValidPowerPagesUrl(url) === true, {
|
|
13
|
+
error: e => `'${e.input}' is not a valid Power Pages URL.`
|
|
14
|
+
})
|
|
15
|
+
.alias('u'),
|
|
16
|
+
id: z.uuid().optional().alias('i'),
|
|
17
|
+
name: z.string().optional().alias('n'),
|
|
18
|
+
environmentName: z.string().alias('e'),
|
|
19
|
+
force: z.boolean().optional().alias('f')
|
|
20
|
+
});
|
|
21
|
+
class PpWebSiteRemoveCommand extends PowerPlatformCommand {
|
|
22
|
+
get name() {
|
|
23
|
+
return commands.WEBSITE_REMOVE;
|
|
24
|
+
}
|
|
25
|
+
get description() {
|
|
26
|
+
return 'Removes the specified Power Pages website from the list of active sites.';
|
|
27
|
+
}
|
|
28
|
+
get schema() {
|
|
29
|
+
return options;
|
|
30
|
+
}
|
|
31
|
+
getRefinedSchema(schema) {
|
|
32
|
+
return schema
|
|
33
|
+
.refine(options => [options.url, options.id, options.name].filter(x => x !== undefined).length === 1, {
|
|
34
|
+
error: `Specify either url, id or name, but not multiple.`
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
async commandAction(logger, args) {
|
|
38
|
+
if (args.options.verbose) {
|
|
39
|
+
await logger.logToStderr(`Removing website '${args.options.id || args.options.name || args.options.url}'...`);
|
|
40
|
+
}
|
|
41
|
+
if (args.options.force) {
|
|
42
|
+
await this.deleteWebsite(args);
|
|
43
|
+
}
|
|
44
|
+
else {
|
|
45
|
+
const result = await cli.promptForConfirmation({ message: `Are you sure you want to remove website '${args.options.id || args.options.name || args.options.url}'?` });
|
|
46
|
+
if (result) {
|
|
47
|
+
await this.deleteWebsite(args);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
async getWebsiteId(args) {
|
|
52
|
+
if (args.options.id) {
|
|
53
|
+
return args.options.id;
|
|
54
|
+
}
|
|
55
|
+
if (args.options.name) {
|
|
56
|
+
const website = await powerPlatform.getWebsiteByName(args.options.environmentName, args.options.name);
|
|
57
|
+
return website.id;
|
|
58
|
+
}
|
|
59
|
+
const website = await powerPlatform.getWebsiteByUrl(args.options.environmentName, args.options.url);
|
|
60
|
+
return website.id;
|
|
61
|
+
}
|
|
62
|
+
async deleteWebsite(args) {
|
|
63
|
+
try {
|
|
64
|
+
const websiteId = await this.getWebsiteId(args);
|
|
65
|
+
const requestOptions = {
|
|
66
|
+
url: `https://api.powerplatform.com/powerpages/environments/${args.options.environmentName}/websites/${websiteId}?api-version=2022-03-01-preview`,
|
|
67
|
+
headers: {
|
|
68
|
+
accept: 'application/json;odata.metadata=none'
|
|
69
|
+
},
|
|
70
|
+
responseType: 'json'
|
|
71
|
+
};
|
|
72
|
+
await request.delete(requestOptions);
|
|
73
|
+
}
|
|
74
|
+
catch (err) {
|
|
75
|
+
this.handleRejectedODataJsonPromise(err);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
export default new PpWebSiteRemoveCommand();
|
|
80
|
+
//# sourceMappingURL=website-remove.js.map
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { globalOptionsZod } from '../../../../Command.js';
|
|
2
|
+
import { powerPlatform } from '../../../../utils/powerPlatform.js';
|
|
3
|
+
import PowerPlatformCommand from '../../../base/PowerPlatformCommand.js';
|
|
4
|
+
import commands from '../../commands.js';
|
|
5
|
+
import { odata } from '../../../../utils/odata.js';
|
|
6
|
+
import { z } from 'zod';
|
|
7
|
+
export const options = z.strictObject({
|
|
8
|
+
...globalOptionsZod.shape,
|
|
9
|
+
websiteId: z.uuid().optional(),
|
|
10
|
+
websiteName: z.string().optional(),
|
|
11
|
+
environmentName: z.string().alias('e'),
|
|
12
|
+
asAdmin: z.boolean().optional()
|
|
13
|
+
});
|
|
14
|
+
class PpWebSiteWebRoleListCommand extends PowerPlatformCommand {
|
|
15
|
+
get name() {
|
|
16
|
+
return commands.WEBSITE_WEBROLE_LIST;
|
|
17
|
+
}
|
|
18
|
+
get description() {
|
|
19
|
+
return 'Lists all webroles for the specified Power Pages website.';
|
|
20
|
+
}
|
|
21
|
+
get schema() {
|
|
22
|
+
return options;
|
|
23
|
+
}
|
|
24
|
+
defaultProperties() {
|
|
25
|
+
return ['mspp_webroleid', 'mspp_name', 'statuscode'];
|
|
26
|
+
}
|
|
27
|
+
getRefinedSchema(schema) {
|
|
28
|
+
return schema
|
|
29
|
+
.refine(options => [options.websiteId, options.websiteName].filter(x => x !== undefined).length === 1, {
|
|
30
|
+
error: `Specify either websiteId or websiteName, but not both.`
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
async commandAction(logger, args) {
|
|
34
|
+
if (this.verbose) {
|
|
35
|
+
await logger.logToStderr(`Retrieving the webroles for '${args.options.websiteId || args.options.websiteName}'...`);
|
|
36
|
+
}
|
|
37
|
+
try {
|
|
38
|
+
const dynamicsApiUrl = await powerPlatform.getDynamicsInstanceApiUrl(args.options.environmentName, args.options.asAdmin);
|
|
39
|
+
const websiteRecordId = await this.getWebsiteRecordId(args, dynamicsApiUrl);
|
|
40
|
+
const roles = await this.getWebsiteRoles(dynamicsApiUrl, websiteRecordId);
|
|
41
|
+
await logger.log(roles);
|
|
42
|
+
}
|
|
43
|
+
catch (err) {
|
|
44
|
+
this.handleRejectedODataJsonPromise(err);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
async getWebsiteRecordId(args, dynamicsApiUrl) {
|
|
48
|
+
if (args.options.websiteId) {
|
|
49
|
+
const website = await powerPlatform.getWebsiteById(args.options.environmentName, args.options.websiteId);
|
|
50
|
+
return website.websiteRecordId;
|
|
51
|
+
}
|
|
52
|
+
return powerPlatform.getWebsiteIdByUniqueName(dynamicsApiUrl, args.options.websiteName);
|
|
53
|
+
}
|
|
54
|
+
async getWebsiteRoles(dynamicsApiUrl, websiteId) {
|
|
55
|
+
const requestUrl = `${dynamicsApiUrl}/api/data/v9.2/mspp_webroles?$filter=_mspp_websiteid_value eq ${websiteId}`;
|
|
56
|
+
const result = await odata.getAllItems(requestUrl);
|
|
57
|
+
return result;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
export default new PpWebSiteWebRoleListCommand();
|
|
61
|
+
//# sourceMappingURL=website-webrole-list.js.map
|
package/dist/m365/pp/commands.js
CHANGED
|
@@ -27,6 +27,8 @@ export default {
|
|
|
27
27
|
SOLUTION_PUBLISHER_REMOVE: `${prefix} solution publisher remove`,
|
|
28
28
|
TENANT_SETTINGS_LIST: `${prefix} tenant settings list`,
|
|
29
29
|
TENANT_SETTINGS_SET: `${prefix} tenant settings set`,
|
|
30
|
-
WEBSITE_GET: `${prefix} website get
|
|
30
|
+
WEBSITE_GET: `${prefix} website get`,
|
|
31
|
+
WEBSITE_REMOVE: `${prefix} website remove`,
|
|
32
|
+
WEBSITE_WEBROLE_LIST: `${prefix} website webrole list`
|
|
31
33
|
};
|
|
32
34
|
//# sourceMappingURL=commands.js.map
|
|
@@ -63,6 +63,26 @@ export const powerPlatform = {
|
|
|
63
63
|
}
|
|
64
64
|
return items[0];
|
|
65
65
|
},
|
|
66
|
+
/**
|
|
67
|
+
* Get a website record ID by unique name
|
|
68
|
+
* Returns the powerpagesiteid of the website
|
|
69
|
+
* @param dynamicsApiUrl The dynamics api url of the environment
|
|
70
|
+
* @param websiteUniqueName The unique name of the Power Pages website
|
|
71
|
+
*/
|
|
72
|
+
async getWebsiteIdByUniqueName(dynamicsApiUrl, websiteUniqueName) {
|
|
73
|
+
const requestOptions = {
|
|
74
|
+
url: `${dynamicsApiUrl}/api/data/v9.2/powerpagesites?$filter=name eq '${websiteUniqueName}'`,
|
|
75
|
+
headers: {
|
|
76
|
+
accept: 'application/json;odata.metadata=none'
|
|
77
|
+
},
|
|
78
|
+
responseType: 'json'
|
|
79
|
+
};
|
|
80
|
+
const result = await request.get(requestOptions);
|
|
81
|
+
if (result.value.length === 0) {
|
|
82
|
+
throw Error(`The specified website '${websiteUniqueName}' does not exist.`);
|
|
83
|
+
}
|
|
84
|
+
return result.value[0].powerpagesiteid;
|
|
85
|
+
},
|
|
66
86
|
/**
|
|
67
87
|
* Get a card by name
|
|
68
88
|
* Returns a card object
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import Global from '../../_global.mdx';
|
|
2
|
+
import Tabs from '@theme/Tabs';
|
|
3
|
+
import TabItem from '@theme/TabItem';
|
|
4
|
+
|
|
5
|
+
# pp website remove
|
|
6
|
+
|
|
7
|
+
Removes the specified Power Pages website from the list of active sites.
|
|
8
|
+
|
|
9
|
+
## Usage
|
|
10
|
+
|
|
11
|
+
```sh
|
|
12
|
+
m365 pp website remove [options]
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Options
|
|
16
|
+
|
|
17
|
+
```md definition-list
|
|
18
|
+
`-u, --url [url]`
|
|
19
|
+
: The URL of the website to remove. Specify either `url`, `name` or `id`.
|
|
20
|
+
|
|
21
|
+
`-n, --name [name]`
|
|
22
|
+
: The name of the website to remove. Specify either `url`, `name` or `id`.
|
|
23
|
+
|
|
24
|
+
`-i, --id [id]`
|
|
25
|
+
: The WebSite Id (GUID) of the website to remove. Specify either `url`, `name` or `id`.
|
|
26
|
+
|
|
27
|
+
`-e, --environmentName <environmentName>`
|
|
28
|
+
: The name of the environment from which to remove the Power Pages website.
|
|
29
|
+
|
|
30
|
+
`-f, --force`
|
|
31
|
+
: Don't prompt for confirmation
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
<Global />
|
|
35
|
+
|
|
36
|
+
## Permissions
|
|
37
|
+
|
|
38
|
+
<Tabs>
|
|
39
|
+
<TabItem value="Delegated">
|
|
40
|
+
|
|
41
|
+
| Resource | Permissions |
|
|
42
|
+
|--------------------|---------------------------|
|
|
43
|
+
| Power Platform API | PowerPages.Websites.Write |
|
|
44
|
+
|
|
45
|
+
</TabItem>
|
|
46
|
+
</Tabs>
|
|
47
|
+
|
|
48
|
+
## Examples
|
|
49
|
+
|
|
50
|
+
Remove Power Pages website by name.
|
|
51
|
+
|
|
52
|
+
```sh
|
|
53
|
+
m365 pp website remove --name Demo --environmentName Default-d87a7535-dd31-4437-bfe1-95340acd55c5
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
Remove Power Pages website by name without confirmation.
|
|
57
|
+
|
|
58
|
+
```sh
|
|
59
|
+
m365 pp website remove --name Demo --environmentName Default-d87a7535-dd31-4437-bfe1-95340acd55c5 --force
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
Remove Power Pages website by id.
|
|
63
|
+
|
|
64
|
+
```sh
|
|
65
|
+
m365 pp website remove --id 4916bb2c-91e1-4716-91d5-b6171928fac9 --environmentName Default-d87a7535-dd31-4437-bfe1-95340acd55c5
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
Remove Power Pages website by id without confirmation.
|
|
69
|
+
|
|
70
|
+
```sh
|
|
71
|
+
m365 pp website remove --id 4916bb2c-91e1-4716-91d5-b6171928fac9 --environmentName Default-d87a7535-dd31-4437-bfe1-95340acd55c5 --force
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
Remove Power Pages website by url.
|
|
75
|
+
|
|
76
|
+
```sh
|
|
77
|
+
m365 pp website remove --url https://site-0uaq9.powerappsportals.com --environmentName Default-d87a7535-dd31-4437-bfe1-95340acd55c5
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
Remove Power Pages website by url without confirmation.
|
|
81
|
+
|
|
82
|
+
```sh
|
|
83
|
+
m365 pp website remove --url https://site-0uaq9.powerappsportals.com --environmentName Default-d87a7535-dd31-4437-bfe1-95340acd55c5 --force
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
## Response
|
|
87
|
+
|
|
88
|
+
The command won't return a response on success.
|
|
89
|
+
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
import Global from '../../_global.mdx';
|
|
2
|
+
import Tabs from '@theme/Tabs';
|
|
3
|
+
import TabItem from '@theme/TabItem';
|
|
4
|
+
|
|
5
|
+
# pp website webrole list
|
|
6
|
+
|
|
7
|
+
Lists all webroles for the specified Power Pages website.
|
|
8
|
+
|
|
9
|
+
## Usage
|
|
10
|
+
|
|
11
|
+
```sh
|
|
12
|
+
m365 pp website webrole list [options]
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Options
|
|
16
|
+
|
|
17
|
+
```md definition-list
|
|
18
|
+
`--websiteId [websiteId]`
|
|
19
|
+
: ID of the Power Pages website. Specify either `websiteId` or `websiteName` but not both.
|
|
20
|
+
|
|
21
|
+
`--websiteName [websiteName]`
|
|
22
|
+
: The unique name (not the display name) of the Power Pages website. Specify either `websiteId` or `websiteName` but not both.
|
|
23
|
+
|
|
24
|
+
`-e, --environmentName <environmentName>`
|
|
25
|
+
: The name of the environment where the Power Pages websites are located.
|
|
26
|
+
|
|
27
|
+
`--asAdmin`
|
|
28
|
+
: Run the command as admin and retrieve Power Pages websites for environments you do not have explicitly assigned permissions to.
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
<Global />
|
|
32
|
+
|
|
33
|
+
## Permissions
|
|
34
|
+
|
|
35
|
+
<Tabs>
|
|
36
|
+
<TabItem value="Delegated">
|
|
37
|
+
|
|
38
|
+
| Resource | Permissions |
|
|
39
|
+
|--------------------|--------------------------|
|
|
40
|
+
| Power Platform API | PowerPages.Websites.Read |
|
|
41
|
+
| Dynamics CRM | user_impersonation |
|
|
42
|
+
|
|
43
|
+
</TabItem>
|
|
44
|
+
</Tabs>
|
|
45
|
+
|
|
46
|
+
## Examples
|
|
47
|
+
|
|
48
|
+
List all webroles for the site by name.
|
|
49
|
+
|
|
50
|
+
```sh
|
|
51
|
+
m365 pp website webrole list --websiteName "Contoso" --environmentName "Default-2ca3eaa5-140f-4175-8261-3272edf9f339"
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
List all webroles for the site by name as admin.
|
|
55
|
+
|
|
56
|
+
```sh
|
|
57
|
+
m365 pp website webrole list --websiteName "Contoso" --environmentName "Default-2ca3eaa5-140f-4175-8261-3272edf9f339" --asAdmin
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
List all webroles for the site by id.
|
|
61
|
+
|
|
62
|
+
```sh
|
|
63
|
+
m365 pp website webrole list --websiteId "2ca3eaa5-140f-4175-8261-3272edf9f339" --environmentName "Default-2ca3eaa5-140f-4175-8261-3272edf9f339"
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
List all webroles for the site by id as admin.
|
|
67
|
+
|
|
68
|
+
```sh
|
|
69
|
+
m365 pp website webrole list --websiteId "2ca3eaa5-140f-4175-8261-3272edf9f339" --environmentName "Default-2ca3eaa5-140f-4175-8261-3272edf9f339" --asAdmin
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
## Response
|
|
73
|
+
|
|
74
|
+
<Tabs>
|
|
75
|
+
<TabItem value="JSON">
|
|
76
|
+
|
|
77
|
+
```json
|
|
78
|
+
[
|
|
79
|
+
{
|
|
80
|
+
"mspp_webroleid": "a242a363-6077-4cb7-b2d1-1714502d129a",
|
|
81
|
+
"mspp_name": "Anonymous Users",
|
|
82
|
+
"mspp_description": "Role for anonymous users",
|
|
83
|
+
"mspp_key": null,
|
|
84
|
+
"mspp_authenticatedusersrole": false,
|
|
85
|
+
"mspp_anonymoususersrole": true,
|
|
86
|
+
"mspp_createdon": "2026-01-21T22:10:56Z",
|
|
87
|
+
"mspp_modifiedon": "2026-01-21T22:10:56Z",
|
|
88
|
+
"statecode": 0,
|
|
89
|
+
"statuscode": 1,
|
|
90
|
+
"_mspp_websiteid_value": "5eb107a6-5ac2-4e1c-a3b9-d5c21bbc10ce",
|
|
91
|
+
"_mspp_createdby_value": "b7aa2026-a8c1-f011-bbd2-000d3a66196e",
|
|
92
|
+
"_mspp_modifiedby_value": "b7aa2026-a8c1-f011-bbd2-000d3a66196e"
|
|
93
|
+
}
|
|
94
|
+
]
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
</TabItem>
|
|
98
|
+
<TabItem value="Text">
|
|
99
|
+
|
|
100
|
+
```text
|
|
101
|
+
mspp_webroleid mspp_name statuscode
|
|
102
|
+
------------------------------------ --------------- ----------
|
|
103
|
+
a242a363-6077-4cb7-b2d1-1714502d129a Anonymous Users 1
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
</TabItem>
|
|
107
|
+
<TabItem value="CSV">
|
|
108
|
+
|
|
109
|
+
```csv
|
|
110
|
+
mspp_modifiedon,mspp_key,mspp_description,mspp_authenticatedusersrole,statecode,_mspp_createdby_value,statuscode,mspp_anonymoususersrole,mspp_webroleid,mspp_createdon,_mspp_modifiedby_value,mspp_name,_mspp_websiteid_value
|
|
111
|
+
2026-01-21T22:10:56Z,,Role for anonymous users,0,0,b7aa2026-a8c1-f011-bbd2-000d3a66196e,1,1,a242a363-6077-4cb7-b2d1-1714502d129a,2026-01-21T22:10:56Z,b7aa2026-a8c1-f011-bbd2-000d3a66196e,Anonymous Users,5eb107a6-5ac2-4e1c-a3b9-d5c21bbc10ce
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
</TabItem>
|
|
115
|
+
<TabItem value="Markdown">
|
|
116
|
+
|
|
117
|
+
```md
|
|
118
|
+
# pp website webrole list --websiteName "Contoso" --environmentName "Default-2ca3eaa5-140f-4175-8261-3272edf9f339"
|
|
119
|
+
|
|
120
|
+
Date: 2/8/2026
|
|
121
|
+
|
|
122
|
+
Property | Value
|
|
123
|
+
---------|-------
|
|
124
|
+
mspp\_modifiedon | 2026-01-21T22:10:53Z
|
|
125
|
+
mspp\_description | Role for anonymous users
|
|
126
|
+
mspp\_authenticatedusersrole | true
|
|
127
|
+
statecode | 0
|
|
128
|
+
\_mspp\_createdby\_value | b7aa2026-a8c1-f011-bbd2-000d3a66196e
|
|
129
|
+
statuscode | 1
|
|
130
|
+
mspp\_anonymoususersrole | false
|
|
131
|
+
mspp\_webroleid | cc3bf86b-204c-4a97-b0b6-f788c62ae5e8
|
|
132
|
+
mspp\_createdon | 2026-01-21T22:10:53Z
|
|
133
|
+
\_mspp\_modifiedby\_value | b7aa2026-a8c1-f011-bbd2-000d3a66196e
|
|
134
|
+
mspp\_name | Authenticated Users
|
|
135
|
+
\_mspp\_websiteid\_value | 5eb107a6-5ac2-4e1c-a3b9-d5c21bbc10ce
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
</TabItem>
|
|
139
|
+
</Tabs>
|
|
@@ -40,6 +40,25 @@ m365 spo field add [options]
|
|
|
40
40
|
|
|
41
41
|
If the specified field already exists, you will get a _A duplicate field name "your-field" was found._ error.
|
|
42
42
|
|
|
43
|
+
## Permissions
|
|
44
|
+
|
|
45
|
+
<Tabs>
|
|
46
|
+
<TabItem value="Delegated">
|
|
47
|
+
|
|
48
|
+
| Resource | Permissions |
|
|
49
|
+
|------------|----------------|
|
|
50
|
+
| SharePoint | AllSites.Write |
|
|
51
|
+
|
|
52
|
+
</TabItem>
|
|
53
|
+
<TabItem value="Application">
|
|
54
|
+
|
|
55
|
+
| Resource | Permissions |
|
|
56
|
+
|------------|---------------------|
|
|
57
|
+
| SharePoint | Sites.ReadWrite.All |
|
|
58
|
+
|
|
59
|
+
</TabItem>
|
|
60
|
+
</Tabs>
|
|
61
|
+
|
|
43
62
|
## Examples
|
|
44
63
|
|
|
45
64
|
Create a date time site column.
|
|
@@ -39,6 +39,25 @@ m365 spo field get [options]
|
|
|
39
39
|
|
|
40
40
|
<Global />
|
|
41
41
|
|
|
42
|
+
## Permissions
|
|
43
|
+
|
|
44
|
+
<Tabs>
|
|
45
|
+
<TabItem value="Delegated">
|
|
46
|
+
|
|
47
|
+
| Resource | Permissions |
|
|
48
|
+
|------------|---------------|
|
|
49
|
+
| SharePoint | AllSites.Read |
|
|
50
|
+
|
|
51
|
+
</TabItem>
|
|
52
|
+
<TabItem value="Application">
|
|
53
|
+
|
|
54
|
+
| Resource | Permissions |
|
|
55
|
+
|------------|----------------|
|
|
56
|
+
| SharePoint | Sites.Read.All |
|
|
57
|
+
|
|
58
|
+
</TabItem>
|
|
59
|
+
</Tabs>
|
|
60
|
+
|
|
42
61
|
## Examples
|
|
43
62
|
|
|
44
63
|
Retrieves site column by id located in the specified site.
|
|
@@ -30,6 +30,25 @@ m365 spo field list [options]
|
|
|
30
30
|
|
|
31
31
|
<Global />
|
|
32
32
|
|
|
33
|
+
## Permissions
|
|
34
|
+
|
|
35
|
+
<Tabs>
|
|
36
|
+
<TabItem value="Delegated">
|
|
37
|
+
|
|
38
|
+
| Resource | Permissions |
|
|
39
|
+
|------------|---------------|
|
|
40
|
+
| SharePoint | AllSites.Read |
|
|
41
|
+
|
|
42
|
+
</TabItem>
|
|
43
|
+
<TabItem value="Application">
|
|
44
|
+
|
|
45
|
+
| Resource | Permissions |
|
|
46
|
+
|------------|----------------|
|
|
47
|
+
| SharePoint | Sites.Read.All |
|
|
48
|
+
|
|
49
|
+
</TabItem>
|
|
50
|
+
</Tabs>
|
|
51
|
+
|
|
33
52
|
## Examples
|
|
34
53
|
|
|
35
54
|
Retrieves site columns for the specified site.
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import Global from '../../_global.mdx';
|
|
2
|
+
import Tabs from '@theme/Tabs';
|
|
3
|
+
import TabItem from '@theme/TabItem';
|
|
2
4
|
|
|
3
5
|
# spo field remove
|
|
4
6
|
|
|
@@ -43,6 +45,25 @@ m365 spo field remove [options]
|
|
|
43
45
|
|
|
44
46
|
<Global />
|
|
45
47
|
|
|
48
|
+
## Permissions
|
|
49
|
+
|
|
50
|
+
<Tabs>
|
|
51
|
+
<TabItem value="Delegated">
|
|
52
|
+
|
|
53
|
+
| Resource | Permissions |
|
|
54
|
+
|------------|----------------|
|
|
55
|
+
| SharePoint | AllSites.Write |
|
|
56
|
+
|
|
57
|
+
</TabItem>
|
|
58
|
+
<TabItem value="Application">
|
|
59
|
+
|
|
60
|
+
| Resource | Permissions |
|
|
61
|
+
|------------|---------------------|
|
|
62
|
+
| SharePoint | Sites.ReadWrite.All |
|
|
63
|
+
|
|
64
|
+
</TabItem>
|
|
65
|
+
</Tabs>
|
|
66
|
+
|
|
46
67
|
## Examples
|
|
47
68
|
|
|
48
69
|
Remove the site column with the specified ID, located in the specified site.
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import Global from '../../_global.mdx';
|
|
2
|
+
import Tabs from '@theme/Tabs';
|
|
3
|
+
import TabItem from '@theme/TabItem';
|
|
2
4
|
|
|
3
5
|
# spo field set
|
|
4
6
|
|
|
@@ -50,6 +52,25 @@ When updating column formatting for a field with the `--CustomFormatter` option,
|
|
|
50
52
|
|
|
51
53
|
:::
|
|
52
54
|
|
|
55
|
+
## Permissions
|
|
56
|
+
|
|
57
|
+
<Tabs>
|
|
58
|
+
<TabItem value="Delegated">
|
|
59
|
+
|
|
60
|
+
| Resource | Permissions |
|
|
61
|
+
|------------|-----------------|
|
|
62
|
+
| SharePoint | AllSites.Manage |
|
|
63
|
+
|
|
64
|
+
</TabItem>
|
|
65
|
+
<TabItem value="Application">
|
|
66
|
+
|
|
67
|
+
| Resource | Permissions |
|
|
68
|
+
|------------|------------------|
|
|
69
|
+
| SharePoint | Sites.Manage.All |
|
|
70
|
+
|
|
71
|
+
</TabItem>
|
|
72
|
+
</Tabs>
|
|
73
|
+
|
|
53
74
|
## Examples
|
|
54
75
|
|
|
55
76
|
Update the title of the site column specified by its internal name and push changes to existing lists.
|
package/package.json
CHANGED