The government will start scanning Facebook, Twitter, Instagram and other social media accounts of thousands of federal employees and contractors applying and re-applying for security clearances in a first-ever policy released Friday.

Federal investigators looking at applicants’ backgrounds to determine their trustworthiness will not ask for passwords or log in to private accounts, limiting their searches to public postings. And when they find information that has no relevance to whether they should have access to classified information, it will be wiped from government servers, the policy promises.

The directive from Director of National Intelligence James Clapper is an official acknowledgment that social media is a tool as important to security clearances as interviews with friends and family and other checks the government has made for decades.

More and more people, whether suspected terrorists or those who have allegedly committed mass shootings, have posted their intentions on public social media sites or talked about violent views. Just this week, the Secret Service said it would investigate Donald Trump’s former butler over his racially explicit Facebook posts calling for President Obama to be killed.

“Agencies make security clearance decisions using a ‘whole person approach’ to assessing who is an acceptable security risk,” Beth Cobert, acting director of the Office of Personnel Management, told lawmakers Friday at a hearing on the new policy. “One component of that approach in the 21st century is social media.”

Investigators will examine only information that is readily available through online searches. Applicants for clearances will not be required to disclose Facebook “friends” whose names are otherwise hidden, or reveal all of their Twitter handles.

William Evanina, Director of National Counterintelligence and Security Center, said Friday that federal investigators will only “intentionally collect” what he called “publicly available social media information.”

“Absent a national security concern, nothing will be investigated or held by government computers,” he told lawmakers on the House Oversight and Government Reform Committee.

OPM, which does one million background investigations every year for federal agencies, is starting a pilot program to test how social media will figure into the the security clearances required for tens of thousands of federal jobs and contracts.

Congress also is considering a bill to require similar new scrutiny during background checks of intelligence agency employees.

Officials told two panels of the House Oversight Committee that they have been considering social media searches for years, but struggled to balance the privacy rights of applicants with national security needs. And there are still many questions about how the new policy will work.

“We haven’t identified the full value of social media,” Evanina said. “Is the effort and resource allocation worthy of collecting it? Where do we allocate [these searches] during the investigative process? It will be resource-intensive.”

Right now, private companies charge the government anywhere between $100 and $500 to screen one applicant’s social media postings. Tony Scott, the Obama administration’s chief information officer, told lawmakers he hopes the process will take more advantage of automation to lower the cost.

Some lawmakers said they worry the government will scoop up too much detail in its net.

“How does this work?” asked Rep. Gerry Connolly (D-Va.), the top Democrat on the Oversight Government Operations subcommittee. “We’re talking about the block party in July in my cul-de sac. How do we flag the serious from the trivia? How do we make sure we don’t have some enormous depository of government information” that’s kept?

Evanina tried to reassure him that the government will not keep details about block parties and other musings, comments, links, opinions and details that are not relevant to a security clearance.

Other lawmakers were concerned that the new policy does not require searches for someone’s aliases or other social media identities they said could lead investigators to a lot of relevant information.

“Why would this not be a part of your new policy?” asked Rep. Mark Meadows (R-N.C.) chairman of the Government Operations panel.

Evanina promised to get back to him soon with answers and a decision on whether other online identities should be part of a background investigation.