Zayd bin Thabit reported,

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."

Azami 7674

Sahih

عن زيد بن ثابت قال

سمعت رسول الله ﷺ يقول: ثلاث خصال لا يغل عليهن قلب مسلم أبدا: إخلاص العمل الله، ومناصحة ولاة الأمر، ولزوم الجماعة، فإن دعوتهم تحيط من ورائهم.

الأعظمي 7674صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Leadership
Section
Advising the ruler with gentleness, wisdom, and admonition
Numbering
Jami al-Kamil 7674 (2nd edition)
Azami 7674