Pharaoh
Genesis 39:20
And Joseph's master took him, and put him into the prison, a place where the king's prisoners were bound: and he was there in the prison.
Genesis 40:2
And Pharaoh was wroth against two of his officers, against the chief of the butlers, and against the chief of the bakers.
Genesis 40:3
And he put them in ward in the house of the captain of the guard, into the prison, the place where Joseph was bound.
captain
Genesis 37:36
And the Midianites sold him into Egypt unto Potiphar, an officer of Pharaoh's, and captain of the guard.