The NSA campus in Fort Meade, Md. (Patrick Semansky/AP)

Morale has taken a hit at the National Security Agency in the wake of controversy over the agency’s surveillance activities, according to former officials who say they are dismayed that President Obama has not visited the agency to show his support.

A White House spokeswoman, Caitlin Hayden, noted that top White House officials have been to the agency to “express the president’s support and appreciation for all that NSA does to keep us safe.”

It is not clear whether or when Obama might travel the 23 miles up the Baltimore-Washington Parkway to visit Fort Meade, the NSA’s headquarters in Maryland, but agency employees are privately voicing frustration at what they perceive as White House ambivalence amid the pounding the agency has taken from critics.

An NSA spokeswoman had no comment.

Obama in June defended the NSA’s surveillance as lawful and said he welcomed the public debate prompted by revelations from former contractor Edward Snowden beginning that month.

A look at how the NSA collects cell phone data and uses it to track individual suspects.

Though Obama has asserted, for instance, that the NSA’s collection of virtually all Americans’ phone records is lawful and has saved lives, the administration has not endorsed legislation that would codify it. And his recent statements suggest he thinks some of the NSA’s activities should be constrained.

A senior administration official who was not authorized to speak on the record said that the White House would normally not endorse legislation so early in the process but that “it’s been clear . . . that we prefer legislation” that preserves the phone records program “while making some changes . . . to potentially strengthen oversight and transparency.”

Said Hayden: “The president has the highest respect for and pride in the men and women of the intelligence community who work tirelessly to protect our nation. He’s expressed that directly to NSA’s leadership and has praised their work in public. As he said: ‘The men and women of our intelligence community work every single day to keep us safe because they love this country and believe in our values. They’re patriots.’ ”

She noted that in recent weeks, Lisa Monaco, assistant to the president for homeland security and counterterrorism, and Denis McDonough, the White House chief of staff, visited Fort Meade “to express the president’s support and appreciation for all that NSA does to keep us safe.”’

Supporters of the NSA say staffers are not feeling the love.

“The agency, from top to bottom, leadership to rank and file, feels that it is had no support from the White House even though it’s been carrying out publicly approved intelligence missions,” said Joel Brenner, NSA inspector general from 2002 to 2006. “They feel they’ve been hung out to dry, and they’re right.”

A former U.S. official — who like several other former officials interviewed for this story requested anonymity because he still has dealings with the agency — said: “The president has multiple constituencies — I get it. But he must agree that the signals intelligence NSA is providing is one of the most important sources of intelligence today.

“So if that’s the case, why isn’t the president taking care of one of the most important elements of the national security apparatus?”

The White House, observers say, is caught between competing desires to preserve what it has said are valuable national security programs and to shield the president from criticism from allies abroad and civil-liberties advocates at home.

Some observers said it is not surprising that Obama would not travel to Fort Meade before internal and external reviews of surveillance activities have been completed. The reviews are expected to be done soon.

The NSA’s director, Gen. Keith Alexander, who is retiring in the spring after 81 / 2 years, has been the most vocal defender of the agency’s 35,000 employees. In speeches he has noted that more than 6,000 of them went to Iraq and Afghanistan to support the military. He has spoken of how 22 cryptologists were killed. “They’re the heroes — not the media leaker,” he said in a September speech, in a reference to Snowden.

NSA counterterrorism analysts have worked “every weekend for eight years since I’ve been here. . . . Twenty-four hours a day, seven days a week, they’re there to defend us,” he said then.

On Thursday, Obama said on MSNBC that he would be proposing “some self-restraint on the NSA” and “some reforms that can give people more confidence.”

In an interview with NBC last month, he said: “In some ways, the technology and the budgets and the capacity [at NSA] have outstripped the constraints. And we’ve got to rebuild those in the same way that we’re having to do on a whole series of capacities . . . [such as] drone operations.”

Civil-liberties advocates generally agree with that sentiment, but they would go further and say that the NSA’s bulk collection of domestic phone records is unlawful and ought to be ended.

Former officials note how President George W. Bush paid a visit to the NSA in January 2006, in the wake of revelations by the New York Times that the agency engaged in a counterterrorism program of warrantless surveillance on U.S. soil beginning after the Sept. 11, 2001, terrorist attacks. “Bush came out and spoke to the workforce, and the effect on morale was tremendous,” Brenner said. “There’s been nothing like that from this White House.”

A second former official said NSA workers are polishing up their résumés and asking that they be cleared — removing any material linked to classified programs — so they can be sent out to potential employers. He noted that one employee who processes the résumés said, “I’ve never seen so many résumés that people want to have cleared in my life.”

Morale is “bad overall,” a third former official said. “The news — the Snowden disclosures — it questions the integrity of the NSA workforce,” he said. “It’s become very public and very personal. Literally, neighbors are asking people, ‘Why are you spying on Grandma?’ And we aren’t. People are feeling bad, beaten down.”