Hillary Clinton's former chief of staff discussed the Democratic hopeful's secret email server with the IT aide who set the system up, but can't talk about it because she's now Clinton's lawyer.

Aide-turned-attorney Cheryl Mills testified for five hours on Friday as part of a Freedom of Information Act lawsuit launched by the conservative group Judicial Watch, which has been trying to get access to Clinton's emails during her tenure as secretary of state.

But Mills' attorney Beth Wilkinson shut lines of questioning down from Judicial Watch's lawyer Ramona Cotca arguing that something the former chief of staff learned after the fact as an attorney is not in the legal case's scope.

Scroll down for video

Hillary Clinton's former chief of staff Cheryl Mills later became the former secretary of state's attorney, meaning that much of what Mills learned while representing Clinton is privileged

Hillary Clinton - shown giving a press conference in March 2015 about the email scandal - is having her top aides deposed as part of a Freedom of Information Act lawsuit started by conservative group Judicial Watch

In her testimony, Mills talked about serving in the Clinton White House and then leaving Washington, D.C. for New York to work for the Oxygen Network and then New York University.

She later worked for Clinton when the New York senator was running for the White House in 2008.

Mills recalls thinking she'd return to NYU when Clinton, the incoming secretary of state, asked her to serve as chief of staff, something the former White House lawyer said she couldn't refuse.

At State, Mills was both chief of staff and also a counsel to Clinton, but a policy wonk, not the secretary of state's legal representation.

It wasn't until after the State Department, that Clinton made Mills her lawyer.

And according to her testimony, that's when she found out about her boss' secret server.

Mills was asked about her familiarity with Bryan Pagliano, a former Clinton IT aide who has immunity in an ongoing investigation into Clinton's emails by the FBI, which is separate from the Judicial Watch civil case.

'I know I spoke with Mr. Pagliano about the setup of the server during the period in which I was representing Secretary Clinton, which would have been two thousand – which would have been post her departure from the State Department,' Mills offered in her testimony.

'At least that's my best recollection,' Mills added.

Cotca asked if that would have been post-February of 2013, when Clinton handed the reins over to the current Secretary of State John Kerry.

'Yes,' Mills replied.

'Was he working for the Clintons at the time that you spoke to him about the about the setup of the server?' the Judicial Watch attorney continued.

Lawyers for Judicial Watch want to know information about the setup of Hillary Clinton's secret email server, which Cheryl Mill's attorney argued on Friday is privileged because Mills later became Clinton's lawyer

At that point, Wilkinson – wife of former 'Meet the Press' host David Gregory –stepped in with an 'objection.'

Mills testified that she didn't have a 'technological background' and thus wouldn't have had conversations about the server 'until the time period where I was representing Secretary Clinton.'

That, Mills lawyer argued, meant that the information was privileged.

'I'm representing Ms. Mills, as we know, and she represents Hillary Clinton as her personal lawyer,' Wilkinson argued. 'And you are now asking about work she has done for Hillary Clinton as her lawyer.'

'And it is beyond the scope of permissible discovery, and so I am instructing her not to answer,' Wilkinson said.

And with that, Mills didn't answer the question.

The Daily Caller counted 15 separate lines of questioning that Wilkinson batted down.

Mills also pointed to the highly controversial Benghazi attack, on Sept. 11, 2012, as a reason for why some of the public records requests were a mess.

The aide, according to the Washington Times, said there was 'a lot going on.'

'The secretary was not only transitioning, there had been a – we had lost our first ambassador in quite some time, and we were stepping through the sets of issues associated with that,' Mills said.

'And she, too, had fallen ill, and there – and there had been a period of time where we were obviously navigating a whole set of issues in that space,' Mills continued.