Petitioner supplies personal care services under contract with HRA to persons covered by the Medicaid program. At issue is a determination by HRA to recoup nearly $7 million in contested *516funds paid to petitioner under a program to promote recruitment and retention of personal care workers. The judgment appealed from granted HRA’s motion to dismiss the petition on the ground that petitioner failed to comply with the dispute resolution procedures contained in the governing agreement (CPLR 7804 [f]). At this juncture, HRA has neither answered the petition nor filed the transcript of the proceedings (CPLR 7804 [d], [e]), and we remand to develop the record, both as to whether HRA is authorized to recoup the funds and whether petitioner was excused from exhausting the contractual procedures.
The doctrine of exhaustion of administrative remedies applies “to contractual provisions which provide for dispute resolution procedures as a condition precedent to. any action or proceeding in the courts” (Pantel v Workmen’s Circle/Arbetter Ring Branch 281, 289 AD2d 917, 918 [2001]). However, a party may be relieved of the requirement to exhaust administrative remedies when “an agency’s action is challenged as . . . wholly beyond its grant of power” (Watergate II Apts. v Buffalo Sewer Auth., 46 NY2d 52, 57 [1978]). Where the petitioner demonstrates that such a challenge has substance (see e.g. Matter of First Natl. City Bank v City of N.Y. Fin. Admin., 36 NY2d 87, 92-93 [1975] [unconstitutional tax levy]; Matter of Huntington Yacht Club v Incorporated Vil. of Huntington Bay, 272 AD2d 327, 328 [2000] [lack of jurisdiction]), the court has the discretion to rely on this exception to the exhaustion requirement (see Bankers Trust Corp. v New York City Dept. of Fin., 1 NY3d 315, 322 [2003]).
Public Health Law § 2807-v (1) (bb) (iii) provides that the state Commissioner of Health “shall recoup any funds determined to have been used for purposes other than recruitment and retention of non-supervisory personal care services workers or any worker with direct patient care responsibility.” Neither the statute nor the memorandum of understanding between the New York State Department of Health (DOH) and HRA delegates this power to HRA. Significantly, respondents cite no specific statute or regulation that gives them the power to recoup funds awarded pursuant to Public Health Law § 2807-v (1) (bb). Nonetheless, it may be well within DOH’s power to delegate auditing responsibilities to another agency such as HRA (see Social Services Law §§ 364-a, 368-c [2]).
DOH has not been shown to be a necessary party (see CPLR 1001 [a]). Petitioner seeks no relief against it (see Knapton v Kitchin, 98 AD2d 937, 938 [1983]) and reversal is sought solely on the basis of HRA’s lack of power. Furthermore, a finding that HRA is without authority to recoup the subject funds will not impact the DOH Commissioner’s ability to recover the funds *517from petitioner and thus would not inequitably affect his interests. Concur — Tom, J.E, Saxe, Acosta, Freedman and Abdus-Salaam, JJ.