The government will start reviewing social media posts as part of background checks for employees seeking security clearance.
Director of National Intelligence James Clapper signed off on the new policy on Thursday.
Investigators will be able to mine publicly available posts but cannot ask individuals to provide their private passwords.
"It may surprise many readers to know the government only now is codifying its approach to the virtual lives of the people it entrusts with real secrets," William Evanina, who leads the National Counterintelligence and Security Center said.
He said the policy is the result of a long process to take civil liberties and privacy rights into account.
The policy says that investigators will only pursue social media information on people who are undergoing the clearance check. Social media information inadvertently collected about individuals won't be retained unless it is "relevant" to the security status of the individual undergoing the background check.
Congress has pushed federal agencies to start using social media reviews in background checks.
The budget deal passed in December 2015 required the director of national intelligence to have military agencies and the intelligence community bolster their security reviews for people with access to classified information. The provision specifically called for reviews of social media.
"It defied common sense for the government to overlook social media data available to anyone with an internet connection," Oversight Chairman Jason ChaffetzJason ChaffetzCongress's latest hacking investigation should model its most recent Fox News Audio expands stable of podcasts by adding five new shows The myth of the conservative bestseller MORE (R-Utah) said. "I am glad [the director of national intelligence] is taking a big step toward fixing such a glaring lapse in our security clearance process."
Lawmakers for the most part applauded the new policy. But a number of them questioned why the government would not ask individuals about their social media handles and usernames so they can be easier for the government to track down. Rep Mark Meadows (R-N.C.) said it could be helpful for people using dummy accounts to post online.
"I'm not going to give it in a public forum, but I have actually Twitter accounts that don't actually have my name associated with them, and yet I would tweet out things based on that," he said.
The policy was announced and handed to lawmakers at 11 p.m. Thursday night. It came only hours before lawmakers on the House Oversight Committee held a hearing with testimony from officials at the Office of the Director of National Intelligence and the Office of Personnel Management, which conducts many federal background checks.
OPM Acting Director Beth Cobert said her agency, which conducts about 95 percent of the government's background checks, "looks forward to implementing the policy."
The average price for the government to collect social media information on a single individual ranges between $100 and $500. Officials said they plan to run a number of pilot programs to see whether the information is actually useful and whether it could help cut down on costs in others areas. They will also be looking to drive that price down with automation.
"Some degree of automation is ultimately going to have to bring the cost down of that," said Tony Scott, U.S. chief information officer for the Office of Management and Budget.
Updated 10:25 a.m.