In any action to foreclose a mortgage or other lien upon real property, a person holding a conveyance or having a lien upon the property, if such conveyance or lien does not appear of record in the proper office at the time of the commencement of the action, does not need to be made a party to the action, and the judgment rendered and the proceedings in and of the action are conclusive as if the party had been made a party to the action.
N.D.C.C. § 32-19-40