“Jefferson’s notion of liberty, while visionary for its time, did not extend to all people,” said Leslie Greene Bowman, the president of the Thomas Jefferson Foundation, recognizing both the enslaved people who lived and worked at Monticello and the estate’s new public acknowledgment of Sally Hemings, the slave who bore Jefferson’s children.

Looming even more prominently over the ceremony was President Trump’s push for an immigration crackdown, the Supreme Court’s decision to uphold the Trump administration’s travel ban and the outcry over family separations at the border.

Several of the new citizens had lived in the United States for years, but felt buoyed by now having the right to vote, to be able to weigh in on Mr. Trump’s policies. And of the more than 30 countries represented at the ceremony, many of them — including Mexico, Iran and Canada — have repeatedly incurred the president’s ire.

At the ceremony, the influence of Mr. Trump’s policies was apparent, as a small group of speakers — including Andrew H. Tisch, the businessman and philanthropist — reminded the new citizens of the crucial role immigrants have played in American history and of the importance of embracing democracy.