I heard the Messenger of Allah ﷺ say, "There are three qualities by which the heart of a Muslim is never corrupted, sincerity in deeds for the sake of Allah, offering sincere counsel to those in authority, and adhering to the community, for their call encompasses those behind them."
سمعت رسول الله ﷺ يقول: ثلاث خصال لا يغل عليهن قلب مسلم أبدا: إخلاص العمل الله، ومناصحة ولاة الأمر، ولزوم الجماعة، فإن دعوتهم تحيط من ورائهم.
Ahmad (21590) narrated it, and Ibn Hibban (67) graded it sahih, both through the route of Shubah, who said, Umar bin Sulayman, from the descendants of Umar bin Khattab, narrated to us, from Abdul-Rahman bin Aban bin Uthman, from his father, from Zayd bin Thabit, and he mentioned it. Its chain of transmission is sahih.A narration with the same meaning has been reported from Ibn Masud, Jubayr bin Mutim, and others, all of which are cited in the Book of Knowledge.