Genesis 40:4
The captain of the guard entrusted them to Joseph's custody, who took care of them, since they were to remain there in custody for a number of days.
Genesis 37:36
Meanwhile, down in Egypt, the Midianites sold Joseph to Potiphar, one of Pharaoh's court officials, who was also Commander-in-Chief of the imperial guards.
Genesis 39:1
Meanwhile, Joseph had been delivered to Egypt and turned over to Potiphar, one of Pharaoh's court officials and the Commander-in-Chief of the imperial guards. An Egyptian, he bought Joseph from the Ishmaelites, who had brought him down there.
Genesis 39:21-23
But the LORD was with Joseph. He extended gracious love to him, causing the prison warden to be pleased with Joseph.
Psalm 37:5
Commit your way to the LORD; Trust him, and he will act.