@pnp/cli-microsoft365 11.11.0-beta.1cb40cb → 11.11.0-beta.6c90138
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/dist/m365/spo/commands/file/file-add.js +1 -2
- package/dist/m365/spo/commands/user/user-get.js +3 -4
- package/dist/utils/fsUtil.js +0 -3
- package/docs/docs/cmd/spo/group/group-add.mdx +21 -2
- package/docs/docs/cmd/spo/group/group-get.mdx +19 -0
- package/docs/docs/cmd/spo/group/group-list.mdx +19 -0
- package/docs/docs/cmd/spo/group/group-member-add.mdx +21 -0
- package/docs/docs/cmd/spo/group/group-member-list.mdx +19 -0
- package/docs/docs/cmd/spo/group/group-member-remove.mdx +23 -0
- package/docs/docs/cmd/spo/group/group-remove.mdx +21 -0
- package/docs/docs/cmd/spo/group/group-set.mdx +23 -0
- package/package.json +1 -1
|
@@ -9,7 +9,6 @@ import path from 'path';
|
|
|
9
9
|
import { v4 } from 'uuid';
|
|
10
10
|
import request from '../../../../request.js';
|
|
11
11
|
import { formatting } from '../../../../utils/formatting.js';
|
|
12
|
-
import { fsUtil } from '../../../../utils/fsUtil.js';
|
|
13
12
|
import { spo } from '../../../../utils/spo.js';
|
|
14
13
|
import { urlUtil } from '../../../../utils/urlUtil.js';
|
|
15
14
|
import { validation } from '../../../../utils/validation.js';
|
|
@@ -39,7 +38,7 @@ class SpoFileAddCommand extends SpoCommand {
|
|
|
39
38
|
async commandAction(logger, args) {
|
|
40
39
|
const folderPath = urlUtil.getServerRelativePath(args.options.webUrl, args.options.folder);
|
|
41
40
|
const fullPath = path.resolve(args.options.path);
|
|
42
|
-
const fileName =
|
|
41
|
+
const fileName = args.options.fileName ?? path.basename(fullPath);
|
|
43
42
|
let isCheckedOut = false;
|
|
44
43
|
let listSettings;
|
|
45
44
|
if (this.verbose) {
|
|
@@ -124,12 +124,11 @@ _SpoUserGetCommand_instances = new WeakSet(), _SpoUserGetCommand_initTelemetry =
|
|
|
124
124
|
option: '--entraGroupName [entraGroupName]'
|
|
125
125
|
});
|
|
126
126
|
}, _SpoUserGetCommand_initTypes = function _SpoUserGetCommand_initTypes() {
|
|
127
|
-
this.types.string.push('webUrl', '
|
|
127
|
+
this.types.string.push('webUrl', 'email', 'loginName', 'userName', 'entraGroupId', 'entraGroupName');
|
|
128
128
|
}, _SpoUserGetCommand_initValidators = function _SpoUserGetCommand_initValidators() {
|
|
129
129
|
this.validators.push(async (args) => {
|
|
130
|
-
if (args.options.id &&
|
|
131
|
-
|
|
132
|
-
return `Specified id ${args.options.id} is not a number`;
|
|
130
|
+
if (args.options.id && !validation.isValidPositiveInteger(args.options.id)) {
|
|
131
|
+
return `Specified id ${args.options.id} is not a valid number.`;
|
|
133
132
|
}
|
|
134
133
|
if (args.options.entraGroupId && !validation.isValidGuid(args.options.entraGroupId)) {
|
|
135
134
|
return `${args.options.entraGroupId} is not a valid GUID.`;
|
package/dist/utils/fsUtil.js
CHANGED
|
@@ -42,15 +42,34 @@ m365 spo group add [options]
|
|
|
42
42
|
|
|
43
43
|
<Global />
|
|
44
44
|
|
|
45
|
+
## Permissions
|
|
46
|
+
|
|
47
|
+
<Tabs>
|
|
48
|
+
<TabItem value="Delegated">
|
|
49
|
+
|
|
50
|
+
| Resource | Permissions |
|
|
51
|
+
|------------|----------------------|
|
|
52
|
+
| SharePoint | AllSites.FullControl |
|
|
53
|
+
|
|
54
|
+
</TabItem>
|
|
55
|
+
<TabItem value="Application">
|
|
56
|
+
|
|
57
|
+
| Resource | Permissions |
|
|
58
|
+
|------------|-----------------------|
|
|
59
|
+
| SharePoint | Sites.FullControl.All |
|
|
60
|
+
|
|
61
|
+
</TabItem>
|
|
62
|
+
</Tabs>
|
|
63
|
+
|
|
45
64
|
## Examples
|
|
46
65
|
|
|
47
|
-
Create group with title and description
|
|
66
|
+
Create group with title and description.
|
|
48
67
|
|
|
49
68
|
```sh
|
|
50
69
|
m365 spo group add --webUrl https://contoso.sharepoint.com/sites/project-x --name "Project leaders" --description "This group contains all project leaders"
|
|
51
70
|
```
|
|
52
71
|
|
|
53
|
-
Create group with membership requests
|
|
72
|
+
Create group with membership requests.
|
|
54
73
|
|
|
55
74
|
```sh
|
|
56
75
|
m365 spo group add --webUrl https://contoso.sharepoint.com/sites/project-x --name "Project leaders" --allowRequestToJoinLeave true --requestToJoinLeaveEmailSetting john.doe@contoso.com
|
|
@@ -30,6 +30,25 @@ m365 spo group get [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
|
Get group with ID for the specified web.
|
|
@@ -24,6 +24,25 @@ m365 spo group list [options]
|
|
|
24
24
|
|
|
25
25
|
<Global />
|
|
26
26
|
|
|
27
|
+
## Permissions
|
|
28
|
+
|
|
29
|
+
<Tabs>
|
|
30
|
+
<TabItem value="Delegated">
|
|
31
|
+
|
|
32
|
+
| Resource | Permissions |
|
|
33
|
+
|------------|---------------|
|
|
34
|
+
| SharePoint | AllSites.Read |
|
|
35
|
+
|
|
36
|
+
</TabItem>
|
|
37
|
+
<TabItem value="Application">
|
|
38
|
+
|
|
39
|
+
| Resource | Permissions |
|
|
40
|
+
|------------|----------------|
|
|
41
|
+
| SharePoint | Sites.Read.All |
|
|
42
|
+
|
|
43
|
+
</TabItem>
|
|
44
|
+
</Tabs>
|
|
45
|
+
|
|
27
46
|
## Examples
|
|
28
47
|
|
|
29
48
|
Lists all the groups within a specific web.
|
|
@@ -46,6 +46,27 @@ m365 spo group member add [options]
|
|
|
46
46
|
|
|
47
47
|
For the `userIds`, `userNames`, `emails`, `entraGroupIds`, or `entraGroupNames` options you can specify multiple values by separating them with a comma. If one of the specified entries is not valid, the command will fail with an error message showing the list of invalid values.
|
|
48
48
|
|
|
49
|
+
## Permissions
|
|
50
|
+
|
|
51
|
+
<Tabs>
|
|
52
|
+
<TabItem value="Delegated">
|
|
53
|
+
|
|
54
|
+
| Resource | Permissions |
|
|
55
|
+
|-----------------|----------------------|
|
|
56
|
+
| Microsoft Graph | User.Read.All |
|
|
57
|
+
| SharePoint | AllSites.FullControl |
|
|
58
|
+
|
|
59
|
+
</TabItem>
|
|
60
|
+
<TabItem value="Application">
|
|
61
|
+
|
|
62
|
+
| Resource | Permissions |
|
|
63
|
+
|-----------------|-----------------------|
|
|
64
|
+
| Microsoft Graph | User.Read.All |
|
|
65
|
+
| SharePoint | Sites.FullControl.All |
|
|
66
|
+
|
|
67
|
+
</TabItem>
|
|
68
|
+
</Tabs>
|
|
69
|
+
|
|
49
70
|
## Examples
|
|
50
71
|
|
|
51
72
|
Add a user with the userNames parameter to a SharePoint group with the groupId parameter.
|
|
@@ -27,6 +27,25 @@ m365 spo group member list [options]
|
|
|
27
27
|
|
|
28
28
|
<Global />
|
|
29
29
|
|
|
30
|
+
## Permissions
|
|
31
|
+
|
|
32
|
+
<Tabs>
|
|
33
|
+
<TabItem value="Delegated">
|
|
34
|
+
|
|
35
|
+
| Resource | Permissions |
|
|
36
|
+
|------------|---------------|
|
|
37
|
+
| SharePoint | AllSites.Read |
|
|
38
|
+
|
|
39
|
+
</TabItem>
|
|
40
|
+
<TabItem value="Application">
|
|
41
|
+
|
|
42
|
+
| Resource | Permissions |
|
|
43
|
+
|------------|----------------|
|
|
44
|
+
| SharePoint | Sites.Read.All |
|
|
45
|
+
|
|
46
|
+
</TabItem>
|
|
47
|
+
</Tabs>
|
|
48
|
+
|
|
30
49
|
## Examples
|
|
31
50
|
|
|
32
51
|
List the members of the group with ID for the specified web.
|
|
@@ -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 group member remove
|
|
4
6
|
|
|
@@ -40,6 +42,27 @@ m365 spo group member remove [options]
|
|
|
40
42
|
|
|
41
43
|
<Global />
|
|
42
44
|
|
|
45
|
+
## Permissions
|
|
46
|
+
|
|
47
|
+
<Tabs>
|
|
48
|
+
<TabItem value="Delegated">
|
|
49
|
+
|
|
50
|
+
| Resource | Permissions |
|
|
51
|
+
|-----------------|----------------------|
|
|
52
|
+
| Microsoft Graph | User.Read.All |
|
|
53
|
+
| SharePoint | AllSites.FullControl |
|
|
54
|
+
|
|
55
|
+
</TabItem>
|
|
56
|
+
<TabItem value="Application">
|
|
57
|
+
|
|
58
|
+
| Resource | Permissions |
|
|
59
|
+
|-----------------|-----------------------|
|
|
60
|
+
| Microsoft Graph | User.Read.All |
|
|
61
|
+
| SharePoint | Sites.FullControl.All |
|
|
62
|
+
|
|
63
|
+
</TabItem>
|
|
64
|
+
</Tabs>
|
|
65
|
+
|
|
43
66
|
## Examples
|
|
44
67
|
|
|
45
68
|
Remove a user from a SharePoint group based on the id on a given web.
|
|
@@ -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 group remove
|
|
4
6
|
|
|
@@ -28,6 +30,25 @@ m365 spo group remove [options]
|
|
|
28
30
|
|
|
29
31
|
<Global />
|
|
30
32
|
|
|
33
|
+
## Permissions
|
|
34
|
+
|
|
35
|
+
<Tabs>
|
|
36
|
+
<TabItem value="Delegated">
|
|
37
|
+
|
|
38
|
+
| Resource | Permissions |
|
|
39
|
+
|------------|----------------------|
|
|
40
|
+
| SharePoint | AllSites.FullControl |
|
|
41
|
+
|
|
42
|
+
</TabItem>
|
|
43
|
+
<TabItem value="Application">
|
|
44
|
+
|
|
45
|
+
| Resource | Permissions |
|
|
46
|
+
|------------|-----------------------|
|
|
47
|
+
| SharePoint | Sites.FullControl.All |
|
|
48
|
+
|
|
49
|
+
</TabItem>
|
|
50
|
+
</Tabs>
|
|
51
|
+
|
|
31
52
|
## Examples
|
|
32
53
|
|
|
33
54
|
Removes group with id from the specified web.
|
|
@@ -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 group set
|
|
4
6
|
|
|
@@ -52,6 +54,27 @@ m365 spo group set [options]
|
|
|
52
54
|
|
|
53
55
|
<Global />
|
|
54
56
|
|
|
57
|
+
## Permissions
|
|
58
|
+
|
|
59
|
+
<Tabs>
|
|
60
|
+
<TabItem value="Delegated">
|
|
61
|
+
|
|
62
|
+
| Resource | Permissions |
|
|
63
|
+
|-----------------|----------------------|
|
|
64
|
+
| Microsoft Graph | User.Read.All |
|
|
65
|
+
| SharePoint | AllSites.FullControl |
|
|
66
|
+
|
|
67
|
+
</TabItem>
|
|
68
|
+
<TabItem value="Application">
|
|
69
|
+
|
|
70
|
+
| Resource | Permissions |
|
|
71
|
+
|-----------------|-----------------------|
|
|
72
|
+
| Microsoft Graph | User.Read.All |
|
|
73
|
+
| SharePoint | Sites.FullControl.All |
|
|
74
|
+
|
|
75
|
+
</TabItem>
|
|
76
|
+
</Tabs>
|
|
77
|
+
|
|
55
78
|
## Examples
|
|
56
79
|
|
|
57
80
|
Update group title and description.
|
package/package.json
CHANGED