NEW YORK—Twelve New York City parents are suing the state’s education authorities to stop them from sending students’ personal data to private contractors.