matching group id for uid