*726In an action, inter alia, for declaratory and injunctive relief, the plaintiffs appeal (1) from so much of an order of Supreme Court, Kings County (Bayne, J.), entered August 16, 2011, as granted those branches of the cross motion of the defendant 1109-1113 Manhattan Avenue Partners, LLC, which were to dismiss the first, second, third, sixth, seventh, and eighth causes of action insofar as asserted against it pursuant to CPLR 3211 (a) (7), and “ordered as a matter of law that the remaining occupants of the premises leased by 1109-1113 Manhattan Ave. Partners to CIS Counseling Center are deemed licensees of CIS and are not tenants of the subject premises,” and (2) from so much of an order of the same court entered August 17, 2011, as granted those branches of the cross motion of the defendants CIS Counseling Center, Inc., and Donna DeCicco which were to dismiss the first, second, third, fourth, sixth, seventh, and eighth causes of action insofar as asserted against those defendants pursuant to CPLR 3211 (a) (7).
Ordered that the order entered August 16, 2011, is reversed insofar as appealed from, on the law, and those branches of the cross motion of the defendant 1109-1113 Manhattan Avenue Partners, LLC, which were to dismiss the first, second, third, sixth, seventh, and eighth causes of action insofar as asserted against it are denied; and it is further,
Ordered that the order entered August 17, 2011, is modified, on the law, by deleting the provisions thereof granting those branches of the cross motion of the defendants CIS Counseling Center, Inc., and Donna DeCicco which were pursuant to CPLR 3211 (a) (7) to dismiss the first, second, fourth, sixth, seventh, and eighth causes of action insofar as asserted against CIS Counseling Center, Inc., and the sixth, seventh, and eighth causes of action insofar as asserted against Donna DeCicco, and substituting therefor a provision denying those branches of that cross motion; as so modified, the order entered August 17, 2011, is affirmed insofar as appealed from, and it is further,
Ordered that the matter is remitted to the Supreme Court, Kings County, for further proceedings before a different Justice; and it is further,
Ordered that one bill of costs is awarded to the plaintiffs, payable by the defendants 1109-1113 Manhattan Avenue Partners, LLC, and CIS Counseling Center, Inc.
The plaintiffs alleged that they are tenants of a hotel that is *727located in Brooklyn and owned by the defendant 1109-1113 Manhattan Avenue Partners, LLC (hereinafter MAP). According to the complaint, MAP leased a section of the hotel, consisting of approximately 89 single-occupancy rooms, to the defendant CIS Counseling Center, Inc. (hereinafter CIS), which owns and operates an outpatient substance-abuse treatment program. The plaintiffs alleged that the defendant Donna DeCicco held herself out to be the “housing director” for CIS at the hotel. In order to obtain housing at the hotel, the plaintiffs were purportedly required to sign “transitional residency agreements,” which, among other things, limited their stay at the hotel to six to nine months, and conditioned their residency upon adherence to certain “house rules” and regular attendance at the outpatient substance-abuse treatment program owned and operated by CIS. The complaint alleged that MAP profited from this arrangement by charging CIS nearly six times the legal regulated rent. CIS allegedly profited from the arrangement by collecting rental payments directly from the New York City Human Resources Administration for each resident, and by charging Medicaid for each substance-abuse treatment session attended by the residents.
The plaintiffs commenced this putative class action on behalf of themselves and others similarly situated, inter alia, for a judgment declaring that (1) the single-occupancy rooms in which they were living were subject to rent stabilization in accordance with section 26-506 of the Administrative Code of the City of New York, and that they were permanent tenants, as that term is defined by 9 NYCRR 2520.6 (j) (first cause of action), (2) the agreement between MAP and CIS constituted an illusory tenancy (second cause of action), (3) MAP unlawfully harassed them in violation of section 27-2005 (d) of the Administrative Code of the City of New York (third cause of action), (4) CIS violated Mental Hygiene Law § 22.07 (b) and 14 NYCRR 815.4 (g) and 815.5 (a) (15) by, among other things, forcing and coercing the residents to participate in its substance-abuse treatment program (fourth cause of action), (5) the defendants evicted tenants from the hotel without legal process in violation of section 26-521 of the Administrative Code of the City of New York (fifth cause of action), (6) the transitional residency agreements were void pursuant to 9 NYCRR 2520.13 (sixth cause of action), (7) the transitional residency agreements were void as contrary to public policy (seventh cause of action), (8) the transitional residency agreements were void as unconscionable contracts of adhesion (eighth cause of action), and (9) the defendants violated section 27-2043 of the Administrative Code of the City of New York by refusing to install locks on the doors to the individual units occupied by the residents (ninth cause of action).
*728After the plaintiffs moved for a preliminary injunction and class certification, CIS and DeCicco cross-moved, pursuant to CPLR 3211 (a) (7), to dismiss the complaint insofar as asserted against them for failure to state a cause of action. MAP separately cross-moved, pursuant to CPLR 3211 (a) (7), to dismiss the complaint insofar as asserted against it for failure to state a cause of action. In an order entered August 16, 2011, the Supreme Court granted MAP’s cross motion, and, in effect, purported to make a declaration that the occupants remaining in the hotel were licensees of CIS, not tenants. In an order entered August 17, 2011, the Supreme Court granted the cross motion of CIS and DeCicco. The plaintiffs appeal.
Pursuant to CPLR 3001, “[t]he supreme court may render a declaratory judgment ... as to the rights and other legal relations of the parties to a justiciable controversy” (CPLR 3001). “[T]he demand for relief in the complaint shall specify the rights and other legal relations on which a declaration is requested” (CPLR 3017 [b]). A motion to dismiss the complaint in an action for a declaratory judgment “presents for consideration only the issue of whether a cause of action for declaratory relief is set forth, not the question of whether the plaintiff is entitled to a favorable declaration” (Staver Co. v Skrobisch, 144 AD2d 449, 450 [1988]; see Rockland Light & Power Co. v City of New York, 289 NY 45, 51 [1942]). Thus, “where a cause of action is sufficient to invoke the court’s power to render a declaratory judgment ... as to the rights and other legal relations of the parties to a justiciable controversy, a motion to dismiss that cause of action should be denied” (Matter of Tilcon N.Y., Inc. v Town of Poughkeepsie, 87 AD3d 1148, 1150 [2011] [citations and internal quotation marks omitted]; see St. Lawrence Univ. v Trustees of Theol. School of St. Lawrence Univ., 20 NY2d 317, 325 [1967]; Rockland Light & Power Co. v City of New York, 289 NY at 51). However, where the court, deeming the material allegations of the complaint to be true, is nonetheless able to determine, as a matter of law, that the defendant is entitled to a declaration in his or her favor, the court may enter a judgment making the appropriate declaration (see Hoffman v City of Syracuse, 2 NY2d 484, 487 [1957]; German Masonic Temple Assn. v City of New York, 279 NY 452, 457 [1939]; Washington County Sewer Dist. No. 2 v White, 177 AD2d 204 [1992]; Law Research Serv. v Honeywell, Inc., 31 AD2d 900, 901 [1969]). By contrast, if the material allegations of the complaint, taken as true, implicate “factual issues such that the rights of the parties cannot be determined as a matter of law, a declaration upon a motion to dismiss is not permissible” (Matter of Tilcon N.Y., Inc. v Town of Poughkeepsie, 87 AD3d at 1151; see Nadel v Costa, 91 AD2d 976 [1983]; Verity v Larkin, 18 AD2d 842 [1963]).
*729Here, the first cause of action was sufficient to invoke the Supreme Court’s power to render a declaration as to whether the rooms in the hotel in which the plaintiffs were living were subject to rent stabilization (see Administrative Code of City of NY § 26-506), and whether the plaintiffs were permanent tenants (see 9 NYCRR 2520.6 [j], [m]). Since a declaration of this nature would resolve “an actual controversy” (Watson v Aetna Cas. & Sur. Co., 246 AD2d 57, 62 [1998] [internal quotation marks omitted]; see Chanos v MADAC, LLC, 74 AD3d 1007 [2010]) between the plaintiffs and MAI] in its capacity as the alleged owner of the hotel (see Administrative Code of City of NY § 26-512), as well as between the plaintiffs and CIS, in its capacity as the alleged sublessor of the disputed rooms (see 9 NYCRR 2505.7 [b]), the Supreme Court erred in directing the dismissal the first cause of action insofar as asserted against MAP and CIS.
The second cause of action was sufficient to invoke the Supreme Court’s power to render a declaration as to whether the alleged agreement between MAP and CIS constituted an illusory tenancy (see generally Matter of Badem Bldgs, v Abrams, 70 NY2d 45, 52-53 [1987]; Primrose Mgt. Co. v Donahoe, 253 AD2d 404, 406 [1998]; Matter of Avon Furniture Leasing v Popolizio, 116 AD2d 280 [1986]; Stutt v Unique Restorations Co., 96 AD2d 1039 [1983]). As a declaration of this nature would resolve a justiciable controversy between the plaintiffs, on the one hand, and MAP and CIS, on the other, the Supreme Court erred in directing the dismissal of the second cause of action insofar as asserted against those defendants.
The amended complaint also was sufficient to invoke the Supreme Court’s power to render a declaration as to whether the plaintiffs were unlawfully harassed by MAI] in violation of Administrative Code of the City of New York § 27-2005 (d) (see Administrative Code of City of NY § 27-2004 [a] [48] [e], [g]). Accordingly, the Supreme Court erred in granting that branch of MAP’s cross motion which was to dismiss the third cause of action insofar as asserted against it. However, the amended complaint was insufficient to state a cause of action against CIS and DeCicco based on an alleged violation of Administrative Code of the City of New York § 27-2005 (d). Consequently, the Supreme Court correctly granted that branch of the motion of CIS and DeCicco which was to dismiss the third cause of action insofar as asserted against them.
Contrary to the contention of CIS, the plaintiffs may maintain an action for a judgment declaring that CIS violated provisions of the Mental Hygiene Law (see e.g. Heard v Cuomo, 80 NY2d *730684 [1993]; Marilyn S. v Independent Group Home Living Program, Inc., 73 AD3d 892 [2010]). Furthermore, the amended complaint was sufficient to allege a cause of action for a judgment declaring that CIS violated Mental Hygiene Law § 22.07 (b) and 14 NYCRR 815.4 (g) and 815.5 (a) (15). Accordingly, the Supreme Court erred in granting that branch of the cross motion of CIS and DeCicco which was to dismiss the fourth cause of action insofar asserted against CIS.
The sixth, seventh, and eighth causes of action were sufficient to invoke the Supreme Court’s power to render a declaration as to whether the transitional residency agreements were void pursuant to 9 NYCRR 2520.13, invalid as against public policy (see Estro Chem. Co. v Falk, 303 NY 83, 87 [1951]; Cvetichanin v Trapezoid Land Co., 180 AD2d 503, 504 [1992]), and void as unconscionable contracts of adhesion (see Morris v Snappy Car Rental, 84 NY2d 21, 30 [1994]; Matter of Love'M Sheltering, Inc. v County of Suffolk, 33 AD3d 923 [2006]), respectively. Since the amended complaint effectively alleged that MAI] CIS, and DeCicco participated in the enforcement of the transitional residency agreements, the Supreme Court erred in directing the dismissal of the sixth, seventh, and eighth causes of action insofar as asserted against those defendants.
Furthermore, since the material allegations of the complaint, taken as true, implicate factual issues such that the rights of the parties could not be determined as a matter of law, the court erred by, in effect, purporting to make a declaration, upon these cross motions to dismiss the complaint, that the remaining occupants of the premises leased by MAP to CIS were licensees of CIS and were not tenants at the subject premises (see Matter of Tilcon N.Y., Inc. v Town of Poughkeepsie, 87 AD3d at 1151; Nadel v Costa, 91 AD2d 976 [1983]; Verity v Larkin, 18 AD2d 842 [1963]).
The plaintiffs’ remaining contentions are without merit.
In light of repeated statements made by the Supreme Court during oral argument, which exhibited bias against the plaintiffs, we remit the matter to the Supreme Court, Kings County, for further proceedings before a different Justice. Skelos, J.P., Balkin, Chambers and Miller, JJ., concur.