Mayor Bill de Blasio’s aides violated state law and city regulations in barring journalists from a meeting he attended with members of the Communications Workers of America at a Brooklyn public school in July, according to a new report by two city investigative agencies.

Events held in school buildings must be “nonexclusive and open to the general public,” including the news media, according to the joint report by Mark G. Peters, commissioner of the Department of Investigation, and Richard J. Condon, special commissioner of investigation for the city schools.

Political events are banned from being held in schools, and the report said the mayor’s meeting with union workers might have qualified as a political meeting, but that investigators could not be sure. Though they asked the mayor’s office for recordings or written accounts of what was said there, “none was received.”

The possible political activity also may have violated the city’s conflicts of interest law, Mr. Condon said in an interview.