Abu Hurairah reported,

The Messenger of Allah ﷺ was asked, "Who among people is the most noble?"He replied, "The most noble of them before Allah is the most God-fearing."They said, "This is not what we are asking you about."He said, "Then the most noble of people is Yusuf, the prophet of Allah, son of the prophet of Allah, son of the prophet of Allah, son of the friend of Allah."They said, "This is not what we are asking you about."He said, "Then you are asking me about the lineages of the Arabs?"They said, "Yes."He said, "The best of you in the days of ignorance are the best of you in Islam, provided they gain understanding of the religion."Abu Usama followed the same narration from Ubaydullah.

Bukhari 4689

Sahih

حدثني محمد أخبرنا عبدة عن عبيد الله عن سعيد بن أبي سعيد

عن أبي هريرة رضي الله عنه قال

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

البخاري 4689صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Bukhari
Book
Tafsir
Chapter
His saying, "There have certainly been in Yusuf and his brothers signs for those who ask"
Numbering
Darussalam 4689
Bukhari 4689