-
Notifications
You must be signed in to change notification settings - Fork 348
Closed
Description
Usage
m365 entra group member remove [options]
Description
Removes members from a Microsoft Entra group
Options
Option | Description |
---|---|
-i, --groupId [groupId] |
The ID of the Azure AD group. Specify groupId or groupDisplayName but not both. |
-n, --groupDisplayName [groupDisplayName] |
The display name of the Azure AD group. Specify groupId or groupDisplayName but not both. |
--ids [ids] |
Azure AD IDs of users. You can also pass a comma-separated list of IDs. Specify either ids or userNames but not both. |
--userNames [userNames] |
The user principal names of users. You can also pass a comma-separated list of UPNs. Specify either ids or userNames but not both. |
-r, --role [role] |
The role to be removed from the new user. Valid values: Owner , Member . Defaults to both. |
-f, --force |
Don't prompt for confirmation. |
Examples
Remove a single user specified by ID as a member from a group specified by display name
m365 entra group member remove --groupDisplayName Developers --ids 098b9f52-f48c-4401-819f-29c33794c3f5 --role Member
Remove multiple users specified by ID from a group specified by ID
m365 entra group member remove --groupId a03c0c35-ef9a-419b-8cab-f89e0a8d2d2a --ids "098b9f52-f48c-4401-819f-29c33794c3f5,f1e06e31-3abf-4746-83c2-1513d71f38b8"
Remove a single user specified by UPN as an owner from a group specified by display name
m365 entra group member remove --groupDisplayName Developers --userNames [email protected] --role Owner
Removes multiple users specified by UPN from a group specified by ID
m365 entra group member remove --groupId a03c0c35-ef9a-419b-8cab-f89e0a8d2d2a --userNames "[email protected],[email protected]"
Default properties
No response
Additional Info
Let's use Graph batching.
Jwaegebaert