The warrants, which applied to 381 users' photos, private messages and other account information, could only be challenged by individual defendants after prosecutors gathered evidence, the Manhattan-based court unanimously ruled.
Facebook was backed in the case by a group of large Internet companies including Google and Microsoft Corp, which argued the case could set a troubling precedent giving prosecutors access to all kinds of digital information.
Internet companies are pushing back broadly against U.S. intelligence and law enforcement agencies' demands for customer data, in the wake of revelations by former National Security Agency contractor Edward Snowden of wide-ranging online surveillance.
The Manhattan District Attorney's office served the warrants on Facebook in 2013, seeking information on dozens of people later indicted for Social Security fraud, including police officers and firefighters who allegedly feigned illness in the wake of the Sept. 11, 2001 attacks.
The world's biggest online social network turned the records over to prosecutors last year after a state judge threw out its claim that the warrants violated users' Fourth Amendment rights, but it also went ahead with an appeal.
The court on Tuesday said the only way to challenge warrants was for defendants in criminal cases to move to suppress the evidence they produced.
A Facebook spokesman said the company disagreed with the decision and was considering an appeal.
A spokeswoman for the district attorney's office said prosecutors had secured nearly $25 million (roughly Rs. 159 crores) from people who were targets in the probe.
"In many cases, evidence on their Facebook accounts directly contradicted the lies the defendants told to the Social Security Administration," she said.
Prosecutors said Facebook pages showed public employees who claimed to be disabled riding jet skis, playing golf and participating in martial arts events.
Mariko Hirose, a lawyer with the New York Civil Liberties Union, which also submitted a brief in support of Facebook, said the court "side-stepped" an important question by ruling on Facebook's right to challenge the warrants and not on their legality.
The case is: In re 381 search warrants directed to Facebook Inc and dated July 23, 2013, Appellate Division, First Department, No. 30207-13.
© Thomson Reuters 2015
For the latest tech news and reviews, follow Gadgets 360 on X, Facebook, WhatsApp, Threads and Google News. For the latest videos on gadgets and tech, subscribe to our YouTube channel. If you want to know everything about top influencers, follow our in-house Who'sThat360 on Instagram and YouTube.