Not able to apply Group using C API

I am using C API REGNewPerson to create user and assign group in one call. Though user gets created without any error.

When I check group members in domino Admin for supplied group, I am not able to see the newly created user.

Is there any configuration required for this?