Sure Yusuf

12:34

فَٱسْتَجَابَ لَهُۥ رَبُّهُۥ فَصَرَفَ عَنْهُ كَيْدَهُنَّ ۚ إِنَّهُۥ هُوَ ٱلسَّمِيعُ ٱلْعَلِيمُ

Da erhörte ihn sein Herr und wendete ihre List von ihm ab. Er ist ja der Allhörende und Allwissende.

Tafsir 12:34

Allah answered his prayer and removed the scheme of the minister’s wife and that of the women of the city from him. He, may He be glorified, heard the prayer of Joseph – He hears the prayer of any person who prays to Him. He knew the condition of Joseph and He knows the condition of everyone besides him.