The Tax Office has been forced to admit it secretly handed sensitive employment details on its own workforce to a private firm in an attempt to voter-profile an all-staff industrial ballot.
The ATO covertly supplied its contractor with the names, email addresses, locations of work and pay grades of each of its 19000 employees without their knowledge or consent.
In some cases private email and home addresses were supplied too.
The information was then used to build a picture of which groups of public servants within the Tax Office were likely to support or oppose the agency's industrial relations agenda.
The revenue agency says its lawyers have cleared it of any unlawful conduct in the affair, which was exposed by a freedom of information request by one of its own officials, but unions believe the ATO may have breached the Privacy Act and the Public Service Act with one union saying it is going to call in the privacy authority.
The Tax Office also says that home addresses were only supplied so that casual or staff on leave could be contacted with voting material and private email addresses were only supplied with the permission of employees.
The information was supplied to private contractor ORIMA who conducted enterprise agreement ballots at Tax in 2015 and 2016.
The data was handed over to allow managers to build up a picture of which group of its workers were voting 'no' and identify areas of resistance to the unpopular Abbott-era industrial policy the Coalition is trying to impose across the federal public service.
The two proposal for new enterprise agreements were put to the Tax Office's workforce in December 2015 and May and December 2016 and were each trounced in the workplace ballots by a majorities of 85 per cent 71 per cent and 71 per cent again.
But when they voted, the agency's officials had no idea how closely they were being profiled.
One workplace union, the Australian Service Union, says it intends to pursue the Tax Office's conduct with the federal privacy watchdog.
"The ATO Executive rigged the voting process so they could find out how groups of employees voted on three proposals for a new Enterprise Agreement," ASU official Jeff Lapidos said.
"This seems to breach the Privacy Act.
"We will report our concerns to the Privacy Commissioner."
But the Tax Office believes it is in the clear, legally, on its handover of the information to ORIMA.
Correspondence, seen by Fairfax, from senior ATO negotiator Fiona Dillon claims that both the Privacy Act and the Public Service Act gives the Commissioner of Taxation the legal power to hand over the information.
"Use of information for the management of employee relationships and related purposes including but not limited to conducting a ballot on a proposed Agency Agreement is authorised pursuant to these regulations," Ms Dillon wrote.
In response to questions from Fairfax, the ATO provided a statement on Monday.
"The ATO did not provide large amounts of employee data to our service provider," the statement said.
"Only core information was provided to our contracted ballot provider ORIMA Research.
"As advised during the voting period, only aggregated results from the vote have been provided to the ATO.
"This information has been made available to all staff.
"Individual responses were not made available to the ATO and we do not know how individuals voted.
"None of the employee information provided to ORIMA Research for the purpose of running the ballot was retained or used by them for any other purpose."