The ruling is the first definitive response to a barrage of legal suits against the surveillance effort, which was revealed in press accounts last December.
And last week, City Council Speaker Christine Quinn said broad support had been reached to create an inspector general post following an outcry over street stops, and surveillance of Muslims as revealed in stories by The Associated Press.
He also has repeatedly embraced the NYPD's surveillance and other counterterror programs after a series of stories by The Associated Press on the department's widespread spying on Muslims.