NSW Police investigated a group of gay police officers for drug use based on a complaint they had "loose morals" and were "promiscuous", a Sydney court has heard.

Three serving officers, Chris Sheehy, Steven Rapisarda, Shane Housego and former officer Christian McDonald are seeking compensation and an apology from NSW Police, arguing the complaint was false and homophobic.

They allege in 2015 they were targeted by a professional standards command internal inquiry into drug use because of their sexuality.

The six-month investigation, which included drug testing, later cleared the four men and all have said they do not take drugs.

They alleged their treatment was the result of a homophobic culture fostered by senior management at Newtown Police Station.

The NSW Civil and Administrative Tribunal heard the complaint was authored by an as-yet undisclosed superior police officer.

However counsel for the men, Brett Eurell, told the tribunal his clients believed the men's superior, then superintendent Simon Hardman, authored the complaint which prompted the investigation.

Reading from the partially redacted complaint, Mr Eurell said the men were falsely accused of being "notorious for their promiscuity" and that "drug use is thought to be fundamental in such indiscriminate sexual encounters".

"They frequent the Stonewall Hotel. Stonewall is a gay venue," the document was quoted.

"At best it is guilt by association based upon the anecdotal group's loose morals and reckless behaviours."

Police fight to keep name confidential

Lawyers for NSW Police confirmed the document was the original complaint but vigorously fought to keep the identity of the superior officer secret.

However, the tribunal ruled the identity of the author should be made public at a later date.

NSW Police lawyers had argued the redaction would protect the complainant against reprisals.

JJ Fernon SC for the police rejected claims the complaint was malicious because it was "just a document that reasonable people can interpret".

The allegations of discrimination appear to contradict the police force's own strategy to support sexually diverse communities with the aim of creating inclusive and respectful workplaces.

The hearing continues.