The Ontario government's top IT official says he was directed by cabinet office to give special computer administrative rights to a top aide to former premier Dalton McGuinty.

Chief information officer David Nicholl says he didn't have the authority to give McGuinty's chief of staff, David Livingston, special access to computers in the premier's office.

Nicholl said Livingston told him he wanted the computer hard drives wiped before Kathleen Wynne took over as premier on Feb. 11, 2013.

But he also testified that Livingston had been warned that it would be inappropriate to delete email accounts when they could contain gas plant documents requested by a legislative committee.

The OPP is investigating possible breach of trust charges for the alleged deletion of correspondence on the Liberals' decisions to cancel two gas plants prior to the 2011 election, at a cost of $1.1 billion.

Nicholl also denied having a long-standing friendship with Livingston, saying the two had attended some of the same meetings when they both worked for TD Bank 22 years ago but hadn't remained in touch or ever been friends.

Progressive Conservative energy critic Lisa MacLeod cautioned Nicholl against perjury in his testimony, but the veteran civil servant insisted he was telling the truth.

It was the Liberals' initial refusal to turn over all the gas plant documents that prompted McGuinty to resign in October 2012 and prorogue the legislature for four months until Wynne was picked as the new party leader and premier.

Ontario's Information and Privacy Commissioner also lashed out at the governing Liberals for what she said was the illegal deletion of gas plant emails in a special report last summer.