Bereishit (Genesis) 39:7—23
7After these things, his master’s wife her eyes upon Yosef and said to him, “Lie with me.” 8But he adamantly refused; he said to his master’s wife, “Look ― with me here, my master concerns himself about nothing in the house, and whatever he has placed in my custody. 9There is no one greater in his house than I, and he has denied me nothing but you, since you are his wife; how then can I perpetrate this great evil and have sinned against G-d!”
10And so it was ― just as she coaxed Yosef day after day, so he would not listen to her to lie beside her. 11Then there was an opportune day when he entered the house to do his work ― no man of the household staff being there in the house ― 12that she caught hold of him by his garment, saying, “Lie with me!” But he left his garment in her hand, and he fled, and went outside.
13When she saw that he had left his garment in her hand and fled outside, 14she called out to the men of her household and spoke to them saying, “Look! He brought us a Hebrew man to sport with us! He came to lie with me but I called out a loud scream. 15And when he heard that I raised my voice and screamed, he left his garment beside me, fled, and went outside!”
16She kept his garment beside her until his master came home. 17Then she told him a similar account saying, “The Hebrew slave whom you brought to us came to me to sport with me. 18But it happened when that when I raised my voice and screamed, he left his garment beside me, and ran outside.”
19And it was, when his master heard his wife’s words which she spoke to him, saying, “Your slave did things like this to me,” his anger flared up. 20Then Yosef’s master took him and placed him in the prison ― the place where the king’s prisoners were confined ― and he remained there in prison.
21HaShem was with Yosef, and he endowed him with charisma, and He put his favor in the eyes of prison warden. 22The prison warden placed all inmates of the prison in Yosef’s custody, and everything that was done there, he would accomplish. 23The prison warden did not scrutinize anything that was in his charge inasmuch as HaShem was with him; and whatever he did HaShem made successful.