The suit was being filed Wednesday by the American and New York Civil Liberties Unions. It seeks class-action status.
The city's law department said it had not seen the lawsuit and therefore could not immediately comment.
School safety officers were brought under the police department about a decade ago. They can make arrests but they do not carry weapons. There are about 5,000 officers in the school district, the nation's largest, with 1 million students.