Sure Al-Kahf

18:91

كَذَٰلِكَ وَقَدْ أَحَطْنَا بِمَا لَدَيْهِ خُبْرًۭا

So war es. Und Wir haben ja umfassende Kenntnis von dem, was ihn betrifft.

Tafsir 18:91

This is the matter of Dhu’l-Qarnayn, and My knowledge has encompassed the power and strength he had.