"And indeed, he was possessed of knowledge because of what We had taught him," Al-Hasan said: Meaning: because of what We had given him of prophethood.
Surah Yusuf from verse (69) to verse (77).