A divided federal appeals court on Friday ruled in favor of the Trump administration’s policy of detaining millions of undocumented immigrants, even those who have been living in the US for decades, without the opportunity to challenge their detention, handing President Donald Trump a major win as he seeks to carry out an aggressive deportation campaign.