| Previous | Next |
| ERROR_NO_SUCH_GROUP | ERROR_MEMBER_NOT_IN_GROUP |
ERROR_MEMBER_IN_GROUP
The group already contains the member relationship relevant to the operation
Group membership is stored and manipulated separately from the group object itself. SAMR has explicit add, remove and query membership methods, while NetGroupAddUser adds an existing user to an existing global group. ERROR_MEMBER_IN_GROUP can be returned when an add is redundant; the Win32 description also documents the delete case in which a group still contains a member.
Do not treat both cases identically. Log the operation name, the group identity and the member RID or account name. For an add, query the current membership and make the workflow idempotent if the same principal is already present. For deletion, enumerate members and remove or migrate them according to policy before deleting the group. A same-looking name is not sufficient: compare the principal identity resolved by the authority.
What to inspect
- Distinguish an add-membership request from a group-delete request.
- Enumerate the current members and compare the actual member SID/RID.
- Avoid repeated retries; the membership or delete prerequisite must change first.
References
Looking for a different code? Search another status or error code.