Sussex Police used the Regulation of Investigatory Powers Act to identify a senior officer as a journalistic source.
The inspector, Lee Lyons, has since been sacked by Sussex Police after he was found to have "formed and maintained" relationships with journalists. He was based at Eastbourne for a period.
There was no suggestion money changed hands and the Crown Prosecution Service decided not to bring criminal charges, UK Press Gazette has reported.
Earlier this month, in a document outlining 21 allegations against Lyons, Sussex Police published the content of messages the inspector exchanged with two local journalists and a BBC producer. They have not been named.
The force became aware of contact between the journalists and Lyons, it said, after "examination of devices owned by Sussex Police and analysis of Lee Lyons's personal devices, which were obtained with the necessary legal permissions". It said the records of journalists were not obtained.
The allegations against Lyons, which he did not contest, also included claims he contacted prostitutes while on duty, shared information with a lawyer friend and had been “rude, arrogant and unprofessional” to colleagues. He was suspended on 2 October and sacked earlier this month.
Detective Inspector Nick Wainwright said: "The incidents came to light when very sensitive details of four cases were passed over a matter of a few days to a journalist who then sought clarification of the information.
"As a result of this, Deputy Chief Constable Olivia Pinkney tasked the anti-corruption unit with identifying the source of the leak and a host of other incidents were discovered."
The force said in a statement: "Sussex Police became aware of contact with journalists as a result of examination of devices owned by Sussex Police and analysis of Lee Lyons's personal devices, which were obtained with the necessary legal permissions. The investigation has not required or involved any access to records of any other parties."
Sussex Police press office refused to tell Press Gazette whether these "legal permissions" were under RIPA.
But a Press Gazette Freedom of Information request has now confirmed the act was used.
The force said: "I can confirm that Lee Lyons' personal devices were lawfully seized under a Warrant and were then analysed under a RIPA authorisation."
Comments: Our rules
We want our comments to be a lively and valuable part of our community - a place where readers can debate and engage with the most important local issues. The ability to comment on our stories is a privilege, not a right, however, and that privilege may be withdrawn if it is abused or misused.
Please report any comments that break our rules.
Read the rules hereComments are closed on this article