In the place of G-d; the best place to be
Genesis 39:21-23: “But the LORD was with Joseph and showed him mercy, and He gave him favour in the sight of the keeper of the prison. And the keeper of the prison committed to Joseph's hand all the prisoners who were in the prison; whatever they did there, it was his doing. The keeper of the prison did not look into anything that was under Joseph's authority, because the LORD was with him; and whatever he did, the LORD made it prosper.”
In the biblical account of the story of Joseph, we see that even under the most adverse conditions, Joseph, who was enslaved, was given authority – both by Potiphar and by the keeper of the prison - and he was trusted with that authority.
Why? Because the L-rd was with Joseph and prospered whatever he did.