Exhibit (23)(f) Consent of Independent Registered Public Accounting Firm We consent to the reference to our firm under the caption "Experts" in Amendment No. 1 to the Registration Statement on Form S-3 (No. 333-119256) and the related Prospectus of CMS Energy Corporation dated February 1, 2005 for the registration of 5,000,000 shares of 4.50% Cumulative Convertible Preferred Stock, Series B and to the incorporation by reference therein of our report dated June 27, 2004 with respect to the financial statements of Emirates CMS Power Company PJSC for the year ended December 31, 2003 included in CMS Energy Corporation's Annual Report (Form 10-K/A) for the year ended December 31, 2003 filed with the Securities and Exchange Commission. /s/ Ernst & Young Abu Dhabi, United Arab Emirates January 27, 2005