Genesis 40:4
And the chief of the guard appointed Joseph [to be] with them, and he attended them. And they were in custody {many days}.
Genesis 37:36
And the Midianites sold him in Egypt to Potiphar, a court official of Pharaoh, a commander of the imperial guard.
Genesis 39:1
Now Joseph had been brought down to Egypt, and Potiphar, a court official of Pharaoh, commander of the guard, an Egyptian, bought him from the hand of the Ishmaelites who had brought him down there.
Genesis 39:21-23
And Yahweh was with Joseph, and showed loyal love to him, and gave him favor in the eyes of the chief of the prison.
Psalm 37:5
{Commit to} Yahweh your way; Trust also on him and he will act.