It is narrated from Sayyiduna Abdullah bin Abbas (may Allah be pleased with him) that the Messenger of Allah (peace and blessings be upon him) said: "Whoever does a deed for Allah within the Jama'ah (remaining attached to it) and gets it right, Allah accepts it from him, and if he errs, He forgives him. And whoever does a deed for Allah in division (and separation), then even if he gets it right, Allah does not accept it from him, and if he errs, let him take his seat in Hell."
Imam al-Tabarani (may Allah have mercy on him) said: "This hadith is narrated from Ibn Abbas (may Allah be pleased with him) only with this chain; Zayd al-Ammi is alone in narrating it."
Hadith Referenceالمعجم الأوسط / باب الميم / 5170
Hadith Takhrij«أخرجه الطبراني فى «الكبير» برقم: 12473»