As a tenant you have a right to share your apartment with a roommate/s as long as doing so doesn’t create overcrowding. The number of occupants in the apartment who are not named in the lease should not exceed the number named in the lease. In other words, if two tenants sign the lease, there should be no more than four people living in the apartment at a time (Real Property Law §235-f 3-4).
Any lease provision that attempts to restrict occupancy of a residential apartment to the named tenant or his/her immediate family members is improper. (Real Property Law §235-f 2). However, your landlord does have the right to know who’s living in your apartment with you and if they ask, you must respond within 30 days (Real Property Law §235-f 5).
As a rent stabilized tenant, you must occupy the apartment as your primary residence. If you are the named tenant and you move out but your roommate or a family member remains in the apartment, the roommate or family member will not be able to stay in the apartment unless he or she can establish succession rights (see separate section), and you will be vulnerable to an eviction proceeding.