Former Director of National Intelligence James Clapper admitted on CNN that he has unmasked Americans during his time under the Obama administration, and defended doing so.

“So I did unmaskings during my six-and-a-half years at DNI, Susan did as well, and it was not done for political purposes whatsoever,” he said.

He also said National Security Adviser H.R. McMaster was “right” to approve Rice for a top secret security clearance in April, despite President Trump criticizing her for unmasking his campaign associates.

“Good on General McMaster, he’s a great soldier and he’s done exactly the right thing here,” Clapper said.

Clapper pointed out that “there’s no criminal activity connected with unmasking.” Clapper did not address, however, how classified intelligence with unmasked Trump associates made its way to the press, which is illegal.

A conversation former National Security Adviser Michael Flynn had with Russian Ambassador Sergei Kislyak was illegally leaked to the Washington Post in February.

Sally Yates, the former deputy attorney general under the Obama administration, admitted in May that Flynn was indeed unmasked, and said she discussed documents in which Flynn was unmasked with other members of the intelligence community.

Clapper further defended unmasking Americans swept up in foreign surveillance, even those their identities are shielded for moral, legal and privacy reasons.

“And I should explain that the nexus, the start of unmasking is a valid foreign intelligence target, and when that valid intelligence target is observed engaging with a U.S.person, it is perfectly appropriate, and in fact, I would argue irresponsible not to understand the significance and the context, and the only way you can do that is to know who it is,” he said.

House intelligence committee Chairman Devin Nunes sent a letter last month to current Director of National Intelligence Dan Coats saying that the committee has found that Obama aides had umasked hundreds of Americans — including Trump transition officials — with “remarkably few” specific reasons for doing so in their last year.

“Of those requests, only one offered a justification that was not boilerplate and articulated why that specific official required the U.S. person information for the performance of his or her official duties,” he said.

“There was no meaningful explanation offered by these officials as to why they needed or how they would use the U.S. person information.”