The White House directed the Department of Homeland Security, the Justice Department and various intelligence agencies to help build a legal foundation for the revamped executive order by demonstrating the seriousness of a potential security threat after the original order was blocked in court.