A tenant posted a question a couple of days back about a possible illegal apartment (Brooklyn?); that message, and a reply by Red Zephyr, disappeared in the switch to the new format. That tenant should know that Red Zephyr's posting was off-base in suggesting that it didn't matter that the c of o might be invalid, and that the Buildings Department might force the tenant living in the illegal apartment to vacate if it found out.
New York's Multiple Dwelling Law requires every multifamily building to have a valid c of o showing that it complies with building safety laws. If a building doesn't have a valid of c of o, and the conditions pose a significant threat to the tenant's safety, the owner is not entitled to charge rent.
Tenants are seldom removed from buildings that lack a valid c of o. Ordinarily, the owner has to bring the building into compliance and obtain a valid c of o, if possible. Only if it is not possible to bring the building into compliance with the building code and other laws -- such as an illegal basement apartment -- would an alteration have to be removed.
That being said, it is extremely difficult to get the courts to enforce rent forfeiture for lack of a valid c of o. The building department can be pretty hard to deal with, to say the least. But the biggest risk in a nonregulated building like this one is probably that the landlord would turn around and refuse to renew the lease next time it comes up. (Not as much of a problem for rent-stabilized apartments, because the lease must be renewed.)
So the tenant has some rights, but there are risks too.