Discovering the Group of a Contact

Hi everybody,

I am trying to discover the main group of a contact, I want to disable the buzz alert just for a group, so this group can send alert but not receive

I think program it in but I don´t know how to discover the group of the user that are sending alert…

Some idea ?