Genesis 40:4
And the chief marshal gave Joseph a charge with them, and he served them. And they continued a season in ward.
Genesis 37:36
And the Midianites sold him in Egypt unto Potiphar, a lord of Pharaoh's: and his chief marshal.
Genesis 39:1
Joseph was brought unto Egypt, and Potiphar - a lord of Pharaoh's, and his chief marshal, an Egyptian - bought him of the Ishmaelites which brought him thither.
Genesis 39:21-23
but the LORD was with Joseph and showed him mercy, and got him favour in the sight of the keeper of the prison;
Psalm 37:5
Commit thy way unto the LORD, set thy hope in him, and he shall bring it to pass.