@pnp/cli-microsoft365 9.1.0-beta.acd25f7 → 9.1.0
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/Auth.js +3 -3
- package/dist/AuthServer.js +7 -7
- package/dist/api.js +1 -1
- package/dist/config.js +1 -0
- package/dist/m365/external/commands/item/item-add.js +2 -5
- package/dist/m365/spfx/commands/project/project-doctor/{doctor-1.20.0-rc.1.js → doctor-1.20.0.js} +4 -2
- package/dist/m365/spfx/commands/project/project-doctor/rules/FN002021_DEVDEP_rushstack_eslint_config.js +10 -0
- package/dist/m365/spfx/commands/project/project-doctor.js +1 -1
- package/dist/m365/spfx/commands/project/project-upgrade/{upgrade-1.20.0-rc.1.js → upgrade-1.20.0.js} +28 -26
- package/dist/m365/spfx/commands/project/project-upgrade.js +13 -15
- package/dist/m365/spfx/commands/spfx-doctor.js +1 -1
- package/dist/m365/spo/commands/page/page-remove.js +37 -16
- package/dist/m365/spo/commands/site/site-admin-list.js +8 -9
- package/dist/m365/spo/commands/site/site-admin-remove.js +5 -4
- package/dist/m365/spo/commands/site/site-sharingpermission-set.js +68 -0
- package/dist/m365/spo/commands.js +1 -0
- package/dist/m365/viva/commands/engage/Community.js +2 -0
- package/dist/m365/viva/commands/engage/engage-community-list.js +28 -0
- package/dist/m365/viva/commands.js +1 -0
- package/dist/request.js +46 -61
- package/dist/utils/spo.js +5 -7
- package/dist/utils/timersUtil.js +12 -0
- package/dist/utils/urlUtil.js +8 -0
- package/docs/docs/cmd/external/item/item-add.mdx +3 -3
- package/docs/docs/cmd/spfx/project/project-upgrade.mdx +1 -1
- package/docs/docs/cmd/spo/page/page-remove.mdx +30 -12
- package/docs/docs/cmd/spo/site/site-admin-list.mdx +64 -12
- package/docs/docs/cmd/spo/site/site-sharingpermission-set.mdx +58 -0
- package/docs/docs/cmd/viva/engage/engage-community-list.mdx +81 -0
- package/package.json +2 -2
package/dist/request.js
CHANGED
|
@@ -4,6 +4,7 @@ import auth, { Auth } from './Auth.js';
|
|
|
4
4
|
import { app } from './utils/app.js';
|
|
5
5
|
import { formatting } from './utils/formatting.js';
|
|
6
6
|
import { timings } from './cli/timings.js';
|
|
7
|
+
import { timersUtil } from './utils/timersUtil.js';
|
|
7
8
|
class Request {
|
|
8
9
|
set debug(debug) {
|
|
9
10
|
// if the value to set is the same as current value return early to avoid
|
|
@@ -125,76 +126,60 @@ class Request {
|
|
|
125
126
|
options.method = 'HEAD';
|
|
126
127
|
return this.execute(options);
|
|
127
128
|
}
|
|
128
|
-
execute(options
|
|
129
|
+
async execute(options) {
|
|
129
130
|
const start = process.hrtime.bigint();
|
|
130
131
|
if (!this._logger) {
|
|
131
|
-
|
|
132
|
+
throw 'Logger not set on the request object';
|
|
132
133
|
}
|
|
133
134
|
this.updateRequestForCloudType(options, auth.connection.cloudType);
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
.
|
|
146
|
-
|
|
147
|
-
if (options.headers['x-anonymous']) {
|
|
148
|
-
delete options.headers['x-anonymous'];
|
|
149
|
-
}
|
|
150
|
-
if (options.headers['x-resource']) {
|
|
151
|
-
delete options.headers['x-resource'];
|
|
152
|
-
}
|
|
153
|
-
if (accessToken !== '') {
|
|
154
|
-
options.headers.authorization = `Bearer ${accessToken}`;
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
const proxyUrl = process.env.HTTP_PROXY || process.env.HTTPS_PROXY;
|
|
158
|
-
if (proxyUrl) {
|
|
159
|
-
options.proxy = this.createProxyConfigFromUrl(proxyUrl);
|
|
135
|
+
try {
|
|
136
|
+
let accessToken = '';
|
|
137
|
+
if (options.headers && options.headers['x-anonymous']) {
|
|
138
|
+
accessToken = '';
|
|
139
|
+
}
|
|
140
|
+
else {
|
|
141
|
+
const url = options.headers && options.headers['x-resource'] ? options.headers['x-resource'] : options.url;
|
|
142
|
+
const resource = Auth.getResourceFromUrl(url);
|
|
143
|
+
accessToken = await auth.ensureAccessToken(resource, this._logger, this._debug);
|
|
144
|
+
}
|
|
145
|
+
if (options.headers) {
|
|
146
|
+
if (options.headers['x-anonymous']) {
|
|
147
|
+
delete options.headers['x-anonymous'];
|
|
160
148
|
}
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
.then((res) => {
|
|
164
|
-
if (resolve) {
|
|
165
|
-
resolve((options.responseType === 'stream' || options.fullResponse) ? res : res.data);
|
|
149
|
+
if (options.headers['x-resource']) {
|
|
150
|
+
delete options.headers['x-resource'];
|
|
166
151
|
}
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
timings.api.push(Number(end - start));
|
|
170
|
-
_resolve((options.responseType === 'stream' || options.fullResponse) ? res : res.data);
|
|
152
|
+
if (accessToken !== '') {
|
|
153
|
+
options.headers.authorization = `Bearer ${accessToken}`;
|
|
171
154
|
}
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
155
|
+
}
|
|
156
|
+
const proxyUrl = process.env.HTTP_PROXY || process.env.HTTPS_PROXY;
|
|
157
|
+
if (proxyUrl) {
|
|
158
|
+
options.proxy = this.createProxyConfigFromUrl(proxyUrl);
|
|
159
|
+
}
|
|
160
|
+
const res = await this.req(options);
|
|
161
|
+
const end = process.hrtime.bigint();
|
|
162
|
+
timings.api.push(Number(end - start));
|
|
163
|
+
return options.responseType === 'stream' || options.fullResponse ?
|
|
164
|
+
res :
|
|
165
|
+
res.data;
|
|
166
|
+
}
|
|
167
|
+
catch (error) {
|
|
168
|
+
const end = process.hrtime.bigint();
|
|
169
|
+
timings.api.push(Number(end - start));
|
|
170
|
+
if (error && error.response && (error.response.status === 429 || error.response.status === 503)) {
|
|
171
|
+
let retryAfter = parseInt(error.response.headers['retry-after'] || '10');
|
|
172
|
+
if (isNaN(retryAfter)) {
|
|
173
|
+
retryAfter = 10;
|
|
185
174
|
}
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
reject(error);
|
|
189
|
-
}
|
|
190
|
-
else {
|
|
191
|
-
const end = process.hrtime.bigint();
|
|
192
|
-
timings.api.push(Number(end - start));
|
|
193
|
-
_reject(error);
|
|
194
|
-
}
|
|
175
|
+
if (this._debug) {
|
|
176
|
+
await this._logger.log(`Request throttled. Waiting ${retryAfter} sec before retrying...`);
|
|
195
177
|
}
|
|
196
|
-
|
|
197
|
-
|
|
178
|
+
await timersUtil.setTimeout(retryAfter * 1000);
|
|
179
|
+
return this.execute(options);
|
|
180
|
+
}
|
|
181
|
+
throw error;
|
|
182
|
+
}
|
|
198
183
|
}
|
|
199
184
|
updateRequestForCloudType(options, cloudType) {
|
|
200
185
|
const url = new URL(options.url);
|
package/dist/utils/spo.js
CHANGED
|
@@ -1541,7 +1541,7 @@ export const spo = {
|
|
|
1541
1541
|
return file;
|
|
1542
1542
|
},
|
|
1543
1543
|
/**
|
|
1544
|
-
* Gets the
|
|
1544
|
+
* Gets the primary owner login from a site as admin.
|
|
1545
1545
|
* @param adminUrl The SharePoint admin URL
|
|
1546
1546
|
* @param siteId The site ID
|
|
1547
1547
|
* @param logger The logger object
|
|
@@ -1555,13 +1555,12 @@ export const spo = {
|
|
|
1555
1555
|
const requestOptions = {
|
|
1556
1556
|
url: `${adminUrl}/_api/SPO.Tenant/sites('${siteId}')?$select=OwnerLoginName`,
|
|
1557
1557
|
headers: {
|
|
1558
|
-
accept: 'application/json;odata=nometadata'
|
|
1559
|
-
|
|
1560
|
-
|
|
1558
|
+
accept: 'application/json;odata=nometadata'
|
|
1559
|
+
},
|
|
1560
|
+
responseType: 'json'
|
|
1561
1561
|
};
|
|
1562
1562
|
const response = await request.get(requestOptions);
|
|
1563
|
-
|
|
1564
|
-
return responseContent.OwnerLoginName;
|
|
1563
|
+
return response.OwnerLoginName;
|
|
1565
1564
|
},
|
|
1566
1565
|
/**
|
|
1567
1566
|
* Gets the primary owner login from a site.
|
|
@@ -1576,7 +1575,6 @@ export const spo = {
|
|
|
1576
1575
|
}
|
|
1577
1576
|
const requestOptions = {
|
|
1578
1577
|
url: `${siteUrl}/_api/site/owner`,
|
|
1579
|
-
method: 'GET',
|
|
1580
1578
|
headers: {
|
|
1581
1579
|
'accept': 'application/json;odata=nometadata'
|
|
1582
1580
|
},
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { setTimeout } from "timers/promises";
|
|
2
|
+
export const timersUtil = {
|
|
3
|
+
/**
|
|
4
|
+
* Timeout for a specific duration.
|
|
5
|
+
* @param duration Duration in milliseconds.
|
|
6
|
+
*/
|
|
7
|
+
/* c8 ignore next 3 */
|
|
8
|
+
async setTimeout(duration) {
|
|
9
|
+
return setTimeout(duration);
|
|
10
|
+
}
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=timersUtil.js.map
|
package/dist/utils/urlUtil.js
CHANGED
|
@@ -198,6 +198,14 @@ export const urlUtil = {
|
|
|
198
198
|
return rootUrl.origin;
|
|
199
199
|
}
|
|
200
200
|
},
|
|
201
|
+
/**
|
|
202
|
+
* Removes leading slashes from the URL.
|
|
203
|
+
* @param url The URL to process.
|
|
204
|
+
* @returns The URL without leading slashes.
|
|
205
|
+
*/
|
|
206
|
+
removeLeadingSlashes(url) {
|
|
207
|
+
return url.replace(/^\/+/, '');
|
|
208
|
+
},
|
|
201
209
|
/**
|
|
202
210
|
* Removes trailing slashes from the URL.
|
|
203
211
|
* @param url The URL to process.
|
|
@@ -63,13 +63,13 @@ For more information about using these options, see the Microsoft Graph API docu
|
|
|
63
63
|
Creates an external item with simple properties that everyone is allowed to access
|
|
64
64
|
|
|
65
65
|
```sh
|
|
66
|
-
m365 external item add --id "pnp-ensure-siteassets-library" --
|
|
66
|
+
m365 external item add --id "pnp-ensure-siteassets-library" --externalConnectionId "samplesolutiongallery" --content "Ensure that the Site Assets library is created." --title "Ensure the Site Assets Library is created" --description "Ensure that the Site Assets library is created." --authors "Phil Harding" --acls "grant,everyone,everyone"
|
|
67
67
|
```
|
|
68
68
|
|
|
69
69
|
Creates an external item with multi-value properties accessible only to users from the specified Entra group
|
|
70
70
|
|
|
71
71
|
```sh
|
|
72
|
-
m365 external item add --id "pnp-ensure-siteassets-library" --
|
|
72
|
+
m365 external item add --id "pnp-ensure-siteassets-library" --externalConnectionId "samplesolutiongallery" --content "Ensure that the Site Assets library is created." --title "Ensure the Site Assets Library is created" --description "Ensure that the Site Assets library is created." --authors@odata.type "Collection(String)" --authors "Phil Harding;#Steve Smith" --acls "grant,group,Super users"
|
|
73
73
|
```
|
|
74
74
|
|
|
75
75
|
## Response
|
|
@@ -123,7 +123,7 @@ m365 external item add --id "pnp-ensure-siteassets-library" --connectionId "samp
|
|
|
123
123
|
<TabItem value="Markdown">
|
|
124
124
|
|
|
125
125
|
```md
|
|
126
|
-
# m365 external item add --id "pnp-ensure-siteassets-library" --
|
|
126
|
+
# m365 external item add --id "pnp-ensure-siteassets-library" --externalConnectionId "samplesolutiongallery" --content "Ensure that the Site Assets library is created." --title "Ensure the Site Assets Library is created" --description "Ensure that the Site Assets library is created." --authors "Phil Harding" --acls "grant,everyone,everyone"
|
|
127
127
|
|
|
128
128
|
Date: 2023-10-28
|
|
129
129
|
|
|
@@ -35,7 +35,7 @@ m365 spfx project upgrade [options]
|
|
|
35
35
|
|
|
36
36
|
## Remarks
|
|
37
37
|
|
|
38
|
-
The `spfx project upgrade` command helps you upgrade your SharePoint Framework project to the specified version. If no version is specified, the command will upgrade to the latest version of the SharePoint Framework it supports (v1.
|
|
38
|
+
The `spfx project upgrade` command helps you upgrade your SharePoint Framework project to the specified version. If no version is specified, the command will upgrade to the latest version of the SharePoint Framework it supports (v1.20.0).
|
|
39
39
|
|
|
40
40
|
This command doesn't change your project files. Instead, it gives you a report with all steps necessary to upgrade your project to the specified version of the SharePoint Framework. Changing project files is error-prone, especially when it comes to updating your solution's code. This is why at this moment, this command produces a report that you can use yourself to perform the necessary updates and verify that everything is working as expected.
|
|
41
41
|
|
|
@@ -13,36 +13,54 @@ m365 spo page remove [options]
|
|
|
13
13
|
## Options
|
|
14
14
|
|
|
15
15
|
```md definition-list
|
|
16
|
+
`-u, --webUrl <webUrl>`
|
|
17
|
+
: URL of the site where the page is located.
|
|
18
|
+
|
|
16
19
|
`-n, --name <name>`
|
|
17
|
-
: Name of the page
|
|
20
|
+
: Name of the page.
|
|
18
21
|
|
|
19
|
-
|
|
20
|
-
:
|
|
22
|
+
`--recycle`
|
|
23
|
+
: Send the page to the recycle bin instead of permanently deleting it.
|
|
24
|
+
|
|
25
|
+
`--bypassSharedLock`
|
|
26
|
+
: Remove the page even if it is locked for shared use.
|
|
21
27
|
|
|
22
28
|
`-f, --force`
|
|
23
|
-
: Do not prompt for confirmation
|
|
29
|
+
: Do not prompt for confirmation.
|
|
24
30
|
```
|
|
25
31
|
|
|
26
32
|
<Global />
|
|
27
33
|
|
|
28
|
-
## Remarks
|
|
29
|
-
|
|
30
|
-
If you try to remove a page with that does not exist, you will get a `The file does not exist` error.
|
|
31
|
-
|
|
32
|
-
If you set the `-f, --force` flag, you will not be prompted for confirmation before the page is actually removed.
|
|
33
|
-
|
|
34
34
|
## Examples
|
|
35
35
|
|
|
36
36
|
Remove a modern page
|
|
37
37
|
|
|
38
38
|
```sh
|
|
39
|
-
m365 spo page remove --name
|
|
39
|
+
m365 spo page remove --name HR.aspx --webUrl https://contoso.sharepoint.com/sites/Marketing
|
|
40
40
|
```
|
|
41
41
|
|
|
42
42
|
Remove a modern page without a confirmation prompt
|
|
43
43
|
|
|
44
44
|
```sh
|
|
45
|
-
m365 spo page remove --name
|
|
45
|
+
m365 spo page remove --name HR.aspx --webUrl https://contoso.sharepoint.com/sites/Marketing --force
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
Send a page to the recycle bin
|
|
49
|
+
|
|
50
|
+
```sh
|
|
51
|
+
m365 spo page remove --name HR.aspx --webUrl https://contoso.sharepoint.com/sites/Marketing --recycle
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
Remove a page that is locked
|
|
55
|
+
|
|
56
|
+
```sh
|
|
57
|
+
m365 spo page remove --name HR.aspx --webUrl https://contoso.sharepoint.com/sites/Marketing --bypassSharedLock
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
Remove a page that is located in a subfolder
|
|
61
|
+
|
|
62
|
+
```sh
|
|
63
|
+
m365 spo page remove --name /Departments/People/HR.aspx --webUrl https://contoso.sharepoint.com/sites/Marketing
|
|
46
64
|
```
|
|
47
65
|
|
|
48
66
|
## Response
|
|
@@ -28,12 +28,10 @@ m365 spo site admin list [options]
|
|
|
28
28
|
|
|
29
29
|
:::info
|
|
30
30
|
|
|
31
|
-
To use this command with the `--asAdmin` mode, you must
|
|
31
|
+
To use this command with the `--asAdmin` mode, you must be at least SharePoint administrator.
|
|
32
32
|
|
|
33
33
|
Without this parameter, you must have site collection admin permissions for the requested site.
|
|
34
34
|
|
|
35
|
-
In `--asAdmin` mode, the Id, PrincipalType, and PrincipalTypeString properties are not exported.
|
|
36
|
-
|
|
37
35
|
:::
|
|
38
36
|
|
|
39
37
|
## Examples
|
|
@@ -52,6 +50,8 @@ m365 spo site admin list --siteUrl https://contoso.sharepoint.com --asAdmin
|
|
|
52
50
|
|
|
53
51
|
## Response
|
|
54
52
|
|
|
53
|
+
### Standard response
|
|
54
|
+
|
|
55
55
|
<Tabs>
|
|
56
56
|
<TabItem value="JSON">
|
|
57
57
|
|
|
@@ -73,13 +73,9 @@ m365 spo site admin list --siteUrl https://contoso.sharepoint.com --asAdmin
|
|
|
73
73
|
<TabItem value="Text">
|
|
74
74
|
|
|
75
75
|
```text
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
PrincipalType : 1
|
|
80
|
-
PrincipalTypeString : User
|
|
81
|
-
Title : User Example
|
|
82
|
-
IsPrimaryAdmin : true
|
|
76
|
+
Id LoginName Title PrincipalTypeString
|
|
77
|
+
-- --------------------------------------------------------------------------- ------- -------------------
|
|
78
|
+
15 c:0o.c|federateddirectoryclaimprovider|d8430798-5a00-00ba-83b0-dd7a032d549a Members SecurityGroup
|
|
83
79
|
```
|
|
84
80
|
|
|
85
81
|
</TabItem>
|
|
@@ -98,7 +94,7 @@ m365 spo site admin list --siteUrl https://contoso.sharepoint.com --asAdmin
|
|
|
98
94
|
|
|
99
95
|
Date: 20/03/2024
|
|
100
96
|
|
|
101
|
-
## User
|
|
97
|
+
## User Example
|
|
102
98
|
|
|
103
99
|
Property | Value
|
|
104
100
|
---------|-------
|
|
@@ -112,4 +108,60 @@ m365 spo site admin list --siteUrl https://contoso.sharepoint.com --asAdmin
|
|
|
112
108
|
```
|
|
113
109
|
|
|
114
110
|
</TabItem>
|
|
115
|
-
</Tabs>
|
|
111
|
+
</Tabs>
|
|
112
|
+
|
|
113
|
+
### `asAdmin` response
|
|
114
|
+
|
|
115
|
+
When we make use of the option `asAdmin` the response will differ.
|
|
116
|
+
|
|
117
|
+
<Tabs>
|
|
118
|
+
<TabItem value="JSON">
|
|
119
|
+
|
|
120
|
+
```json
|
|
121
|
+
[
|
|
122
|
+
{
|
|
123
|
+
"Email": "user@contoso.com",
|
|
124
|
+
"LoginName": "i:0#.f|membership|user@contoso.com",
|
|
125
|
+
"Title": "User Example",
|
|
126
|
+
"IsPrimaryAdmin": true
|
|
127
|
+
}
|
|
128
|
+
]
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
</TabItem>
|
|
132
|
+
<TabItem value="Text">
|
|
133
|
+
|
|
134
|
+
```text
|
|
135
|
+
LoginName Title
|
|
136
|
+
--------------------------------------------------------------------------- ---------------
|
|
137
|
+
c:0o.c|federateddirectoryclaimprovider|d8430798-5a00-00ba-83b0-dd7a032d549a Members
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
</TabItem>
|
|
141
|
+
<TabItem value="CSV">
|
|
142
|
+
|
|
143
|
+
```csv
|
|
144
|
+
Email,LoginName,Title,IsPrimaryAdmin
|
|
145
|
+
user@contoso.com,i:0#.f|membership|user@contoso.com,User Example,1
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
</TabItem>
|
|
149
|
+
<TabItem value="Markdown">
|
|
150
|
+
|
|
151
|
+
```md
|
|
152
|
+
# spo site admin list --siteUrl "https://contoso.sharepoint.com/sites/Test" --asAdmin
|
|
153
|
+
|
|
154
|
+
Date: 20/03/2024
|
|
155
|
+
|
|
156
|
+
## User Example
|
|
157
|
+
|
|
158
|
+
Property | Value
|
|
159
|
+
---------|-------
|
|
160
|
+
Email | user@contoso.com
|
|
161
|
+
LoginName | i:0#.f\|membership\|user@contoso.com
|
|
162
|
+
Title | User Example
|
|
163
|
+
IsPrimaryAdmin | true
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
</TabItem>
|
|
167
|
+
</Tabs>
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import Global from '/docs/cmd/_global.mdx';
|
|
2
|
+
|
|
3
|
+
# spo site sharingpermission set
|
|
4
|
+
|
|
5
|
+
Controls how a site and its components can be shared
|
|
6
|
+
|
|
7
|
+
## Usage
|
|
8
|
+
|
|
9
|
+
```sh
|
|
10
|
+
m365 spo site sharingpermission set [options]
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Options
|
|
14
|
+
|
|
15
|
+
```md definition-list
|
|
16
|
+
`-u, --url <url>`
|
|
17
|
+
: URL of the site.
|
|
18
|
+
|
|
19
|
+
`--capability <capability>`
|
|
20
|
+
: Define how the site is shared. Possible values: `full`, `limited`, `ownersOnly`.
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
<Global />
|
|
24
|
+
|
|
25
|
+
## Remarks
|
|
26
|
+
|
|
27
|
+
When specifying `capability`, consider the following:
|
|
28
|
+
- `full`: Site owners and members can share files, folders, and the site. People with Edit permissions can share files and folders.
|
|
29
|
+
- `limited`: Site owners and members, and people with Edit permissions can share files and folders, but only site owners can share the site.
|
|
30
|
+
- `ownersOnly`: Only site owners can share files, folders, and the site.
|
|
31
|
+
|
|
32
|
+
## Examples
|
|
33
|
+
|
|
34
|
+
Update the sharing permissions for a site so only owners can share files and the site
|
|
35
|
+
|
|
36
|
+
```sh
|
|
37
|
+
m365 spo site sharingpermission set --siteUrl https://siteaddress.com/sites/sitename --capability ownersOnly
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
Update the sharing permissions for a site where so both owners and members can share files and the site
|
|
41
|
+
|
|
42
|
+
```sh
|
|
43
|
+
m365 spo site sharingpermission set --siteUrl https://siteaddress.com/sites/sitename --capability full
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Update the sharing permissions for a site where so owners can share the site, but members can only share files
|
|
47
|
+
|
|
48
|
+
```sh
|
|
49
|
+
m365 spo site sharingpermission set --siteUrl https://siteaddress.com/sites/sitename --capability full
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
## Response
|
|
53
|
+
|
|
54
|
+
The command won't return a response on success.
|
|
55
|
+
|
|
56
|
+
## More information
|
|
57
|
+
|
|
58
|
+
- Sharing a SharePoint site: [https://support.microsoft.com/office/share-a-site-958771a8-d041-4eb8-b51c-afea2eae3658](https://support.microsoft.com/office/share-a-site-958771a8-d041-4eb8-b51c-afea2eae3658)
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import Global from '/docs/cmd/_global.mdx';
|
|
2
|
+
import Tabs from '@theme/Tabs';
|
|
3
|
+
import TabItem from '@theme/TabItem';
|
|
4
|
+
|
|
5
|
+
# viva engage community list
|
|
6
|
+
|
|
7
|
+
Lists all Viva Engage communities
|
|
8
|
+
|
|
9
|
+
## Usage
|
|
10
|
+
|
|
11
|
+
```sh
|
|
12
|
+
m365 viva engage community list [options]
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Options
|
|
16
|
+
|
|
17
|
+
<Global />
|
|
18
|
+
|
|
19
|
+
## Examples
|
|
20
|
+
|
|
21
|
+
Lists all Viva Engage communities
|
|
22
|
+
|
|
23
|
+
```sh
|
|
24
|
+
m365 viva engage community list
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Response
|
|
28
|
+
|
|
29
|
+
<Tabs>
|
|
30
|
+
<TabItem value="JSON">
|
|
31
|
+
|
|
32
|
+
```json
|
|
33
|
+
[
|
|
34
|
+
{
|
|
35
|
+
"id": "eyJfdHlwZSI6Ikdyb3VwIiwiaWQiOiI0NzY5MTM1ODIwOSJ9",
|
|
36
|
+
"displayName": "All Company",
|
|
37
|
+
"description": "This is the default group for everyone in the network",
|
|
38
|
+
"privacy": "public",
|
|
39
|
+
"groupId": "7c99afd7-9f3a-49e2-b105-4ee36314350c"
|
|
40
|
+
}
|
|
41
|
+
]
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
</TabItem>
|
|
45
|
+
<TabItem value="Text">
|
|
46
|
+
|
|
47
|
+
```text
|
|
48
|
+
id displayName privacy
|
|
49
|
+
------------------------------------------------ ----------- -------
|
|
50
|
+
eyJfdHlwZSI6Ikdyb3VwIiwiaWQiOiI0NzY5MTM1ODIwOSJ9 All Company public
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
</TabItem>
|
|
54
|
+
<TabItem value="CSV">
|
|
55
|
+
|
|
56
|
+
```csv
|
|
57
|
+
id,displayName,description,privacy,groupId
|
|
58
|
+
eyJfdHlwZSI6Ikdyb3VwIiwiaWQiOiI0NzY5MTM1ODIwOSJ9,All Company,This is the default group for everyone in the network,public,7c99afd7-9f3a-49e2-b105-4ee36314350c
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
</TabItem>
|
|
62
|
+
<TabItem value="Markdown">
|
|
63
|
+
|
|
64
|
+
```md
|
|
65
|
+
# viva engage community list
|
|
66
|
+
|
|
67
|
+
Date: 8/29/2024
|
|
68
|
+
|
|
69
|
+
## All Company (eyJfdHlwZSI6Ikdyb3VwIiwiaWQiOiI0NzY5MTM1ODIwOSJ9)
|
|
70
|
+
|
|
71
|
+
Property | Value
|
|
72
|
+
---------|-------
|
|
73
|
+
id | eyJfdHlwZSI6Ikdyb3VwIiwiaWQiOiI0NzY5MTM1ODIwOSJ9
|
|
74
|
+
displayName | All Company
|
|
75
|
+
description | This is the default group for everyone in the network
|
|
76
|
+
privacy | public
|
|
77
|
+
groupId | 7c99afd7-9f3a-49e2-b105-4ee36314350c
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
</TabItem>
|
|
81
|
+
</Tabs>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pnp/cli-microsoft365",
|
|
3
|
-
"version": "9.1.0
|
|
3
|
+
"version": "9.1.0",
|
|
4
4
|
"description": "Manage Microsoft 365 and SharePoint Framework projects on any platform",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "./dist/api.js",
|
|
@@ -310,4 +310,4 @@
|
|
|
310
310
|
"sinon": "^18.0.0",
|
|
311
311
|
"source-map-support": "^0.5.21"
|
|
312
312
|
}
|
|
313
|
-
}
|
|
313
|
+
}
|