Hafiz Abdush Shakoor Tirmidhi
Benefits:
➊ The command of Allah, the Exalted, is: ﴿وَ لَقَدْ هَمَّتْ بِهٖ وَ هَمَّ بِهَا لَوْ لَآ اَنْ رَّاٰ بُرْهَانَ رَبِّهٖ کَذٰلِكَ لِنَصْرِفَ عَنْهُ السُّوْٓءَ وَ الْفَحْشَآءَ اِنَّهٗ مِنْ عِبَادِنَا الْمُخْلَصِیْنَ﴾ (Yusuf: 24) ... “That woman certainly intended him, and he would have intended her, had he not seen the proof of his Lord. Thus it was, so that We might turn away from him evil and indecency. Surely, he was among Our chosen servants.”
Hafiz Ibn Kathir rahimahullah has transmitted various statements: Sayyiduna Yusuf alayhis salam saw his father Yaqub alayhis salam at that moment.
➋ ... The imagined image of his master appeared before him.
➌ ... His gaze was raised towards the ceiling and he saw the verse: ﴿وَلَا تَقْرَبُوا الزِّنٰی اِنَّهٗ كَانَ فَاحِشَةً وَّمَقْتًا وَسَاءَ سَبِیْلًا﴾ (“And do not approach adultery. Indeed, it is ever an immorality and is evil as a way.”) written there.
In any case, something from Allah, the Possessor of Majesty, was shown to him, upon seeing which he, alayhis salam, succeeded in suppressing and rejecting the urge of the soul. Allah, the Possessor of Majesty, protected him; in this very way, Allah, the Possessor of Majesty, protects His prophets and friends (awliya).
Source: Musnad Ishaq bin Rahwayh, Page: 580