First Amendment advocates say the SFPD broke state and federal law.
RELATED: Journalist Bryan Carmody has victory in court over San Francisco police in Jeff Adachi death investigation
In the court document, an SFPD investigator lists I-Team reports -- tweet by tweet, story by story -- on the death of San Francisco Public Defender Jeff Adachi in February at a North Beach apartment.
They wanted to know how we obtained the police report that included photographs of the scene, and concluded, "Dan Noyes was offered the death investigation report by Bryan Carmody, who obtained the report from a San Francisco Police Officer."
Carmody is a freelance journalist who shoots video, gathers information, and sells it to various media outlets, including ABC7.
In affidavit for search warrant, SFPD Sgt. Joseph Obidi writes that he believes I got Adachi report from Bryan Carmody, but “Carmody is not currently employed by any of the news organizations”. Never calls him journalist, nor does he mention Carmody’s SFPD Press Pass. #ABC7now pic.twitter.com/H59P3sIipC— Dan Noyes (@dannoyes) July 23, 2019
Based on that affidavit, the judge approved a warrant for Carmody's phone records, and later, another judge approved a raid on his home and office.
David Snyder, Executive Director of the First Amendment Coalition, tells the I-Team, "I think the police department has violated the California Constitution, I think they violated California law, I think they violated federal law in executing these search warrants. This is a huge deal."
The investigator did not tell the judge Carmody is a journalist, that he's had an SFPD press pass for 16 years.
RELATED: SFPD obtained warrant to launch secret surveillance against journalist in Adachi leak investigation
They listed him as "Freelance Videographer/Communications Manager, USO Bay Area" and wrote he "is not currently employed by any of the news organizations that obtained the death investigation report."
"I would say it's absolutely clear that the department should have known that Bryan Carmody is a journalist," says Snyder. "And I think it stretches credibility that they had no idea."
Police Chief Bill Scott declined our request for an interview Tuesday, but Dan Noyes questioned him at a news conference in May.
RELATED: I-Team questions police chief about raid on journalist's home, Jeff Adachi investigation
Dan Noyes: "How can you defend a raid on a journalist's home and office?"
Chief Bill Scott: "So, I'm not here to try to defend it, because there's a lot of information that we we really have to look at and reflect."
His staff now tells the I-Team the police department is reviewing protocols involving members of the news media, and the San Francisco Department of Police Accountability is investigating what happened.
At an appearance in San Francisco Tuesday, State Senator Scott Wiener said we must take steps to make sure this doesn't happen again. "The press is one of the cornerstones of our democracy," said Wiener. "And the last thing we need is police raids on journalists so that they can't even protect their sources."
The judge ordered six lines blacked out on the affidavit for someone she calls "a confidential informant"; it appears to be someone who identified Carmody as having that police report. But, under court order, all the information is not to be used in further legal action because the search warrant on a journalist was improper.
See the search warrant and affidavit here.
Take a look at for a look at more stories by Dan Noyes and the ABC7 News I-Team.