A group of Silicon Valley tech giants are urging Congress to reform National Security Agency authority that empowers the agency to potentially spy on millions of Americans incidentally while surveilling foreign targets.

Facebook, Google, Microsoft, and Twitter are among the 30 tech companies, trade groups, and lobbyists asking Congress to reform Section 702 of the 2008 Foreign Intelligence Surveillance Act (FISA) Amendments Act — authority the agency uses to tap the physical infrastructure of the internet, such as undersea fiber cables, to surveil the content of foreigners’ emails, instant messages, and other communications as they exit and enter the U.S.

The law legalizes broad electronic surveillance programs like Prism, leaked by NSA contractor Edward Snowden in 2013. Privacy advocates say such incidental collection facilitates a loophole that lets NSA incidentally sweep up unrelated data belonging to Americans in the process, and likely amounts to millions of warrantless interceptions.

The legal authority underpinning such “upstream” surveillance expires in December, and lawmakers have already held hearings on the law a mixed bag of Republicans and Democrats support and oppose.

“We are writing to express our support for reforms to Section 702 that would maintain its utility to the U.S. intelligence community while increasing the program’s privacy protections and transparency,” companies wrote to House Judiciary Chairman Bob Goodlatte.

Instead of a blanket reauthorization companies asked lawmakers to require NSA to get court authorization before querying “the contents of 702 material for the communications of U.S. persons (given that U.S. persons are not the target of 702).”

Companies asked for legal permission to release more details about the requests for data they receive from the government, including the number and type of information requested and declassification of warrants granted in secret by the Foreign Intelligence Surveillance Court.

They want Congress to curtail the definition of “foreign intelligence information” under FISA to reduce the likelihood of collecting data belonging to U.S. citizens “not suspected of wrongdoing” and codify a recent change to NSA policy ending so-called “about” collection.

In April, NSA ended the upstream practice of collecting Americans’ email and text messages exchanged with overseas users that simply mention search terms — like an email address belonging to a target — but isn’t to or from a target.

“Finally, there should be greater transparency around how the communications of U.S. persons that are incidentally collected under Section 702 are searched and used, including how often 702 databases are queried using identifiers that are tied to U.S. persons,” the letter reads.

The law expires Dec. 31 and lawmakers still have not received an estimate from NSA on the number of Americans swept up in 702 surveillance. Oregon Democrat Sen. Ron Wyden has been asking NSA and the Office of the Director of National Intelligence for the number since 2012, and recently renewed that request to Daniel Coats, President Donald Trump’s director of national intelligence.

In a letter sent ahead of Coats’ nomination signed by Goodlatte, lawmakers asked for the number again, with Coats later pledging “to do everything I can to work with Admiral Rogers in NSA to get you that number.” In a later hearing after getting the job, Coats said quantifying the number was harder than he initially expected after meeting with Rogers, and asked for more time.

Elizabeth Goitein, co-director of the Liberty and National Security Program at NYU Law’s Brennan Center for Justice, says such incidental collection likely amounts to millions or tens of millions of warrantless interceptions.

While Goitein says she hasn’t seen the authority abused (though Snowden disputes that), she and other advocates say they have seen the agency’s “mission creep, so that a law designed to protect against foreign threats to the United States has become a major source of warrantless access to Americans’ data and a tool for ordinary, domestic law enforcement.”

Austin Carson, executive director of the center-right D.C. think tank TechFreedom says companies “shouldn’t have to fear their government is breaking that trust” with their users.

“These proposed reforms represent a good-faith compromise to one of the most significant issues Congress must resolve this year,” Carson said of the letter. “They would maintain important national security tools while minimizing the impact on Americans.”

Carson said President Donald Trump’s own concerns about his campaign coming under surveillance during the 2016 election and having campaign associates’ identities unmasked in intelligence community reports, along with the authority’s looming expiration, should fuel the argument for timely reform.

Follow Giuseppe on Twitter

Subscribe for the Latest From InsideSources Every Morning