كتاب المقدمات
The Book of Miscellany
(82)
Chapter: Appointment of Pious Governors, Advisors and Judges
(82)
- باب حث السلطان والقاضي وغيرهما من ولاة الأمور على اتخاذ وزير صالح وتحذيرهم من قرناء السوء والقبول منهم
Riyad as-Salihin 677
Abu Sa'id and Abu Hurairah (May Allah be pleased with him) reported:
Messenger of Allah (ﷺ) said, "Allah neither raised up any Prophet nor did He authorize any person with ruling power but for whom there were two types of entourage: one enjoins upon him to do good and incites him to carry it out, and the other enjoins evil and goads him; and the protected (from the bad entourage) is the one whom Allah protects."

[Al-Bukhari].

-عن أبي سعيد وأبي هريرة رضي الله عنهما أن رسول الله صلى الله عليه وسلم قال ‏:‏ “ما بعث الله من نبي، ولا استخلف من خليفة إلا كانت له بطانتان بطانة تأمره بالمعروف وتحضه عليه، وبطانة تأمره بالشر وتحضه عليه، والمعصوم من عصم الله” ‏(‏‏(‏رواه البخارى‏)‏‏)‏‏.‏
Reference : Riyad as-Salihin 677
In-book reference : Introduction, Hadith 677