WASHINGTON — Two members of President Trump’s cabinet appeared to retreat on Sunday from one of Mr. Trump’s signature campaign promises: to “immediately terminate” an Obama administration executive order meant to protect the legal status of children of undocumented immigrants.

“We’re not targeting them,” the homeland security secretary, John F. Kelly, said of such children in an interview on CNN’s “State of the Union.”

In a separate interview, on ABC’s “This Week,” Attorney General Jeff Sessions affirmed that the federal government did not “have the ability to round up everybody.”

Mr. Kelly said on CNN that “these people are caught between the law,” adding that “the president obviously is sympathetic.”

“But,” he added, “I just wish these kind of issues were dealt with legally by the United States Congress.”

Mr. Sessions made a similar observation in the ABC interview.

“There’s no doubt the president has sympathy for young people who were brought here at early ages,” he said. The administrations’s “first and strongest priority,” Mr. Sessions added, was the “criminal element.”

Mr. Trump said in February that he would approach Mr. Obama’s Deferred Action for Childhood Arrivals program, known as DACA, “with heart,” calling the so-called Dreamers it affects “absolutely incredible kids.”

“I have to deal with a lot of politicians, don’t forget, and I have to convince them that what I’m saying is — is right,” Mr. Trump said at the time. “The existing law is very rough. It’s very, very rough.”

On Friday, Mr. Trump told The Associated Press that undocumented immigrants brought here as children can “rest easy,” and that his agenda was “not after the Dreamers; we are after the criminals.”

Mr. Trump had a more nationalist posture during the campaign. “I want Dreamers to come from this country,” he said in February 2016. “We’re always talking about Dreamers for other people. I want the children that are growing up in the United States to be Dreamers also.”

Mr. Sessions was resolute on Sunday in arguing that the United States needed a more exacting immigration policy.

“Many of these are involved in criminal enterprises, hauling drugs and…