Genesis 39:1-4 NIV
Now Joseph had been taken down to Egypt. Potiphar, an Egyptian who was one of Pharaoh’s officials, the captain of the guard, bought him from the Ishmaelites who had taken him there.
The LORD was with Joseph so that he prospered, and he lived in the house of his Egyptian master. When his master saw that the LORD was with him and that the LORD gave him success in everything he did, Joseph found favor in his eyes and became his attendant. Potiphar put him in charge of his household, and he entrusted to his care everything he owned.
NIV: New International Version