WASHINGTON—More than 100 State Department diplomats and officials have signed a draft document formally protesting President Donald Trump’s immigration and refugee order, provoking a caustic rebuke Monday from the White House and exposing deep divisions within the new U.S. administration.

White House spokesman Sean Spicer warned Monday against undercutting Mr. Trump’s agenda and said “career bureaucrats” who don’t support his policies should consider leaving government.

...