The national building regulator needed to be "publicly exposed" for wasting taxpayer money after it made an "outrageous" decision to take legal action against two union officials for having a cup of tea, the federal court has said.

Federal Court Justice Tony North said the Australian Building and Construction Commission (ABCC) had wasted money taking legal action against the Construction, Forestry, Maritime, Mining and Energy Union officials.

Justice North dismissed the ABCC's case against two CFMEU officials, Mark Travers and Adam Hall for an alleged breach of
right of entry laws earlier this year and has now awarded costs to the union

"I hold the clear view that this is a case where the ABCC should be publicly exposed as having wasted public money without a proper basis for doing so, in my view," he said.