Abdullah bin Abbas reported,

The Messenger of Allah ﷺ came out wearing a cloak draped over his shoulders, with a dark headband tied around his head, until he sat down on the pulpit. He praised Allah and extolled Him, then said:"To proceed. People, the people will increase in number while the Ansar will decrease, until they become like salt in food. So whoever among you takes charge of an affair in which he can harm or benefit someone, let him accept from the good-doer among them and overlook the wrongdoer among them."

Bukhari 3800

Sahih

حدثنا أحمد بن يعقوب حدثنا ابن الغسيل سمعت عكرمة يقول سمعت

ابن عباس رضي الله عنهما يقول

خرج رسول الله ﷺ وعليه ملحفة متعطفا بها على منكبيه وعليه عصابة دسماء حتى جلس على المنبر فحمد الله وأثنى عليه ثم قال أما بعد أيها الناس فإن الناس يكثرون وتقل الأنصار حتى يكونوا كالملح في الطعام فمن ولي منكم أمرا يضر فيه أحدا أو ينفعه فليقبل من محسنهم ويتجاوز عن مسيئهم

البخاري 3800صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Bukhari
Book
Virtues of the Ansar
Chapter
Prophet's ﷺ saying, "Accept from their good-doers and overlook their wrongdoers"
Numbering
Darussalam 3800
Bukhari 3800