A federal appeals court has ruled that the Trump administration exceeded its authority in attempting to…