The tenant protection provisions apply in the case of any foreclosure on a “federally related mortgage loan” or on any dwelling or residential real property. They provide that “any immediate successor in interest” in such a foreclosed property, including a bank that takes title to a house upon foreclosure, will assume the interest subject to the rights of any bona fide tenant and will need to comply with certain notice requirements.
It does not sound like what you’re describing (I’m assuming you have a borrower that would be purchasing a foreclosed property) would be covered as your borrower would not be the immediate successor – that would have been the foreclosing bank. You should check with legal counsel regarding your specific legal requirements.