Facebook is finding supporters in a fight stemming from court-approved search warrants in 2013 that allowed law enforcement officials to review accounts belonging to users suspected of fraud.

An amicus brief filed Friday by the New York Civil Liberties Union–and supported by the ACLU–argues that the search warrants never should have been approved by the court because they were too broad and “profoundly invasive.”

Several technology companies also signed on to a brief in support of Facebook’s position Friday, including Google, Dropbox, LinkedIn, Microsoft, Twitter, Yelp, Foursquare, Kickstarter, Meetup and Tumblr.

Though the searches were already conducted and indictments filed by the Manhattan District Attorney’s office, Facebook is appealing to prevent similarly broad probes in the future and to ensure the information is ultimately returned to unindicted suspects or destroyed.

Prosecutors obtained the warrants from a judge in July 2013 to search 381 accounts. Facebook attempted to block the searches, but the judge sided with law enforcement and slapped Facebook with a gag order, preventing the company from notifying its users about the warrants.

The gag order was lifted in June, and Facebook’s deputy general counsel issued a statement.

The case highlights a growing problem for technology companies that trade in personal data to sell targeted advertising. At some point, the information stored on massive server farms owned by technology companies might be handed over to the government.

Facebook and other technology companies have criticized the kind of mass surveillance techniques exposed by former National Security Agency contractor Edward Snowden. But unlike the surreptitious methods used by intelligence officials, prosecutors in New York obtained a search warrant from a judge.

So why are Facebook and civil liberties groups complaining? They say Facebook accounts shouldn’t be treated like one, single source of information. Facebook “is at once a message board, an email service, a diary, a calendar, a photo book, a video archive, and much more,” the civil liberties group wrote in their brief, and it can reveal “medical information, political affiliations, hobbies, pastimes, and romantic life.”

A search warrant “has to heave meaningful limitations,” says Mariko Hirose, a lawyer for the New York Civil Liberties Union and one of the authors of the brief. “There are lots of ways this warrant could have been more limited,” she said.

As more and more criminal activity takes place in the digital realm, so too will law enforcement. But laws governing investigative techniques are still based mostly on the physical world. As more legal battles like the one between Facebook and the Manhattan District Attorney occur, the laws will be come clearer.

“Just because that’s the way we use technology nowadays, I don’t think it means people are giving up their rights to privacy,” Hirose said. “Courts should and are recognizing the realities of the digital age.”

Update: The Manhattan DA’s office later issued a statement:

“Facebook is not a defendant in the present case, which resulted in charges against more than 100 people for stealing from U.S. taxpayers. Two judges have previously ruled that the District Attorney’s request was lawful. Prosecutors have a right and a responsibility to collect evidence in criminal cases, wherever that information is stored.”