| Previous | Next |
| ERROR_SPECIAL_USER | ERROR_TOKEN_ALREADY_IN_USE |
ERROR_MEMBERS_PRIMARY_GROUP
Primary-group state blocks removal of the membership relationship
A user’s primary group has special identity semantics beyond an ordinary membership edge. ERROR_MEMBERS_PRIMARY_GROUP means the requested removal would target a group that is currently recorded as the user’s primary group. It is therefore different from ERROR_MEMBER_NOT_IN_GROUP: the relationship matters specifically because of primary-group state.
Query the user and group information before changing membership. If the user must leave the group, assign an appropriate different primary group first through the supported account or directory interface, verify the update, and only then remove the old membership. Do not simply ignore the primary-group value or edit the membership list offline; authorization and directory behavior can derive information from that field.
What to inspect
- Identify which user currently references the group as primary.
- Change the primary group through a supported account/directory operation before removing membership.
- Re-read the user’s group information after the change before issuing the removal.
References
Looking for a different code? Search another status or error code.