@pnp/cli-microsoft365 10.3.0-beta.cd20f0c → 10.3.0-beta.ea113b7
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/README.md +11 -6
- package/allCommands.json +1 -1
- package/allCommandsFull.json +1 -1
- package/dist/m365/commands/login.js +6 -6
- package/dist/m365/entra/commands/approleassignment/approleassignment-remove.js +1 -1
- package/dist/m365/entra/commands/group/group-list.js +3 -2
- package/dist/m365/entra/commands/pim/pim-role-assignment-remove.js +186 -0
- package/dist/m365/entra/commands.js +1 -0
- package/dist/m365/exo/commands/approleassignment/approleassignment-add.js +235 -0
- package/dist/m365/exo/commands.js +5 -0
- package/dist/m365/pp/commands/website/website-get.js +60 -0
- package/dist/m365/pp/commands.js +2 -1
- package/dist/m365/spo/commands/file/file-roleassignment-add.js +26 -2
- package/dist/m365/spo/commands/file/file-roleassignment-remove.js +26 -2
- package/dist/m365/spo/commands/folder/folder-roleassignment-add.js +27 -24
- package/dist/m365/spo/commands/folder/folder-roleassignment-remove.js +24 -7
- package/dist/m365/spo/commands/list/list-defaultvalue-list.js +140 -0
- package/dist/m365/spo/commands/listitem/listitem-roleassignment-add.js +25 -7
- package/dist/m365/spo/commands/listitem/listitem-roleassignment-remove.js +22 -5
- package/dist/m365/spo/commands/web/web-roleassignment-add.js +22 -5
- package/dist/m365/spo/commands/web/web-roleassignment-remove.js +22 -5
- package/dist/m365/spo/commands.js +1 -0
- package/dist/utils/customAppScope.js +29 -0
- package/dist/utils/entraServicePrincipal.js +46 -0
- package/dist/utils/powerPlatform.js +38 -0
- package/dist/utils/roleDefinition.js +23 -0
- package/dist/utils/validation.js +4 -0
- package/docs/docs/cmd/entra/pim/pim-role-assignment-remove.mdx +197 -0
- package/docs/docs/cmd/exo/approleassignment/approleassignment-add.mdx +170 -0
- package/docs/docs/cmd/pp/website/website-get.mdx +153 -0
- package/docs/docs/cmd/spo/file/file-roleassignment-add.mdx +21 -4
- package/docs/docs/cmd/spo/file/file-roleassignment-remove.mdx +21 -3
- package/docs/docs/cmd/spo/folder/folder-roleassignment-add.mdx +15 -3
- package/docs/docs/cmd/spo/folder/folder-roleassignment-remove.mdx +15 -3
- package/docs/docs/cmd/spo/list/list-defaultvalue-list.mdx +110 -0
- package/docs/docs/cmd/spo/listitem/listitem-roleassignment-add.mdx +15 -3
- package/docs/docs/cmd/spo/listitem/listitem-roleassignment-remove.mdx +17 -5
- package/docs/docs/cmd/spo/web/web-roleassignment-add.mdx +15 -3
- package/docs/docs/cmd/spo/web/web-roleassignment-remove.mdx +15 -3
- package/package.json +1 -1
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
import Global from '/docs/cmd/_global.mdx';
|
|
2
|
+
import Tabs from '@theme/Tabs';
|
|
3
|
+
import TabItem from '@theme/TabItem';
|
|
4
|
+
|
|
5
|
+
# pp website get
|
|
6
|
+
|
|
7
|
+
Gets information about the specified Power Pages website.
|
|
8
|
+
|
|
9
|
+
## Usage
|
|
10
|
+
|
|
11
|
+
```sh
|
|
12
|
+
m365 pp website get [options]
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Options
|
|
16
|
+
|
|
17
|
+
```md definition-list
|
|
18
|
+
`-u, --url [url]`
|
|
19
|
+
: The URL of the website to retrieve. Specify either `url`, `name` or `id`.
|
|
20
|
+
|
|
21
|
+
`-n, --name [name]`
|
|
22
|
+
: The name of the website to retrieve. Specify either `url`, `name` or `id`.
|
|
23
|
+
|
|
24
|
+
`-i, --id [id]`
|
|
25
|
+
: The WebSite Id (GUID) of the website to retrieve. Specify either `url`, `name` or `id`.
|
|
26
|
+
|
|
27
|
+
`-e, --environmentName <environmentName>`
|
|
28
|
+
: The name of the environment from which to retrieve the Power Pages website.
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
<Global />
|
|
32
|
+
|
|
33
|
+
## Examples
|
|
34
|
+
|
|
35
|
+
Retrieve Demo Power Pages website by name in the given environment using `name`.
|
|
36
|
+
|
|
37
|
+
```sh
|
|
38
|
+
m365 pp website get --name Demo --environmentName Default-d87a7535-dd31-4437-bfe1-95340acd55c5
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
Retrieve Demo Power Pages website by name in the given environment using `id`.
|
|
42
|
+
|
|
43
|
+
```sh
|
|
44
|
+
m365 pp website get --id 4916bb2c-91e1-4716-91d5-b6171928fac9 --environmentName Default-d87a7535-dd31-4437-bfe1-95340acd55c5
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Retrieve Demo Power Pages website by name in the given environment using `url`.
|
|
48
|
+
|
|
49
|
+
```sh
|
|
50
|
+
m365 pp website get --url https://site-0uaq9.powerappsportals.com --environmentName Default-d87a7535-dd31-4437-bfe1-95340acd55c5
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
## Response
|
|
54
|
+
|
|
55
|
+
<Tabs>
|
|
56
|
+
<TabItem value="JSON">
|
|
57
|
+
|
|
58
|
+
```json
|
|
59
|
+
{
|
|
60
|
+
"@odata.metadata": "https://api.powerplatform.com/powerpages/environments/Default-727dc1e9-3cd1-4d1f-8102-ab5c936e52f0/websites/$metadata#Websites",
|
|
61
|
+
"id": "4916bb2c-91e1-4716-91d5-b6171928fac9",
|
|
62
|
+
"name": "Site 1",
|
|
63
|
+
"createdOn": "2024-10-27T12:00:03",
|
|
64
|
+
"templateName": "DefaultPortalTemplate",
|
|
65
|
+
"websiteUrl": "https://site-0uaq9.powerappsportals.com",
|
|
66
|
+
"tenantId": "727dc1e9-3cd1-4d1f-8102-ab5c936e52f0",
|
|
67
|
+
"dataverseInstanceUrl": "https://org0cd4b2b9.crm4.dynamics.com/",
|
|
68
|
+
"environmentName": "Contoso (default)",
|
|
69
|
+
"environmentId": "Default-727dc1e9-3cd1-4d1f-8102-ab5c936e52f0",
|
|
70
|
+
"dataverseOrganizationId": "2d58aeac-74d4-4939-98d1-e05a70a655ba",
|
|
71
|
+
"selectedBaseLanguage": 1033,
|
|
72
|
+
"customHostNames": [],
|
|
73
|
+
"websiteRecordId": "5eb107a6-5ac2-4e1c-a3b9-d5c21bbc10ce",
|
|
74
|
+
"subdomain": "site-0uaq9",
|
|
75
|
+
"packageInstallStatus": "Installed",
|
|
76
|
+
"type": "Trial",
|
|
77
|
+
"trialExpiringInDays": 86,
|
|
78
|
+
"suspendedWebsiteDeletingInDays": 93,
|
|
79
|
+
"packageVersion": "9.6.9.39",
|
|
80
|
+
"isEarlyUpgradeEnabled": false,
|
|
81
|
+
"isCustomErrorEnabled": true,
|
|
82
|
+
"applicationUserAadAppId": "3f57aca7-5051-41b2-989d-26da8af7a53e",
|
|
83
|
+
"ownerId": "33469a62-c3af-4cfe-b893-854eceab96da",
|
|
84
|
+
"status": "OperationComplete",
|
|
85
|
+
"siteVisibility": "private",
|
|
86
|
+
"dataModel": "Enhanced"
|
|
87
|
+
}
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
</TabItem>
|
|
91
|
+
<TabItem value="Text">
|
|
92
|
+
|
|
93
|
+
```text
|
|
94
|
+
id : 4916bb2c-91e1-4716-91d5-b6171928fac9
|
|
95
|
+
name : Site 1
|
|
96
|
+
siteVisibility: private
|
|
97
|
+
status : OperationComplete
|
|
98
|
+
subdomain : site-0uaq9
|
|
99
|
+
tenantId : 727dc1e9-3cd1-4d1f-8102-ab5c936e52f0
|
|
100
|
+
type : Trial
|
|
101
|
+
websiteUrl : https://site-0uaq9.powerappsportals.com
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
</TabItem>
|
|
105
|
+
<TabItem value="CSV">
|
|
106
|
+
|
|
107
|
+
```csv
|
|
108
|
+
@odata.metadata,id,name,createdOn,templateName,websiteUrl,tenantId,dataverseInstanceUrl,environmentName,environmentId,dataverseOrganizationId,selectedBaseLanguage,websiteRecordId,subdomain,packageInstallStatus,type,trialExpiringInDays,suspendedWebsiteDeletingInDays,packageVersion,isEarlyUpgradeEnabled,isCustomErrorEnabled,applicationUserAadAppId,ownerId,status,siteVisibility,dataModel
|
|
109
|
+
https://api.powerplatform.com/powerpages/environments/Default-727dc1e9-3cd1-4d1f-8102-ab5c936e52f0/websites/$metadata#Websites,4916bb2c-91e1-4716-91d5-b6171928fac9,Site 1,2024-10-27T12:00:03,DefaultPortalTemplate,https://site-0uaq9.powerappsportals.com,727dc1e9-3cd1-4d1f-8102-ab5c936e52f0,https://org0cd4b2b9.crm4.dynamics.com/,Contoso (default),Default-727dc1e9-3cd1-4d1f-8102-ab5c936e52f0,2d58aeac-74d4-4939-98d1-e05a70a655ba,1033,5eb107a6-5ac2-4e1c-a3b9-d5c21bbc10ce,site-0uaq9,Installed,Trial,86,93,9.6.9.39,0,1,3f57aca7-5051-41b2-989d-26da8af7a53e,33469a62-c3af-4cfe-b893-854eceab96da,OperationComplete,private,Enhanced
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
</TabItem>
|
|
113
|
+
<TabItem value="Markdown">
|
|
114
|
+
|
|
115
|
+
```md
|
|
116
|
+
# pp website get --debug "false" --verbose "false" --name "Site 1" --environmentName "Default-727dc1e9-3cd1-4d1f-8102-ab5c936e52f0"
|
|
117
|
+
|
|
118
|
+
Date: 27/10/2024
|
|
119
|
+
|
|
120
|
+
## Site 1 (4916bb2c-91e1-4716-91d5-b6171928fac9)
|
|
121
|
+
|
|
122
|
+
Property | Value
|
|
123
|
+
---------|-------
|
|
124
|
+
@odata.metadata | https://api.powerplatform.com/powerpages/environments/Default-727dc1e9-3cd1-4d1f-8102-ab5c936e52f0/websites/$metadata#Websites
|
|
125
|
+
id | 4916bb2c-91e1-4716-91d5-b6171928fac9
|
|
126
|
+
name | Site 1
|
|
127
|
+
createdOn | 2024-10-27T12:00:03
|
|
128
|
+
templateName | DefaultPortalTemplate
|
|
129
|
+
websiteUrl | https://site-0uaq9.powerappsportals.com
|
|
130
|
+
tenantId | 727dc1e9-3cd1-4d1f-8102-ab5c936e52f0
|
|
131
|
+
dataverseInstanceUrl | https://org0cd4b2b9.crm4.dynamics.com/
|
|
132
|
+
environmentName | Contoso (default)
|
|
133
|
+
environmentId | Default-727dc1e9-3cd1-4d1f-8102-ab5c936e52f0
|
|
134
|
+
dataverseOrganizationId | 2d58aeac-74d4-4939-98d1-e05a70a655ba
|
|
135
|
+
selectedBaseLanguage | 1033
|
|
136
|
+
websiteRecordId | 5eb107a6-5ac2-4e1c-a3b9-d5c21bbc10ce
|
|
137
|
+
subdomain | site-0uaq9
|
|
138
|
+
packageInstallStatus | Installed
|
|
139
|
+
type | Trial
|
|
140
|
+
trialExpiringInDays | 86
|
|
141
|
+
suspendedWebsiteDeletingInDays | 93
|
|
142
|
+
packageVersion | 9.6.9.39
|
|
143
|
+
isEarlyUpgradeEnabled | false
|
|
144
|
+
isCustomErrorEnabled | true
|
|
145
|
+
applicationUserAadAppId | 3f57aca7-5051-41b2-989d-26da8af7a53e
|
|
146
|
+
ownerId | 33469a62-c3af-4cfe-b893-854eceab96da
|
|
147
|
+
status | OperationComplete
|
|
148
|
+
siteVisibility | private
|
|
149
|
+
dataModel | Enhanced
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
</TabItem>
|
|
153
|
+
</Tabs>
|
|
@@ -26,10 +26,16 @@ m365 spo file roleassignment add [options]
|
|
|
26
26
|
: The SharePoint Id of the principal. It may be either a user id or group id to add a role assignment for. Specify either `upn`, `groupName`, or `principalId` but not multiple.
|
|
27
27
|
|
|
28
28
|
`--upn [upn]`
|
|
29
|
-
: The upn/email of user to assign role to. Specify either `upn`, `groupName`, or `principalId` but not multiple.
|
|
29
|
+
: The upn/email of user to assign role to. Specify either `upn`, `groupName`, `entraGroupId`, `entraGroupName`, or `principalId` but not multiple.
|
|
30
30
|
|
|
31
31
|
`--groupName [groupName]`
|
|
32
|
-
: The group name of the SharePoint group Specify either `upn`, `groupName`, or `principalId` but not multiple.
|
|
32
|
+
: The group name of the SharePoint group Specify either `upn`, `groupName`, `entraGroupId`, `entraGroupName`, or `principalId` but not multiple. This option is only used for SharePoint Online groups.
|
|
33
|
+
|
|
34
|
+
`--entraGroupId [entraGroupId]`
|
|
35
|
+
: ID of the Microsoft Entra group to add. Specify either `upn`, `groupName`, `entraGroupId`, `entraGroupName`, or `principalId` but not multiple.
|
|
36
|
+
|
|
37
|
+
`--entraGroupName [entraGroupName]`
|
|
38
|
+
: Display name of the Microsoft Entra group to add. Specify either `upn`, `groupName`, `entraGroupId`, `entraGroupName`, or `principalId` but not multiple.
|
|
33
39
|
|
|
34
40
|
`--roleDefinitionId [roleDefinitionId]`
|
|
35
41
|
: ID of role definition. Specify either `roleDefinitionId` or `roleDefinitionName` but not both.
|
|
@@ -54,12 +60,23 @@ Adds a role assignment to a file with a specified site-relative URL for a specif
|
|
|
54
60
|
m365 spo file roleassignment add --webUrl "https://contoso.sharepoint.com/sites/project-x" --fileUrl "Shared Documents/Test1.docx" --upn "testuser@tenant.onmicrosoft.com" --roleDefinitionName "Full Control"
|
|
55
61
|
```
|
|
56
62
|
|
|
57
|
-
Adds a role assignment to a file with a specified server-relative URL the for a specific group and a role definition name.
|
|
63
|
+
Adds a role assignment to a file with a specified server-relative URL the for a specific SharePoint Online group and a role definition name.
|
|
58
64
|
|
|
59
65
|
```sh
|
|
60
|
-
m365 spo file roleassignment add --webUrl "https://contoso.sharepoint.com/sites/project-x" --fileUrl "/sites/project-x/documents/Test1.docx" --
|
|
66
|
+
m365 spo file roleassignment add --webUrl "https://contoso.sharepoint.com/sites/project-x" --fileUrl "/sites/project-x/documents/Test1.docx" --groupName "Sales Group" --roleDefinitionName "Read"
|
|
61
67
|
```
|
|
62
68
|
|
|
69
|
+
Adds a role assignment to a file with a specified site-relative URL for a specific Entra Group Id and a role definition name.
|
|
70
|
+
|
|
71
|
+
```sh
|
|
72
|
+
m365 spo file roleassignment add --webUrl "https://contoso.sharepoint.com/sites/project-x" --fileUrl "Shared Documents/Test1.docx" --entraGroupId 3c97e01e-978d-417b-a196-b6a3e37fa873 --roleDefinitionName "Full Control"
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
Adds a role assignment to a file with a specified site-relative URL for a specific Entra Group Name and a role definition name.
|
|
76
|
+
|
|
77
|
+
```sh
|
|
78
|
+
m365 spo file roleassignment add --webUrl "https://contoso.sharepoint.com/sites/project-x" --fileUrl "Shared Documents/Test1.docx" --entraGroupName "Marketing Memebers" --roleDefinitionName "Full Control"
|
|
79
|
+
```
|
|
63
80
|
## Response
|
|
64
81
|
|
|
65
82
|
The command won't return a response on success.
|
|
@@ -23,13 +23,19 @@ m365 spo file roleassignment remove [options]
|
|
|
23
23
|
: The UniqueId (GUID) of the file. Specify either `fileUrl` or `fileId` but not both.
|
|
24
24
|
|
|
25
25
|
`--principalId [principalId]`
|
|
26
|
-
: The SharePoint Id of the principal. It may be either a user id or group id. Specify either `upn`, `groupName`, or `principalId` but not multiple.
|
|
26
|
+
: The SharePoint Id of the principal. It may be either a user id or group id. Specify either `upn`, `groupName`, `entraGroupId`, `entraGroupName`, or `principalId` but not multiple.
|
|
27
27
|
|
|
28
28
|
`--upn [upn]`
|
|
29
|
-
: The upn/email of the user. Specify either `upn`, `groupName`, or `principalId` but not multiple.
|
|
29
|
+
: The upn/email of the user. Specify either `upn`, `groupName`, `entraGroupId`, `entraGroupName`, or `principalId` but not multiple.
|
|
30
30
|
|
|
31
31
|
`--groupName [groupName]`
|
|
32
|
-
: The group name of the SharePoint group Specify either `upn`, `groupName`, or `principalId` but not multiple.
|
|
32
|
+
: The group name of the SharePoint group Specify either `upn`, `groupName`, `entraGroupId`, `entraGroupName`, or `principalId` but not multiple. This option is only used for SharePoint Online groups.
|
|
33
|
+
|
|
34
|
+
`--entraGroupId [entraGroupId]`
|
|
35
|
+
: ID of the Microsoft Entra group to remove. Specify either `upn`, `groupName`, `entraGroupId`, `entraGroupName`, or `principalId` but not multiple.
|
|
36
|
+
|
|
37
|
+
`--entraGroupName [entraGroupName]`
|
|
38
|
+
: Display name of the Microsoft Entra group to remove. Specify either `upn`, `groupName`, `entraGroupId`, `entraGroupName`, or `principalId` but not multiple.
|
|
33
39
|
|
|
34
40
|
`-f, --force`
|
|
35
41
|
: Don't prompt for confirmation.
|
|
@@ -57,6 +63,18 @@ Remove a role assignment by group name from a file by id.
|
|
|
57
63
|
m365 spo file roleassignment remove --webUrl "https://contoso.sharepoint.com/sites/contoso-sales" --fileId "b2307a39-e878-458b-bc90-03bc578531d6" --groupName "saleGroup"
|
|
58
64
|
```
|
|
59
65
|
|
|
66
|
+
Remove a role assignment by entra group id from a file by id without prompt
|
|
67
|
+
|
|
68
|
+
```sh
|
|
69
|
+
m365 spo file roleassignment remove --webUrl "https://contoso.sharepoint.com/sites/contoso-sales" --fileId "b2307a39-e878-458b-bc90-03bc578531d6" --entraGroupId 3c97e01e-978d-417b-a196-b6a3e37fa873 --force
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
Remove a role assignment by entra group name from a file by id.
|
|
73
|
+
|
|
74
|
+
```sh
|
|
75
|
+
m365 spo file roleassignment remove --webUrl "https://contoso.sharepoint.com/sites/contoso-sales" --fileId "b2307a39-e878-458b-bc90-03bc578531d6" --entraGroupName "Marketing Members"
|
|
76
|
+
```
|
|
77
|
+
|
|
60
78
|
## Response
|
|
61
79
|
|
|
62
80
|
The command won't return a response on success.
|
|
@@ -20,13 +20,19 @@ m365 spo folder roleassignment add [options]
|
|
|
20
20
|
: The server- or site-relative decoded URL of the folder.
|
|
21
21
|
|
|
22
22
|
`--principalId [principalId]`
|
|
23
|
-
: The SharePoint principal id. It may be either an user id or group id for which the role assignment will be addd. Specify either `upn`, `groupName` or `
|
|
23
|
+
: The SharePoint principal id. It may be either an user id or group id for which the role assignment will be addd. Specify either `upn`, `groupName`, `principalId`, `entraGroupId` or `entraGroupName` but not multiple.
|
|
24
24
|
|
|
25
25
|
`--upn [upn]`
|
|
26
|
-
: The upn/email of the user. Specify either `upn`, `groupName` or `
|
|
26
|
+
: The upn/email of the user. Specify either `upn`, `groupName`, `principalId`, `entraGroupId` or `entraGroupName` but not multiple.
|
|
27
27
|
|
|
28
28
|
`--groupName [groupName]`
|
|
29
|
-
: The
|
|
29
|
+
: The SharePoint group name. Specify either `upn`, `groupName`, `principalId`, `entraGroupId` or `entraGroupName` but not multiple.
|
|
30
|
+
|
|
31
|
+
`--entraGroupId [entraGroupId]`
|
|
32
|
+
: ID of the Microsoft Entra group to add. Specify either `upn`, `groupName`, `principalId`, `entraGroupId` or `entraGroupName` but not multiple.
|
|
33
|
+
|
|
34
|
+
`--entraGroupName [entraGroupName]`
|
|
35
|
+
: Display name of the Microsoft Entra group to add. Specify either `upn`, `groupName`, `principalId`, `entraGroupId` or `entraGroupName` but not multiple.
|
|
30
36
|
|
|
31
37
|
`--roleDefinitionId [roleDefinitionId]`
|
|
32
38
|
: ID of the role definition. Specify either `roleDefinitionId` or `roleDefinitionName` but not both.
|
|
@@ -63,6 +69,12 @@ Add the role assignment to the root folder based on the upn and role definition
|
|
|
63
69
|
m365 spo folder roleassignment add --webUrl "https://contoso.sharepoint.com/sites/contoso-sales" --folderUrl "/Shared Documents" --upn "test@contoso.onmicrosoft.com" --roleDefinitionName "Edit"
|
|
64
70
|
```
|
|
65
71
|
|
|
72
|
+
Add the role assignment to the specified folder based on the Entra Group Id and role definition id.
|
|
73
|
+
|
|
74
|
+
```sh
|
|
75
|
+
m365 spo folder roleassignment add --webUrl "https://contoso.sharepoint.com/sites/contoso-sales" --folderUrl "/Shared Documents/FolderPermission" --entraGroupId "27ae47f1-48f1-46f3-980b-d3c1470e398d" --roleDefinitionId 1073741827
|
|
76
|
+
```
|
|
77
|
+
|
|
66
78
|
## Response
|
|
67
79
|
|
|
68
80
|
The command won't return a response on success.
|
|
@@ -20,13 +20,19 @@ m365 spo folder roleassignment remove [options]
|
|
|
20
20
|
: The server- or site-relative decoded URL of the folder.
|
|
21
21
|
|
|
22
22
|
`--principalId [principalId]`
|
|
23
|
-
: The SharePoint principal id. It may be either an user id or group id for which the role assignment will be removed. Specify either `upn`, `groupName` or `
|
|
23
|
+
: The SharePoint principal id. It may be either an user id or group id for which the role assignment will be removed. Specify either `upn`, `groupName`, `principalId`, `entraGroupId` or `entraGroupName` but not multiple.
|
|
24
24
|
|
|
25
25
|
`--upn [upn]`
|
|
26
|
-
: The upn/email of the user. Specify either `upn`, `groupName` or `
|
|
26
|
+
: The upn/email of the user. Specify either `upn`, `groupName`, `principalId`, `entraGroupId` or `entraGroupName` but not multiple.
|
|
27
27
|
|
|
28
28
|
`--groupName [groupName]`
|
|
29
|
-
: The
|
|
29
|
+
: The SharePoint group name. Specify either `upn`, `groupName`, `principalId`, `entraGroupId` or `entraGroupName` but not multiple.
|
|
30
|
+
|
|
31
|
+
`--entraGroupId [entraGroupId]`
|
|
32
|
+
: ID of the Microsoft Entra group to remove. Specify either `upn`, `groupName`, `principalId`, `entraGroupId` or `entraGroupName` but not multiple.
|
|
33
|
+
|
|
34
|
+
`--entraGroupName [entraGroupName]`
|
|
35
|
+
: Display name of the Microsoft Entra group to remove. Specify either `upn`, `groupName`, `principalId`, `entraGroupId` or `entraGroupName` but not multiple.
|
|
30
36
|
|
|
31
37
|
`-f, --force`
|
|
32
38
|
: Don't prompt for confirmation when removing the role assignment.
|
|
@@ -60,6 +66,12 @@ Remove the role assignment from the specified folder based on the upn.
|
|
|
60
66
|
m365 spo folder roleassignment remove --webUrl "https://contoso.sharepoint.com/sites/contoso-sales" --folderUrl "/Shared Documents/FolderPermission" --upn "test@contoso.onmicrosoft.com"
|
|
61
67
|
```
|
|
62
68
|
|
|
69
|
+
Remove the role assignment from the specified folder based on the Entra group id.
|
|
70
|
+
|
|
71
|
+
```sh
|
|
72
|
+
m365 spo folder roleassignment remove --webUrl "https://contoso.sharepoint.com/sites/contoso-sales" --folderUrl "/Shared Documents/FolderPermission" --entraGroupId "27ae47f1-48f1-46f3-980b-d3c1470e398d"
|
|
73
|
+
```
|
|
74
|
+
|
|
63
75
|
## Response
|
|
64
76
|
|
|
65
77
|
The command won't return a response on success.
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import Global from '/docs/cmd/_global.mdx';
|
|
2
|
+
import Tabs from '@theme/Tabs';
|
|
3
|
+
import TabItem from '@theme/TabItem';
|
|
4
|
+
|
|
5
|
+
# spo list defaultvalue list
|
|
6
|
+
|
|
7
|
+
Retrieves default column values for a specific document library
|
|
8
|
+
|
|
9
|
+
## Usage
|
|
10
|
+
|
|
11
|
+
```sh
|
|
12
|
+
m365 spo list defaultvalue list [options]
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Options
|
|
16
|
+
|
|
17
|
+
```md definition-list
|
|
18
|
+
`-u, --webUrl <webUrl>`
|
|
19
|
+
: URL of the site where the list is located.
|
|
20
|
+
|
|
21
|
+
`-i, --listId [listId]`
|
|
22
|
+
: ID of the list. Specify either `listTitle`, `listId`, or `listUrl`.
|
|
23
|
+
|
|
24
|
+
`-t, --listTitle [listTitle]`
|
|
25
|
+
: Title of the list. Specify either `listTitle`, `listId`, or `listUrl`.
|
|
26
|
+
|
|
27
|
+
`--listUrl [listUrl]`
|
|
28
|
+
: Server- or site-relative URL of the list. Specify either `listTitle`, `listId`, or `listUrl`.
|
|
29
|
+
|
|
30
|
+
`--folderUrl [folderUrl]`
|
|
31
|
+
: Only get default column values from a specific folder.
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
<Global />
|
|
35
|
+
|
|
36
|
+
## Examples
|
|
37
|
+
|
|
38
|
+
List all default column values of a list specified by title
|
|
39
|
+
|
|
40
|
+
```sh
|
|
41
|
+
m365 spo list defaultvalue list --webUrl https://contoso.sharepoint.com/sites/marketing --listTitle "Project Documents"
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
List all default column values of a list specified by ID
|
|
45
|
+
|
|
46
|
+
```sh
|
|
47
|
+
m365 spo list defaultvalue list --webUrl https://contoso.sharepoint.com/sites/marketing --listId 12345678-90ab-cdef-1234-567890abcdef
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
List all default column values of a list specified by server relative URL
|
|
51
|
+
|
|
52
|
+
```sh
|
|
53
|
+
m365 spo list defaultvalue list --webUrl https://contoso.sharepoint.com/sites/marketing --listUrl "/sites/marketing/Project Documents"
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
List all default column values of a specific folder in a list specified by site relative URLs
|
|
57
|
+
|
|
58
|
+
```sh
|
|
59
|
+
m365 spo list defaultvalue list --webUrl https://contoso.sharepoint.com/sites/marketing --listUrl "/Project Documents" --folderUrl "/Project Documents/Archive"
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
## Response
|
|
63
|
+
|
|
64
|
+
<Tabs>
|
|
65
|
+
<TabItem value="JSON">
|
|
66
|
+
|
|
67
|
+
```json
|
|
68
|
+
[
|
|
69
|
+
{
|
|
70
|
+
"fieldName": "Countries",
|
|
71
|
+
"fieldValue": "19;#Belgium|442affc2-7fab-4f33-9590-330403a579c2",
|
|
72
|
+
"folderUrl": "/sites/Marketing/Project Documents"
|
|
73
|
+
}
|
|
74
|
+
]
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
</TabItem>
|
|
78
|
+
<TabItem value="Text">
|
|
79
|
+
|
|
80
|
+
```text
|
|
81
|
+
fieldName fieldValue folderUrl
|
|
82
|
+
--------- ------------------------------------------------ ----------------------------------
|
|
83
|
+
Countries 19;#Belgium|442affc2-7fab-4f33-9590-330403a579c2 /sites/Marketing/Project Documents
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
</TabItem>
|
|
87
|
+
<TabItem value="CSV">
|
|
88
|
+
|
|
89
|
+
```csv
|
|
90
|
+
fieldName,fieldValue,folderUrl
|
|
91
|
+
Countries,19;#Belgium|442affc2-7fab-4f33-9590-330403a579c2,/sites/Marketing/Project Documents
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
</TabItem>
|
|
95
|
+
<TabItem value="Markdown">
|
|
96
|
+
|
|
97
|
+
```md
|
|
98
|
+
# spo list defaultvalue list --webUrl "https://contoso.sharepoint.com/sites/marketing" --listUrl "/Project Documents"
|
|
99
|
+
|
|
100
|
+
Date: 20/10/2024
|
|
101
|
+
|
|
102
|
+
Property | Value
|
|
103
|
+
---------|-------
|
|
104
|
+
fieldName | Countries
|
|
105
|
+
fieldValue | 19;#Belgium\|442affc2-7fab-4f33-9590-330403a579c2
|
|
106
|
+
folderUrl | /sites/Marketing/Project Documents
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
</TabItem>
|
|
110
|
+
</Tabs>
|
|
@@ -29,13 +29,19 @@ m365 spo listitem roleassignment add [options]
|
|
|
29
29
|
: Id of the list item to assign the role to.
|
|
30
30
|
|
|
31
31
|
`--principalId [principalId]`
|
|
32
|
-
: The SharePoint Id of the principal. It may be either a user id or group id to add a role assignment for. Specify either `upn`, `groupName` or `
|
|
32
|
+
: The SharePoint Id of the principal. It may be either a user id or group id to add a role assignment for. Specify either `principalId`, `upn`, `groupName`, `entraGroupId`, or `entraGroupName`.
|
|
33
33
|
|
|
34
34
|
`--upn [upn]`
|
|
35
|
-
: The upn/email of user to assign role to. Specify either `upn`, `groupName` or `
|
|
35
|
+
: The upn/email of user to assign role to. Specify either `principalId`, `upn`, `groupName`, `entraGroupId`, or `entraGroupName`.
|
|
36
36
|
|
|
37
37
|
`--groupName [groupName]`
|
|
38
|
-
: The group name of the SharePoint group Specify either `upn`, `groupName` or `
|
|
38
|
+
: The group name of the SharePoint group. Use this option exclusively for SharePoint Online groups. Specify either `principalId`, `upn`, `groupName`, `entraGroupId`, or `entraGroupName`.
|
|
39
|
+
|
|
40
|
+
`--entraGroupId [entraGroupId]`
|
|
41
|
+
: ID of the Microsoft Entra group to add. Specify either `principalId`, `upn`, `groupName`, `entraGroupId`, or `entraGroupName`.
|
|
42
|
+
|
|
43
|
+
`--entraGroupName [entraGroupName]`
|
|
44
|
+
: Display name of the Microsoft Entra group to add. Specify either `principalId`, `upn`, `groupName`, `entraGroupId`, or `entraGroupName`.
|
|
39
45
|
|
|
40
46
|
`--roleDefinitionId [roleDefinitionId]`
|
|
41
47
|
: ID of role definition. Specify either `roleDefinitionId` or `roleDefinitionName` but not both.
|
|
@@ -84,6 +90,12 @@ Add role assignment to specified list item in specified list located in specifie
|
|
|
84
90
|
m365 spo listitem roleassignment add --webUrl "https://contoso.sharepoint.com/sites/project-x" --listTitle "someList" --listItemId 1 --principalId 11 --roleDefinitionName "Full Control"
|
|
85
91
|
```
|
|
86
92
|
|
|
93
|
+
Add role assignment to specified list item in specified list located in specified site for specified Entra group id and specified role definition name.
|
|
94
|
+
|
|
95
|
+
```sh
|
|
96
|
+
m365 spo listitem roleassignment add --webUrl "https://contoso.sharepoint.com/sites/project-x" --listTitle "someList" --listItemId 1 --entraGroupId "27ae47f1-48f1-46f3-980b-d3c1470e398d" --roleDefinitionName "Full Control"
|
|
97
|
+
```
|
|
98
|
+
|
|
87
99
|
## Response
|
|
88
100
|
|
|
89
101
|
The command won't return a response on success.
|
|
@@ -29,13 +29,19 @@ m365 spo listitem roleassignment remove [options]
|
|
|
29
29
|
: Id of the list item to remove the role from.
|
|
30
30
|
|
|
31
31
|
`--principalId [principalId]`
|
|
32
|
-
: SharePoint ID of principal it may be either user id or group id we want to remove permissions. Specify either `principalId`, `upn`,
|
|
32
|
+
: SharePoint ID of principal it may be either user id or group id we want to remove permissions. Specify either `principalId`, `upn`, `groupName`, `entraGroupId`, or `entraGroupName`.
|
|
33
33
|
|
|
34
34
|
`--upn [upn]`
|
|
35
|
-
: The upn/email of user. Specify either `principalId`, `upn`,
|
|
35
|
+
: The upn/email of user. Specify either `principalId`, `upn`, `groupName`, `entraGroupId`, or `entraGroupName`.
|
|
36
36
|
|
|
37
37
|
`--groupName [groupName]`
|
|
38
|
-
: The group name of the SharePoint group Specify either `principalId`, `upn`,
|
|
38
|
+
: The group name of the SharePoint group. Use this option exclusively for SharePoint Online groups. Specify either `principalId`, `upn`, `groupName`, `entraGroupId`, or `entraGroupName`.
|
|
39
|
+
|
|
40
|
+
`--entraGroupId [entraGroupId]`
|
|
41
|
+
: ID of the Microsoft Entra group to remove. Specify either `principalId`, `upn`, `groupName`, `entraGroupId`, or `entraGroupName`.
|
|
42
|
+
|
|
43
|
+
`--entraGroupName [entraGroupName]`
|
|
44
|
+
: Display name of the Microsoft Entra group to remove. Specify either `principalId`, `upn`, `groupName`, `entraGroupId`, or `entraGroupName`.
|
|
39
45
|
|
|
40
46
|
`-f, --force`
|
|
41
47
|
: Don't prompt for confirming removing the role assignment.
|
|
@@ -60,14 +66,20 @@ m365 spo listitem roleassignment remove --webUrl "https://contoso.sharepoint.com
|
|
|
60
66
|
Remove roleassignment from list item getting list by url based on principal Id
|
|
61
67
|
|
|
62
68
|
```sh
|
|
63
|
-
m365 spo listitem roleassignment remove --webUrl "https://contoso.sharepoint.com/sites/contoso-sales" --listUrl
|
|
69
|
+
m365 spo listitem roleassignment remove --webUrl "https://contoso.sharepoint.com/sites/contoso-sales" --listUrl "/sites/contoso-sales/lists/Events" --listItemId 1 --principalId 2
|
|
64
70
|
```
|
|
65
71
|
|
|
66
72
|
|
|
67
73
|
Remove roleassignment from list item getting list by url based on principal Id without prompting for confirmation
|
|
68
74
|
|
|
69
75
|
```sh
|
|
70
|
-
m365 spo listitem roleassignment remove --webUrl "https://contoso.sharepoint.com/sites/contoso-sales" --listUrl
|
|
76
|
+
m365 spo listitem roleassignment remove --webUrl "https://contoso.sharepoint.com/sites/contoso-sales" --listUrl "/sites/contoso-sales/lists/Events" --listItemId 1 --principalId 2 --force
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
Remove roleassignment from list item getting list by url based on Entra group Id without prompting for confirmation
|
|
80
|
+
|
|
81
|
+
```sh
|
|
82
|
+
m365 spo listitem roleassignment remove --webUrl "https://contoso.sharepoint.com/sites/contoso-sales" --listUrl "/sites/contoso-sales/lists/Events" --listItemId 1 --entraGroupId "27ae47f1-48f1-46f3-980b-d3c1470e398d" --force
|
|
71
83
|
```
|
|
72
84
|
|
|
73
85
|
## Response
|
|
@@ -17,13 +17,19 @@ m365 spo web roleassignment add [options]
|
|
|
17
17
|
: URL of the site.
|
|
18
18
|
|
|
19
19
|
`--principalId [principalId]`
|
|
20
|
-
: SharePoint ID of principal it may be either user id or group id we want to add permissions to. Specify either `principalId`, `upn`, or `
|
|
20
|
+
: SharePoint ID of principal it may be either user id or group id we want to add permissions to. Specify either `principalId`, `upn`, `groupName`, `entraGroupId` or `entraGroupName` but not multiple.
|
|
21
21
|
|
|
22
22
|
`--upn [upn]`
|
|
23
|
-
: The upn/email of user to assign role to. Specify either `principalId`, `upn`, or `
|
|
23
|
+
: The upn/email of user to assign role to. Specify either `principalId`, `upn`, `groupName`, `entraGroupId` or `entraGroupName` but not multiple.
|
|
24
24
|
|
|
25
25
|
`--groupName [groupName]`
|
|
26
|
-
: The group name of the SharePoint group Specify either `principalId`, `upn`, or `
|
|
26
|
+
: The group name of the SharePoint group. Use this option exclusively for SharePoint Online groups. Specify either `principalId`, `upn`, `groupName`, `entraGroupId` or `entraGroupName` but not multiple.
|
|
27
|
+
|
|
28
|
+
`--entraGroupId [entraGroupId]`
|
|
29
|
+
: ID of the Microsoft Entra group to add. Specify either `principalId`, `upn`, `groupName`, `entraGroupId` or `entraGroupName` but not multiple.
|
|
30
|
+
|
|
31
|
+
`--entraGroupName [entraGroupName]`
|
|
32
|
+
: Display name of the Microsoft Entra group to add. Specify either `principalId`, `upn`, `groupName`, `entraGroupId` or `entraGroupName` but not multiple.
|
|
27
33
|
|
|
28
34
|
`--roleDefinitionId [roleDefinitionId]`
|
|
29
35
|
: ID of role definition. Specify either `roleDefinitionId` or `roleDefinitionName` but not both.
|
|
@@ -60,6 +66,12 @@ add role assignment to a site for principal id _11_ and role definition name _Fu
|
|
|
60
66
|
m365 spo web roleassignment add --webUrl "https://contoso.sharepoint.com/sites/project-x" --principalId 11 --roleDefinitionName "Full Control"
|
|
61
67
|
```
|
|
62
68
|
|
|
69
|
+
add role assignment using a Entra Group ID and a role definition
|
|
70
|
+
|
|
71
|
+
```sh
|
|
72
|
+
m365 spo web roleassignment add --webUrl "https://contoso.sharepoint.com/sites/project-x" --entraGroupId "27ae47f1-48f1-46f3-980b-d3c1470e398d" --roleDefinitionId 1073741829
|
|
73
|
+
```
|
|
74
|
+
|
|
63
75
|
## Response
|
|
64
76
|
|
|
65
77
|
The command won't return a response on success.
|
|
@@ -17,13 +17,19 @@ m365 spo web roleassignment remove [options]
|
|
|
17
17
|
: URL of the site.
|
|
18
18
|
|
|
19
19
|
`--principalId [principalId]`
|
|
20
|
-
: SharePoint ID of principal it may be either user id or group id we want to add permissions to. Specify either `principalId`, `upn`, or `
|
|
20
|
+
: SharePoint ID of principal it may be either user id or group id we want to add permissions to. Specify either `principalId`, `upn`, `groupName`, `entraGroupId` or `entraGroupName` but not multiple.
|
|
21
21
|
|
|
22
22
|
`--upn [upn]`
|
|
23
|
-
: The upn/email of user to assign role to. Specify either `principalId`, `upn`, or `
|
|
23
|
+
: The upn/email of user to assign role to. Specify either `principalId`, `upn`, `groupName`, `entraGroupId` or `entraGroupName` but not multiple.
|
|
24
24
|
|
|
25
25
|
`--groupName [groupName]`
|
|
26
|
-
: The group name of the SharePoint group Specify either `principalId`, `upn`, or `
|
|
26
|
+
: The group name of the SharePoint group. Use this option exclusively for SharePoint Online groups. Specify either `principalId`, `upn`, `groupName`, `entraGroupId` or `entraGroupName` but not multiple.
|
|
27
|
+
|
|
28
|
+
`--entraGroupId [entraGroupId]`
|
|
29
|
+
: ID of the Microsoft Entra group to remove. Specify either `principalId`, `upn`, `groupName`, `entraGroupId` or `entraGroupName` but not multiple.
|
|
30
|
+
|
|
31
|
+
`--entraGroupName [entraGroupName]`
|
|
32
|
+
: Display name of the Microsoft Entra group to remove. Specify either `principalId`, `upn`, `groupName`, `entraGroupId` or `entraGroupName` but not multiple.
|
|
27
33
|
|
|
28
34
|
`-f, --force`
|
|
29
35
|
: Don't prompt for confirming removing the roleassignment.
|
|
@@ -57,6 +63,12 @@ Remove roleassignment from web based on principal Id without prompting for confi
|
|
|
57
63
|
m365 spo web roleassignment remove --webUrl "https://contoso.sharepoint.com/sites/contoso-sales" --principalId 2 --force
|
|
58
64
|
```
|
|
59
65
|
|
|
66
|
+
Remove roleassignment from web based on Entra Group Id and don't prompt for confirmation
|
|
67
|
+
|
|
68
|
+
```sh
|
|
69
|
+
m365 spo web roleassignment remove --webUrl "https://contoso.sharepoint.com/sites/contoso-sales" --entraGroupId "27ae47f1-48f1-46f3-980b-d3c1470e398d" --force
|
|
70
|
+
```
|
|
71
|
+
|
|
60
72
|
## Response
|
|
61
73
|
|
|
62
74
|
The command won't return a response on success.
|
package/package.json
CHANGED