Sahih al-Bukhari 3150
Narration text is preserved in its supplied Arabic and English. Translated interfaces and reading guides do not add narration translations in other languages.
فَمَنْ يَعْدِلُ إِذَا لَمْ يَعْدِلِ اللَّهُ وَرَسُولُهُ رَحِمَ اللَّهُ مُوسَى قَدْ أُوذِيَ بِأَكْثَرَ مِنْ هَذَا فَصَبَرَ "
Narrated `Abdullah:
On the day (of the battle) of Hunain, Allah's Messenger (ﷺ) favored some people in the distribution of the booty (to the exclusion of others); he gave Al-Aqra' bin H`Abis one-hundred camels and he gave 'Uyaina the same amount, and also gave to some of the eminent Arabs, giving them preference in this regard. Then a person came and said, "By Allah, in this distribution justice has not been observed, nor has Allah's Pleasure been aimed at." I said (to him), "By Allah, I will inform the Prophet (of what you have said), "I went and informed him, and he said, "If Allah and His Apostle did not act justly, who else would act justly. May Allah be merciful to Moses, for he was harmed with more than this, yet he kept patient."
Full reference and source
Sahih al-Bukhari 3150 In-book : Book 57, Hadith 58 USC-MSA web (English) : Vol. 4, Book 53, Hadith 378 (deprecated)
View source on Sunnah.com (opens in a new tab)