WASHINGTON — The Obama administration has been eager to show momentum against the Islamic State after a conference last week dramatized the hurdles to countering the terrorist group’s propaganda. But the Pentagon may have gone too far in sharing its military planning.

On Thursday, a senior official from the American military’s Central Command told reporters that Iraqi and Kurdish forces, with help from the United States, were preparing to launch an assault to retake the Iraqi city of Mosul in April or May, before the searing heat of the Iraqi summer. The assault force, the official said, would consist of up to 25,000 Iraqi and Kurdish troops.

The unusual level of detail about timing and the size of the force ignited a furor on Capitol Hill, where Senator John McCain, the Arizona Republican who is chairman of the Armed Services Committee, and Senator Lindsey Graham, a South Carolina Republican, sent an angry letter to President Obama. They wrote that the disclosures “not only risk the success of our mission, but could also cost the lives of U.S., Iraqi, and coalition forces.”

Mr. McCain and Mr. Graham demanded to know whether the White House had authorized the disclosures and said the officials responsible must be held accountable. The White House responded that it had no involvement in the briefing, noting in a statement by a spokeswoman for the National Security Council, Bernadette Meehan, that “the U.S. military makes a judgment about what information is shared regarding their operations.”