Genesis 39:1-4 (NKJV)
1 Now Joseph had been taken down to Egypt. And Potiphar, an officer of Pharaoh, captain of the guard, an Egyptian, bought him from the Ishmaelites who had taken him down there.
2 The LORD was with Joseph, and he was a successful man; and he was in the house of his master the Egyptian.
3 And his master saw that the LORD was with him and that the LORD made all he did to prosper in his hand.
4 So Joseph found favor in his sight, and served him. Then he made him overseer of his house, and all that he had he put under his authority.