Newly-unsealed legal documents have unearthed a "bitter fight" between the social networking giant and the New York district attorney, reports The New York Times. The personal data of 381 Facebook users was handed over to Manhattan prosecutors as part of an investigation last year, eventually leading to 130 of those individuals being indicted for allegedly defrauding the Social Security system. But according to Facebook, the scope of the warrants used to get that information was too broad, and there was little it could do to say no or alert those users, something the company is now attempting to keep from happening again — both in New York and the rest of the US.

It's a Fourth Amendment issue

Facebook's leaning on the Fourth Amendment, saying the government doesn't have the right to seize, look at, or keep private messages, shared media, or other communications of users without those people knowing. That's not a new stance, but according to court documents it's just what happened in the hunt for people who were cashing in with fake disability claims. The company took that issue to the New York Supreme Court, which shot down Facebook's effort to keep the data confidential, and further kept it from disclosing any information about the issue to users. It's now appealing the matter in the hopes of limiting the scope of government data requests, though The Times says that the DA's office is still investigating and that additional people could be indicted.

Facebook and other tech giants have previously complained about the level of detail they can disclose to the public about government data requests, both from the US and others. In its most recent report, covering the second half of 2013, Facebook said it had 12,598 requests for user data by the US government, 81.02 percent of which actually resulted in the company handing over data. About half those were for search warrants to view user accounts in search of evidence connected to crimes.

The disclosure of Facebook's legal battle comes just a day after a landmark Supreme Court decision that law enforcement may not search cellphones without a warrant. That issue also centered on the Fourth Amendment, which protects US citizens against unreasonable searches and seizures by the government. The matter made its way all the way up to the Supreme Court after two separate cases involving the use of cellphones on arrested individuals led to longer sentences after police were able to garner extra evidence.