Sunan al-Nasa'i
The Book of al-Bay'ah — Hadith #4213
أَخْبَرَنَا مُحَمَّدُ بْنُ عَبْدِ اللَّهِ بْنِ عَبْدِ الْحَكَمِ، عَنْ شُعَيْبٍ، عَنِ اللَّيْثِ، عَنْ عُبَيْدِ اللَّهِ بْنِ أَبِي جَعْفَرٍ، عَنْ صَفْوَانَ، عَنْ أَبِي سَلَمَةَ، عَنْ أَبِي أَيُّوبَ، أَنَّهُ قَالَ سَمِعْتُ رَسُولَ اللَّهِ صلى الله عليه وسلم يَقُولُ
" مَا بُعِثَ مِنْ نَبِيٍّ وَلاَ كَانَ بَعْدَهُ مِنْ خَلِيفَةٍ إِلاَّ وَلَهُ بِطَانَتَانِ بِطَانَةٌ تَأْمُرُهُ بِالْمَعْرُوفِ وَتَنْهَاهُ عَنِ الْمُنْكَرِ وَبِطَانَةٌ لاَ تَأْلُوهُ خَبَالاً فَمَنْ وُقِيَ بِطَانَةَ السُّوءِ فَقَدْ وُقِيَ " .
‘No prophet has eve been sent, nor has there been any Khalifah after him, but he has two groups of advisers, a group that tells him to do good and a group that tells him to do evil. Whoever is protected from the evil group, then he is indeed protected.
Chain of Narration (Isnad)