New York state’s highest court on Tuesday rejected Facebook’s challenge to 381 search warrants to uncover suspected widespread Social Security disability fraud by its customers.
By a 5-1 vote, the Court of Appeals said it lacked jurisdiction to hear Facebook’s appeal over warrants obtained by the office of Manhattan District Attorney Cyrus Vance Jr.
The decision is a defeat for Internet privacy advocates such as the New York Civil Liberties Union and the Electronic Frontier Foundation, as well as technology and social media companies including Apple, Google, Microsoft and Twitter that supported Facebook’s appeal.
Prosecutors had in July 2013 obtained the warrants ordering Facebook to turn over account information belonging to people suspected of criminal fraud.
Get Data Sheet, Fortune’s technology newsletter.
Sixty-two of the Facebook users were later indicted in the probe, out of 134 overall, court papers show.
Among the targets were retired police officers and firefighters suspected of feigning illness after the Sept. 11, 2001 attack on the World Trade Center.
Facebook argued that the warrants were overbroad, and that Vance went too far by prohibiting the Menlo Park, Calif.-based company from telling users that the warrants existed.
It complied with the warrants after prosecutors threatened to hold it in criminal contempt, but continued the appeal.
Writing for the appeals court, Judge Leslie Stein said it was up to targets of the warrants, not third parties such as Facebook, to challenge the warrants’ validity.
While Facebook’s concern about overbroad warrants, and its effect on users’ privacy rights including under the U.S. Constitution, “may not be baseless,” it was up to the state legislature to change the law, Stein wrote.
Tuesday’s decision upheld a July 2015 ruling by an state appeals court in Manhattan. One judge recused himself.
For more about Facebook, watch:
Judge Rowan Wilson dissented, saying the decision deprived Facebook of “any meaningful recourse” against the “en masse” data seizure, including from high school students who had the misfortune of knowing people suspected of disability fraud.
“Although seizing social media content to help curtain widespread disabilities fraud may seem to some a good bargain,” Wilson wrote, “the concern of this case … is not with crime waves, but with the protection of the individual against the power of the government.”
Facebook (FB) said it was disappointed by the decision and evaluating its legal options, but “encouraged to see the thorough dissent that supports Facebook’s position arguing for people’s online privacy.”
Joan Vollero, a spokeswoman for Vance, said his office was pleased with the outcome.