It is narrated that Sulayman ibn Yasar was very handsome. Once a woman wanted to force him into wrongdoing inside a house, but he refused. The woman kept pleading for his closeness, but he left the house and ran away, leaving the woman there.
Sulayman ibn Yasar says: After this trial, I saw Yusuf (peace be upon him) in a dream. I asked him: Are you Yusuf (peace be upon him)? He said: Yes, I am Yusuf, who had made an intention, and you are Sulayman, who was protected even from the intention.
Research on the hadith:
إسناده ضعیف۔ Its chain of narration is da’if (weak).
Imam al-Dhahabi says there is a break (inqita’) in its chain of narration.
Moreover, this incident would establish that Sulayman ibn Yasar is more perfect than Sayyiduna Yusuf (peace be upon him) in inclination, which is wrong.