It wasnarrated from 'Abdullah bin Mas'ud that the Messenger of Allah(ﷺ) said:
"There is no (permissible) envy except in two cases: Amanwhom Allah has given wealth and caused him to dispose of it in aproper manner, and a man to whom Allah has given wisdom, and he actsin accordance with it and teaches it (to others)." (DE)
English reference (DE): Vol. 5, Book 37, Hadith 4208 (DE)
Arabic reference (DE): Book 37, Hadith 4348 (DE)