WASHINGTON — Senior Obama administration officials, including several in the White House, were warned by an outside management consultant early this year that the effort to build the HealthCare.gov site was falling behind and at risk of failure unless immediate steps were taken to correct the problems, according to documents released by House investigators.

The report, by McKinsey & Company, which was prepared in late March at the request of the Department of Health and Human Services, said that management indecision and a “lack of transparency and alignment on critical issues” were threatening progress, despite the tight deadline.

The McKinsey report found that the effort was at risk because of issues including “significant dependency on external parties/contractors,” as well as “insufficient time and scope of end-to-end testing,” and “parallel stacking of all phases,” all predictions that have turned out to be accurate. Briefings on the report were held in the spring at the White House and at the headquarters of the Health and Human Services Department and for leaders at the Centers for Medicare and Medicaid, congressional investigators said.

“The administration was on track — on track for a disaster — and yet officials refused to be transparent with the Congress and the American people,” said Representative Fred Upton, Republican of Michigan and chairman of the House Energy and Commerce Committee, which released the report. The McKinsey warnings were first reported online by The Washington Post.