Bible Trivia Question for Monday 07/02/2018

I rose rapidly to become the most powerful man in the kingdom. Only the King could overrule me. But that was because I had to save the people from starving during a famine. Who am I?