Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
quran:12:6

And thus will your Lord choose you and teach you the interpretation of narratives and complete His favor upon you and upon the family of Jacob, as He completed it upon your fathers before, Abraham and Isaac. Indeed, your Lord is Knowing and Wise."  

Thus, in the way that you have seen, will your Lord prefer you, choose you, and teach you the interpretation of events, the interpretation of visions, and perfect His grace upon you, with prophethood, and upon the House of Jacob — ˹upon˺ his sons — as He perfected it, with prophethood, formerly on your fathers Abraham and Isaac. Truly your Lord is Knower, of His creatures, Wise’, in what He does with them.
القرآن:١٢:٦

وَكَذَٰلِكَ يَجْتَبِيكَ رَبُّكَ وَيُعَلِّمُكَ مِنْ تَأْوِيلِ الْأَحَادِيثِ وَيُتِمُّ نِعْمَتَهُ عَلَيْكَ وَعَلَىٰ آلِ يَعْقُوبَ كَمَا أَتَمَّهَا عَلَىٰ أَبَوَيْكَ مِنْ قَبْلُ إِبْرَاهِيمَ وَإِسْحَاقَ ۚ إِنَّ رَبَّكَ عَلِيمٌ حَكِيمٌ  

{وكذلك} كما رأيت {يجتبيك} يختارك {ربك ويعلمك من تأويل الأحاديث} تعبير الرؤيا {ويتم نعمته عليك} بالنبوة {وعلى آل يعقوب} أولاده {كما أتمها} بالنبوة {على أبويك من قبل إبراهيم وإسحاق إن ربك عليم} بخلقه {حكيم} في صنعه بهم.