First and foremost, you should know that if your rental property is located within the City and County of San Francisco, the San Francisco Rent Ordinance applies. In San Francisco, all rented units which are in foreclosure are covered by the "just cause" eviction protections, meaning a tenant can not be evicted by the bank or new owner foreclosing on the property unless the bank or new owner has a just cause (e.g. nonpayment of rent). See the following memo:
If the rental property is not within San Francisco or a "just cause" city, you need to give the tenants a 90-day notice now telling them they have to move within 90 days. And the 90-day notice should specify their full names to the extent you know them "and all unnamed occupants". If and when it comes time to sue for unlawful detainer, you name as defendants all of the known tenants and all unknown occupants.
Also note that there are new laws regarding post-foreclosure tenants, effective January 1, 2011. Specifically, with regard to the notice, Senate Bill 1149 adds Section 1161c to the Code of Civil Procedure. A notice to terminate tenancy of rental property subject to foreclosure must be accompanied with a separate cover sheet that informs the tenant that the property was recently sold in foreclosure and spells out the tenant's rights and responsibilities, including the tenant's right to stay in a foreclosed rental unit for up to 90 days and information on how to obtain legal assistance. This requirement, which sunsets on January 1, 2013, applies to an immediate successor-in-interest (banks and other post-foreclosure owners) for one year after a foreclosure sale.
For more information, see: