You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/docs/cmd/spo/group/group-member-remove.md
+24-6Lines changed: 24 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -20,36 +20,54 @@ m365 spo group member remove [options]
20
20
: Name of the SharePoint group from which user has to be removed. Specify either `groupName` or `groupId`, but not both.
21
21
22
22
`--userName [userName]`
23
-
: The UPN (user principal name, eg. [email protected]) of the user that needs to be removed. Specify either `userName`, `email`, or `userId`, but not multiple.
23
+
: The UPN (user principal name, eg. [email protected]) of the user that needs to be removed. Specify either `userName`, `email`, `userId`, `aadGroupId` or `aadGroupName`.
24
24
25
25
`--email [email]`
26
-
: The email of the user to remove as a member. Specify either `userName`, `email`, or `userId`, but not multiple.
26
+
: The email of the user to remove as a member. Specify either `userName`, `email`, `userId`, `aadGroupId` or `aadGroupName`.
27
27
28
28
`--userId [userId]`
29
-
: The user Id (Id of the site user, eg. 14) of the user to remove as a member. Specify either `userName`, `email`, or `userId`, but not multiple.
29
+
: The user Id (Id of the site user, eg. 14) of the user to remove as a member. Specify either `userName`, `email`, `userId`, `aadGroupId` or `aadGroupName`.
30
+
31
+
`--aadGroupId [aadGroupId]`
32
+
: The object Id of the Azure AD group to remove as a member. Specify either `userName`, `email`, `userId`, `aadGroupId` or `aadGroupName`.
33
+
34
+
`--aadGroupName [aadGroupName]`
35
+
: The name of the Azure AD group to remove as a member. Specify either `userName`, `email`, `userId`, `aadGroupId` or `aadGroupName`.
30
36
31
37
--8<-- "docs/cmd/_global.md"
32
38
33
39
## Examples
34
40
35
-
Remove a user from a SharePoint group by userName.
41
+
Remove a user from a SharePoint group based on the id on a given web
36
42
37
43
```sh
38
44
m365 spo group member remove --webUrl https://contoso.sharepoint.com/sites/SiteA --groupId 5 --userName "[email protected]"
39
45
```
40
46
41
-
Remove a user from a SharePoint group by email.
47
+
Remove a user from a SharePoint group based on the username on a given web
42
48
43
49
```sh
44
50
m365 spo group member remove --webUrl https://contoso.sharepoint.com/sites/SiteA --groupName "Site A Visitors" --email "[email protected]"
45
51
```
46
52
47
-
Remove a user from a SharePoint group by id.
53
+
Remove a user from a SharePoint group by email.
48
54
49
55
```sh
50
56
m365 spo group member remove --webUrl https://contoso.sharepoint.com/sites/SiteA --groupName "Site A Visitors" --userId 14
51
57
```
52
58
59
+
Remove an Azure AD group from a SharePoint group based on the Azure AD group name on a given web
60
+
61
+
```sh
62
+
m365 spo group member remove --webUrl https://contoso.sharepoint.com/sites/SiteA --groupId 5 --aadGroupName "Azure AD Security Group"
63
+
```
64
+
65
+
Remove an Azure AD group from a SharePoint group based on the Azure AD group ID on a given web
66
+
67
+
```sh
68
+
m365 spo group member remove --webUrl https://contoso.sharepoint.com/sites/SiteA --groupName "Site A Visitors" --aadGroupId "5786b8e8-c495-4734-b345-756733960730"
0 commit comments