He says releasing the message would not meaningfully contribute to public debate, and it is important for chief executives to be able to communicate effectively.
National Party public service spokesperson Simeon Brown had sought to have the message made public as part of an Official Information Act request for information about Allan's conduct or behaviour.
The message - between Ministry of Business, Innovation and Employment chief executive Carolyn Tremain and Kānoa head Robert Pigou - had been identified as within scope, but Tremain refused to release it to protect free and frank exchange of information between officials.
Brown complained, but Chief Ombudsman Peter Boshier backed Tremain in an opinion published on Tuesday.
"I recognise that it is important that chief executives and their senior managers are able to communicate in a free, frank and efficient manner. If such information was released, I believe officials would become more inhibited about communicating in this way in the future.
"This would likely result in less robust, efficient and engaged discussions between senior officials."
Brown had grilled Allan and her officials over the message and reports of poor relationships at Allan's ministerial office at a select committee late last month, but revealed little about the message except who sent and received it.
The ombudsman's report gave additional details, saying Tremain had asked as part of a longer conversation how the relationship with Allan - who had recently become the minister - was going.
Tremain provided some of this in a letter to Brown on 30 June.
"Our exchange was aimed at ensuring that MBIE was providing the minister with the best support in her regional engagements. I regularly exchange this type of information with my senior managers," she wrote.
Brown later responded to the ombudsman saying he accepted the reason for withholding the message, but believed it should be released anyway given media and political interest, to help ensure ministers were accountable, and help foster trust in government.
Boshier disagreed: "Having viewed and carefully considered the text message, I do not consider release of its exact content would contribute meaningfully to public debate to the extent required to outweigh the need to withhold it".
The message was one of several claims made about Allan's treatment of staff, but clear details about what happened remain scant, and Allan has strenuously denied ever facing serious allegations from, or shouting at, staff.
Department of Conservation Director-General Penny Nelson had said one staff member ended their secondment early and she had raised concerns with Ministerial Services, but no further problems arose and relationships improved.
In answer to an Official Information Act request, National Emergency Management Agency chief executive David Gawn also said he was aware of concerns regarding relationships in Allan's office, and further action was taken to resolve it.
Stuff also reported an anonymous senior public servant saying the minister had yelled and screamed at staff.
However, department heads - including Tremain, Pigou, and Justice Secretary Andrew Kibblewhite - said they had no concerns about current relationships with Allan.
The accusations came during Prime Minister Chris Hipkins' trip to China. When he returned, he said he was yet to speak to Allan about the matter in detail and planned to do so after he returned from Europe on 14 July.
He told RNZ the advice he had was that the allegations were historical and were dealt with at the time, but he would not express confidence in Allan until he could meet with her.