Facebook said the request was “by far the largest” it had ever received from a government body.
Photographs, private messages and other information were supplied to a New York court last year, but the process was only made public by a judge this week.
The ruling defined Facebook as a “digital landlord”.
A judge said this definition meant the company must comply with search warrants.
The original case investigated fraudulent claimants of US federal disability benefits, whose Facebook accounts apparently showed that they were in fact healthy.
The social media site was ordered to hand over information from the 381 accounts, which the court said contained “evidence of criminality”.
After an appeal was denied, Facebook complied with the request but protested that it violated the Fourth Amendment of the US constitution, which protects against “unreasonable searches and seizures”.
Facebook also voiced concerns about the lack of date restrictions on the warrant, which it argued allowed the US government to keep the data indefinitely, and the range of data requested, which it said would contain private material which bore no relation to the trial.
The proceedings have been kept private by the court, but after a fresh appeal by Facebook a New York judge has now made the court filing public.
Facebook said the government had obtained “gag orders”, preventing it from telling the account holders that it had been forced to hand over their data.
“This unprecedented request is by far the largest we’ve ever received – by a magnitude of more than ten – and we have argued that it was unconstitutional from the start,” wrote Chris Sonderby, a legal adviser to Facebook.
“Of the 381 people whose accounts were the subject of these warrants, 62 were later charged in a disability fraud case.
“This means that no charges will be brought against more than 300 people whose data was sought by the government without prior notice to the people affected.”
But a spokesperson for the Manhattan district attorney defended the court’s actions.
“This was a massive scheme involving as many as 1,000 people who defrauded the federal government,” said Joan Vollero.
“The defendants in this case repeatedly lied to the government about their mental, physical, and social capabilities. Their Facebook accounts told a different story.”
In a summation of the legal justification for the court’s decision, the judge wrote: “Facebook could best be described as a digital landlord, a virtual custodian or storage facility for millions of tenant users and their information.
“Hence, the search warrants authorize the search and seizure of digital information contained within the Facebook server.”
JtyUmfP6O8EThe US House Ethics Committee has voted to release its report on former Republican Representative…
ABC News has agreed to pay $15 million to President-elect Donald Trump to settle a…
South Korea’s parliament has voted to impeach President Yoon Suk Yeol over his failed attempt…
Israeli war planes have carried out more than 100 air strikes in Syria on December…
President-elect Donald Trump has threatened to impose 100% tariffs on the BRICS countries if they…
Syrian troops have withdrawn from the city of Aleppo following an offensive by rebels opposed…