CLEVELAND - A report prepared by the U.S. Office of Special Counsel (OSC) has found that Housing and Urban Development Secretary Julian Castro violated the Hatch Act, which prohibits federal employees from engaging in political activity while acting in their official capacity, a source with knowledge of the report told BuzzFeed News.

Castro, the OSC found, violated the Hatch Act during an April interview with Yahoo's Katie Couric.

In that interview, Castro discussed a new HUD policy to expand internet access to children and the difficulty of attaining housing loans. Couric then moved to the topic of Hillary Clinton's campaign.

"Taking off my HUD hat for a second and speaking individually," Castro began, calling Clinton the most experienced presidential candidate. He criticized Republicans for seeking to "pick and choose who gets opportunity," saying that Muslims, immigrants, and gays are on the outside looking in with regards to Republican policy.

Responding to Couric's question on speculation that Clinton could pick him as her vice presidential nominee, he said, "My hope is that whoever does get asked will take that decision very seriously. I don’t believe that’s going to be me."

The Hatch Act, passed in 1939, states the report will be referred to President Obama “for appropriate action."

In Castro's official response, he wrote "in responding to a journalist's question about the 2016 election, I offered my opinion to the interviewer after making it clear that I was articulating my personal view and not an official position. At the time, I believed that this disclaimer was what was required by the Hatch Act. However, your analysis provides that it was not sufficient."

He added that he tasked his executive team with enhancing training of the act's requirements and adjusting how these types of interviews are handled in the future.

It's not the first time an Obama official was found to have violated the Hatch Act by OSC. In 2012, Health and Human Services Secretary Kathleen Sebelius was found to have engaged in political activity while acting in her official role, during a speech at the Human Rights Campaign Gala. Sebelius told attendees that Obama needed to be reelected to continue the administration's work and that North Carolina Lt. Gov. Walter Dalton “needs to be the next governor of North Carolina."

The report issued by OSC found that "while a violation of the Hatch Act occurred, Secretary Sebelius’ statements would have been permissible if they had been made in her personal capacity."

After the report, Sebelius reclassified the event from official to political and reimbursed the Treasury Department for the cost of the trip.

The source with knowledge of the report said Castro has said that he didn’t travel on HUD money, and thought he was acting on the guidance he had received to avoid problems with the Hatch Act.

Two weeks ago, the Obama administration announced a decision to prohibit cabinet officials from addressing the Democratic National Convention in support of Clinton. Both Castro and Department of Labor Secretary Tom Perez have been floated as vice presidential contenders.

Democrats with knowledge of the report believe the Hatch Act complaint was filed by America Rising, a super PAC and conservative opposition research firm.

But America Rising said that neither it nor any of its affiliate groups filed a complaint against Castro.

"Rather than pointing fingers, Democrats should be first in line to ensure that Secretary Castro, who their nominee may reportedly place one heartbeat away from the presidency, has not used his official role to engage in partisan politics," said Amelia Chassé of America Rising PAC.

Two sources said the majority of FOIA requests for information from the housing department are made in search of information about Castro's work by conservative groups, doing the unsurprising work of tracking the appearances and remarks of a vice presidential contender. Earlier this year, the Foundation for Accountability and Civic Trust, a nonprofit concerned with ethics issues, sent a letter to Castro and other cabinet officials warning them about political activity.

A spokesperson with HUD would not comment. The Democrats familiar with the situation downplayed the Hatch Act violation as an example of the type of technical error that can occur within the large federal system.

“It’s de minimis, but he did acknowledge the error,” Rep. Joaquin Castro, his brother, told BuzzFeed News.