“When his master heard the story his wife told him, saying, “This is how your slave treated me,” he burned with anger. Joseph’s master took him and put him in prison, the place where the king’s prisoners were confined. But while Joseph was there in the prison, the Lord was with him; he showed him kindness and granted him favor in the eyes of the prison warden.”
Genesis 39:19-21 NIV
12Now a young Hebrew was there with us, a servant of the captain of the guard. We told him our dreams, and he interpreted them for us, giving each man the interpretation of his dream. 13And things turned out exactly as he interpreted them to us: I was restored to my position, and the other man was impaled Genesis 40:12-13 NIV
And now let Pharaoh look for a discerning and wise man and put him in charge of the land of Egypt
Genesis 41:33