New Jersey schoolkids got a lesson in presidential security when three classmates who hail from other countries were barred from joining a White House tour.

A group of seventh-graders from Henry Hudson Regional School in Highlands braved a snowstorm on Nov. 15 for a long-awaited bus trip to Washington, DC.

The bad weather and treacherous road conditions added hours to the drive and left no time for anything but their visit to 1600 Pennsylvania Ave. Even lunch on the White House lawn was canceled.

But the snafus didn’t stop there. Months in advance, the school had to send the White House visitors office a list of all students and adults expected to take the tour.

After the group made it through an initial checkpoint, Secret Service agents stopped three Henry Hudson students who didn’t have their passports or other identification required for non-US citizens.

“They are here on visas, but they didn’t bring any of that stuff,” a dad said. “They didn’t have any ID on them.”

The White House “boarding pass,” similar to an airline boarding pass, is sent to visitors in advance, officials said. Among other rules, it states that “all foreign nationals … regardless of age” must present a passport, alien registration card or US State Department-issued ID.

Henry Hudson administrators apparently did not verify that all students had the right ID before hitting the road, parents told The Post.

When the Secret Service denied entry to the three kids, principal Lenore Kingsmore stayed outside with them, said school board member Karen Horner.

“She was very upset. She was probably more upset than they were,” Horner said.

Kingsmore didn’t return calls.

The school has at least two students from Sweden and one from Colombia, a student said.

Some parents were upset by the Secret Service’s treatment of the youngsters.

“What are 12- and 13-year-olds going to do? It doesn’t make sense,” a dad said

“It’s disgusting. You don’t do that to children,” said another.

Stephanie Grisham, the first lady’s communications director, told The Post that previous presidents have been just as strict about non-citizen visitors.

“The requirement has not changed under our administration,” Grisham said.

A seventh-grade girl on the trip said “the bus ride took forever,” but spending about 45 minutes in the first floor of the White House was fun.

“We got to see a bunch of cool paintings,” she said. However, the students did not visit the Oval Office or spot President Trump or a family member.

As for her classmates who didn’t get in, she said, “It had to do with their passports. They didn’t know they had to bring them.”

On Facebook after the trip, the Henry Hudson Regional School District posted a group photo of the seventh-graders huddled in the cold outside a White House entrance.

The caption reads: “It was an experience to remember!”