Abdullah bin Masud reported,

On the day of Hunayn, the Prophet ﷺ favored certain people in the distribution. He gave Aqra bin Habis a hundred camels, gave Uyayna the same, and gave a number of the Arab nobles, favoring them that day in the division.A man said, "By Allah, this distribution is unjust, and the pleasure of Allah was not sought through it."I said, "By Allah, I will inform the Prophet ﷺ."So I came to him and told him, and he said, "Then who is just if Allah and His Messenger are not just? May Allah have mercy on Musa. He was harmed with more than this, yet he remained patient."

Bukhari 3150

Sahih

حدثنا عثمان بن أبي شيبة حدثنا جرير عن منصور عن أبي وائل

عن عبد الله رضي الله عنه قال

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

البخاري 3150صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Bukhari
Book
Obligation of the fifth
Chapter
What the Prophet ﷺ used to give to those whose hearts were to be reconciled and others from the fifth and similar sources
Numbering
Darussalam 3150
Bukhari 3150