New York Laws
Article 6 - Action to Recover Real Property
637 - Action Against One Defendant Subject to Rights of Others.

ยง 637. Action against one defendant subject to rights of others.
Where one or more answering defendants hold under another defendant, and
the plaintiff elects to proceed against the latter, subject to the
rights and interests of the former, if the plaintiff recovers final
judgment against the defendant under whom they hold, the judgment
operates as a transfer to the plaintiff of that defendant's right, title
and interest.