NetUserSetGroups or Net32UserSetGroups

The NetUserSetGroups API sets the groups of which a user is a member. In DSS users can belong to more than 254 groups.