Abu Hurairah reported,

The Messenger of Allah ﷺ was asked, "Who is the noblest of people?"He replied, "The most God-fearing of them."They said, "That is not what we are asking you about."He said, "Then the noblest of people is Yusuf, prophet of Allah, son of a prophet of Allah, son of a prophet of Allah, son of the friend of Allah."They said, "That is not what we are asking you about."He said, "Then are you asking me about the lineages of the Arabs? People are like ores. The best of them in the days of ignorance are the best of them in Islam, provided they gain understanding of the religion."

Azami 8402

Sahih

عن أبي هريرة

سئل رسول الله ﷺ من أكرم الناس؟ قال: أتقاهم الله قالوا: ليس عن هذا نسألك قال: فأكرم الناس يوسف نبي الله ابن نبي الله ابن نبي الله ابن خليل الله. قالوا: ليس عن هذا نسألك قال: فعن معادن العرب تسألوني؟ الناس معادن، خيارهم في الجاهلية، خيارهم في الإسلام إذا فقهوا.

الأعظمي 8402صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Stories of the prophets
Chapter
Ibrahim and his sons, peace be upon them
Section
Reports of Ishaq عليه السلام
Numbering
Jami al-Kamil 8402 (2nd edition)
Azami 8402