US president Donald Trump attends arguments over the legality of a policy he considers crucial to his hardline approach to immigration.