COUNSEL H 683 "Whenever Allah raised someone to be a prophet, or appoints a caliph he has two advisors, one counsels him with good and supports him in it, and the other counsels him with evil and entices him to it. Only the innocent person is saved from his sons by Allah." R 683 Bukhari with a chain up to Abu Sa'id Khudri and Abu Hurairah who relate that the Prophet, praise and peace be upon him,said this.
677- وعن أَبي سعيدٍ وأبي هريرة رضي الله عنهما : أنَّ رسولَ الله صلى الله عليه وآله وسلم ، قَالَ : "مَا بَعَثَ اللهُ مِنْ نَبِيٍّ ، وَلاَ اسْتَخْلَفَ مِنْ خَليفَةٍ إِلاَّ كَانَتْ لَهُ بِطَانَتَانِ : بِطَانَةٌ تَأمُرُهُ بالمَعْرُوفِ وتَحُضُّهُ عَلَيْهِ ، وَبِطَانَةٌ تَأمُرُهُ بالشَّرِّ وَتَحُضُّهُ عَلَيْهِ ، وَالمَعْصُومُ مَنْ عَصَمَ اللهُ" رواه البخاري .