Sunan an-Nasa'i, Book 39, Hadith 55 (In-Book) ⓘ
It was narrated that Abu Ayyub said; "I heard the Messenger of Allah say: '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.
أَخْبَرَنَا مُحَمَّدُ بْنُ عَبْدِ اللَّهِ بْنِ عَبْدِ الْحَكَمِ، عَنْ شُعَيْبٍ، عَنِ اللَّيْثِ، عَنْ عُبَيْدِ اللَّهِ بْنِ أَبِي جَعْفَرٍ، عَنْ صَفْوَانَ، عَنْ أَبِي سَلَمَةَ، عَنْ أَبِي أَيُّوبَ، أَنَّهُ قَالَ سَمِعْتُ رَسُولَ اللَّهِ صلى الله عليه وسلم يَقُولُ " مَا بُعِثَ مِنْ نَبِيٍّ وَلاَ كَانَ بَعْدَهُ مِنْ خَلِيفَةٍ إِلاَّ وَلَهُ بِطَانَتَانِ بِطَانَةٌ تَأْمُرُهُ بِالْمَعْرُوفِ وَتَنْهَاهُ عَنِ الْمُنْكَرِ وَبِطَانَةٌ لاَ تَأْلُوهُ خَبَالاً فَمَنْ وُقِيَ بِطَانَةَ السُّوءِ فَقَدْ وُقِيَ " .
also referenced under: Hadith 4203 (Reference) & Volume 5, Book 39, Hadith 4208 (DarusSalam)