In a rare snub of the Trump administration, the United Nations failed to approve an American candidate to head an international migration group.