Foreclosure of mortgage; lienors defendants

N.Y. Lien Law § 44-A, under Enforcement of Liens On Real Property.

N.Y. Lien Law § 44-A

§ 44-a. Foreclosure of mortgage; lienors defendants. In an action to foreclose a mortgage upon such real property only such persons who shall have filed notices of lien prior to the filing of the notice of lis pendens in such action shall be deemed to be necessary parties to such action.