In two related actions, inter alia, for specific performance of a contract dated August 8, 1975, the defendant Metropolitan Transportation Authority appeals from so much of an order of the Supreme Court, Queens County (Hart, J.), entered August 9, 2006, as denied its motion pursuant to CPLR 3211 (a) to dismiss the complaint insofar as asserted against it in action No. 1.
Ordered that the order is reversed insofar as appealed from, on the law, with costs, and the motion of the defendant Metropolitan Transportation Authority to dismiss the complaint insofar as asserted against it in action No. 1 is granted.
As a condition of the receipt of federal grant money to be used for the operation of bus services, the City of New York executed an agreement on August 8, 1975 (hereinafter the agreement), for the continuation of rights under existing collective *789bargaining agreements with certain private bus companies and the labor unions representing the employees of those private bus companies. A clause in the agreement (hereinafter the successors and assigns provision) provided that the agreement would be “binding upon the successors and assigns of the parties hereto,” and that “[a]ny person, enterprise, body, or agency, whether publicly or privately owned, which shall undertake the management and operation of the transit system, shall agree to be bound by the terms of this agreement.”
In 2004 the City announced that the Metropolitan Transportation Authority (hereinafter the MTA) would assume responsibility for providing the services provided by the private bus companies upon the expiration of the contracts between those private bus companies and the City. The MTA stated, in writing, that it would not “assume any preexisting liabilities, such as . . . pension obligations” of the employees of the private bus companies.
The plaintiff labor unions commenced the instant actions against the MTA, among others, seeking, inter alia, specific performance of the agreement. The plaintiffs in both actions alleged that the MTA was obligated to comply with the terms of the agreement providing for the continuation of rights, including employee pension obligations, in light of the successors and assigns provision.
The MTA moved pursuant to CPLR 3211 (a) to dismiss the complaint in action No. 1 insofar as asserted against it. The Supreme Court denied the motion. With respect to that branch of the motion which was to dismiss the complaint in action No. 1 pursuant to CPLR 3211 (a) (7), the Supreme Court held that dismissal was not warranted on that ground, solely “by reason of [MTA’s] status as a necessary party,” explaining that “MTA’s interests are closely related to the interests of the various parties and . . . it is directly affected by the outcome of this action in light of its recent takeover of the bus companies.” We reverse.
The Supreme Court erred in concluding that MTA was not entitled to dismissal of the complaint in action No. 1 insofar as asserted against it solely “by reason of its status as a necessary party.” While the failure to join a necessary party is a ground for dismissal of an action (see CPLR 1003), the Supreme Court did not have such a motion before it (see CPLR 3211 [a] [10]), and the issue of whether the MTA was a “necessary party to the action” is not germane, under the circumstances, to the issue of whether the plaintiffs have stated a cause of action against the MTA for specific performance of the agreement. The *790Supreme Court failed to address the issue of whether the allegations in the complaint failed to state a cognizable cause of action, which was the ground upon which MTA sought dismissal of the complaint.
Contrary to the Supreme Court’s determination, the MTA was entitled to dismissal of the complaint in action No. 1 insofar as asserted against it pursuant to CPLR 3211 (a) (7).
In considering a motion to dismiss pursuant to CPLR 3211 (a) (7), the court should “accept the facts as alleged in the complaint as true, accord plaintiffs the benefit of every possible favorable inference, and determine only whether the facts as alleged fit within any cognizable legal theory” (Leon v Martinez, 84 NY2d 83, 87-88 [1994]).
Here, the plaintiffs in action No. 1 failed to allege facts sufficient to establish that the MTA would be bound by the terms of the agreement to which it was not a party (see Manhattan Real Estate Equities Group LLC v Pine Equity NY, Inc., 27 AD3d 323 [2006]; HDR, Inc. v International Aircraft Parts, 257 AD2d 603 [1999]; National Survival Game of N.Y. v NSG of LI Corp., 169 AD 2d 760 [1991]). Although the agreement purported to bind successors and assigns of the parties to the agreement, an assignee or successor will not be bound to the terms of a contract absent an affirmative assumption of the duties under the contract (see Sillman v Twentieth Century-Fox Film Corp., 3 NY2d 395, 402 [1957]; Hudson Eng’g Assoc. v Ames Dev. Corp., 228 AD2d 477 [1996]; Matter of 152 W. 58th St. Owners Corp. v Local 32B-32J, Serv. Empls. Intl. Union, AFL-CIO, 129 AD2d 439 [1987]; Todd v Krolick, 96 AD2d 695 [1983], affd 62 NY2d 836 [1984]). Having failed to allege such an affirmative assumption, the plaintiffs failed to state a cause of action against the MTA for specific performance of the agreement.
The parties’ remaining contentions either are without merit or need not be reached in light of our determination. Schmidt, J.P., Rivera, Florio and Balkin, JJ., concur.