Almighty Allah said: And the king said: "Bring him to me. But when the messenger came to him (Joseph) said: "Return to your lord and ask him, 'What happened to the women who cut their hands? Surely, my Lord (Allah) is WellAware of their plot.
(The king) said (to the women): 'What was your affair when you did seek to seduce Joseph?" The women said: 'Allah forbid! No evil know we against him!" The wife of Al- 'Aziz said: "Now the truth is manifest (to all), it was I who sought to seduce him, and he is surely of the truthful."
(Then Joseph said. "I asked for this enquiry) in order that he (Al- 'Aziz) may know that I betrayed him not in secret. And, verily! Allah guides not the plot of the betrayers. And I free not myself (from the blame). Verily, the (human) self is inclined to evil, except when my Lord bestows His Mercy (upon whom He wills). Verily, my Lord is Oft-Forgiving, Most Merciful." Surah 12: 50-53