Jareer reported,

He said, "I pledged allegiance to the Prophet ﷺ to listen and obey, and he prompted me to add, 'as far as I am able, and to give sincere counsel to every Muslim.'"In another wording, "I pledged allegiance to the Messenger of Allah to establish the prayer, to give the zakat, to give sincere counsel to every Muslim, and to dissociate from the polytheist."

Azami 7628

Sahih

عن جرير

قال بايعت النبي ﷺ على السمع والطاعة فلقنني: فيما استطعت، والنصح لكل مسلم. وفي لفظ: بايعت رسول الله على إقام الصلاة، وإيتاء الزكاة، والنصح لكل مسلم، وعلى فراق المشرك.

الأعظمي 7628صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Leadership
Section
Obligation of obeying those in authority in matters that are not disobedience to Allah
Numbering
Jami al-Kamil 7628 (2nd edition)