/entra-id-admin:entra-group-member-remove <group-id-or-name> --members <upn1,upn2,...> [--as-owner]from entra-id-admin
Removes one or more members (users, service principals, or groups) from an Entra ID group by UPN or object ID. Optionally removes them as owners with --as-owner. Rejects dynamic groups.
Ships in entra-id-admin. Installing the plugin adds it to Claude Code.
Remove users (or service principals/groups) from an existing Entra ID group.
groupTypes contains DynamicMembershipFor each --members value, resolve UPN → object ID via GET /users/{upn}?$select=id.
For each member:
DELETE https://graph.microsoft.com/v1.0/groups/{groupId}/members/{memberId}/$ref
Send these sequentially — the endpoint doesn't support batch member removal. Honor 429 throttling between requests.
DELETE https://graph.microsoft.com/v1.0/groups/{groupId}/owners/{memberId}/$ref
Warn if this would leave the group with 0 owners.
Members removed from group
─────────────────────────────────────────────────────────────────
Group: Project Phoenix Team (<group-id>)
─────────────────────────────────────────────────────────────────
Removed:
✓ [email protected] (Jane Smith)
✓ [email protected] (Bob Jones)
✗ [email protected] — User not found
─────────────────────────────────────────────────────────────────
2 members removed, 1 error
# Remove a member
az ad group member remove --group "SG-DevTeam-Prod" --member-id <user-object-id>
To also remove as owner:
# List current owners to find the owner object ID
az ad group owner list --group "SG-DevTeam-Prod" --query "[].id" --output tsv
# Remove via az rest (no direct az ad command for owner removal)
az rest --method DELETE \
--url "https://graph.microsoft.com/v1.0/groups/<group-id>/owners/<owner-id>/\$ref"
| Code | Fix |
|---|---|
404 on DELETE | Member not in group — safe to skip |
400 DynamicGroup | Cannot remove from dynamic group |
403 | Add GroupMember.ReadWrite.All scope |
Files this command reads when invoked
What the command file sets; muted values are Claude Code's defaults
7-day visitors to each command page
29 commands in this plugin
/entra-access-package-createCreate an entitlement management access package with resources, approval policy, and optional recurring access review/entra-access-review-createCreate a recurring access review for group membership, directory roles, or access package assignments/entra-admin-setupConfigure authentication and verify permissions for Entra ID administration/entra-admin-unit-addAdd a member (user/group) to an admin unit, or assign a scoped admin role within an admin unit/entra-admin-unit-createCreate an administrative unit for scoped delegation in Entra ID/entra-auth-methods-getList registered authentication methods for a user — MFA methods, FIDO2 keys, TAPs, and registration statusnpx claudepluginhub thelobbi/claude-m --plugin entra-id-adminOther plugins' commands for the same job