A legal challenge to New York City Mayor Bill de Blasio’s designation as the candidate of the Working Families Party was tossed on Thursday by the state’s highest court.

The state Supreme Court and Appellate Division Court had previously rejected the challenge brought by the Reform Party on the grounds the suit “had failed to name a necessary party” — in this case the executive board of the Working Families Party.

In an unanimous decision, the Court of Appeals upheld the lower court’s decision.

De Blasio, seeking a second term, faces former New York City Councilman Sal Albanese in a primary next month. Assemblywoman Nicole Malliotakis is the Republican nominee.

131opn17 Decision by Nick Reisman on Scribd