Genesis 39:1

Joseph and Potiphar’s Wife

39:1 Now Joseph had been brought down to Egypt. An Egyptian named Potiphar, an official of Pharaoh and the captain of the guard, purchased him from the Ishmaelites who had brought him there.

Genesis 40:7

40:7 So he asked Pharaoh’s officials, who were with him in custody in his master’s house, “Why do you look so sad today?”