Seems like people are debating this with the “Vacancies Reform Act of 1998”.
"There has been some commentary suggesting that because Whitaker was in a job (chief of staff) that did not require Senate confirmation, he could not become the “acting officer” in a position (AG) that calls for Senate confirmation. Not so. The Vacancies Act enables the president to name an acting officer, who may serve as such for 210 days, as long as the person named has been working at the agency or department for at least 90 days in a fairly high-ranking position. Whitaker qualifies.”