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:18:83

And they ask you, ˹O Muhammad˺, about Dhul-Qarnayn. Say, "I will recite to you about him a report."  

And they, the Jews, question you concerning Dhū’l-Qarnayn, whose name was Alexander; he was not a prophet. Say: ‘I shall recite, relate, to you a mention, an account, of him’, of his affair.
القرآن:١٨:٨٣

وَيَسْأَلُونَكَ عَنْ ذِي الْقَرْنَيْنِ ۖ قُلْ سَأَتْلُو عَلَيْكُمْ مِنْهُ ذِكْرًا  

{ويسألونك} أي اليهود {عن ذي القرنين} اسمه الاسكندر ولم يكن نبيا {قل سأتلو} سأقص {عليكم منه} من حاله {ذكرا} خبرا.