The ruling marked another setback for the administration after lower courts had also rejected the Department of Justice's (DOJ) demand.