Abdullah bin Masud reported,

The Messenger of Allah ﷺ said, "There is no envy except in two cases. A man whom Allah has given wealth and the power to spend it in the cause of truth, and another whom Allah has given wisdom by which he judges and which he teaches to others."

Bukhari 7316

Sahih

حدثنا شهاب بن عباد حدثنا إبراهيم بن حميد عن إسماعيل عن قيس

عن عبد الله قال

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

البخاري 7316صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Bukhari
Book
Adhering to the Book and the Sunnah
Chapter
Striving of judges to rule by what Allah has revealed
Numbering
Darussalam 7316
Bukhari 7316