Zayd bin Salam reported,

Abu Salam reported that Harith al-Ashari narrated that the Prophet ﷺ said, "I command you to five things which Allah has commanded me. Listening, obedience, jihad, migration, and holding to the community. Whoever departs from the community by even a hand's span has cast off the yoke of Islam from his neck, unless he returns. Whoever calls with the call of the days of ignorance is among the kneeling masses of Hellfire."A man asked, "Messenger of Allah, even if he prays and fasts?"He replied, "Even if he prays and fasts. So call with the call of Allah, who has named you Muslims, believers, servants of Allah."

Azami 7625

Sahih

عن زيد بن سلام

أن أبا سلام حدثه أن الحارث الأشعري حدثه: أن النبي ﷺ قال: وأنا آمركم بخمس الله أمرني بهن: السمع، والطاعة، والجهاد، والهجرة، والجماعة، فإن من فارق الجماعة قيد شبر فقد خلع ربقة الإسلام من عنقه إلا أن يرجع ومن ادعى دعوى الجاهلية فإنه من جثا جهنم فقال رجل: يا رسول الله، وإن صلى وصام؟ قال: وإن صلى وصام فادعوا بدعوى الله الذي سماكم المسلمين المؤمنين عباد الله.

الأعظمي 7625صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Leadership
Section
Obligation of obeying those in authority in matters that are not disobedience to Allah
Numbering
Jami al-Kamil 7625 (2nd edition)