Genesis 40:4
The captain of the guard appointed Joseph to be their attendant, and he served them. They spent some time in custody.
Genesis 37:36
Now in Egypt the Midianites sold Joseph to Potiphar, one of Pharaoh's officials, the captain of the guard.
Genesis 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 39:21-23
But the Lord was with Joseph and showed him kindness. He granted him favor in the sight of the prison warden.
Psalm 37:5
Commit your future to the Lord! Trust in him, and he will act on your behalf.