Green was appointed as Secretary of State for Work and Pensions by Prime Minister Theresa May in July 2016. Following the June 2017 general election, he was appointed First Secretary of State and Minister for the Cabinet Office. After the results of an inquiry into allegations that he sexually harassed a woman and viewed pornography on a work computer were published, it was found that he had breached the ministerial code and he was instructed to resign from the Cabinet amidst the 2017 Westminster sexual misconduct allegations.