Although it is possible to purchase directly from the lender prior to them listing the property, it is rare and very difficult. In most cases, the lender assigns the property to an asset manager who performs the occupancy check, assesses the condition of the property, prepares it for sale, and orders a BPO/Appraisal to determine fair market value. The bank then lists the property, and takes offers.
To successfully purchase a property from a lender prior to the sale, you must find a decision maker with the lender, that has the authority to enter into a purchase agreement prior to listing the property.