This is obviously a popular question, and the answers are all over the place.
We put an "in-law" addition on our home. We went to the town board with our plans. They asked if it was going to be a separate residence. We quite honestly said we didn't know what the definition of that was, as the new space would have a private entrance, but also be accessible via an entrance inside the home.
The board said it was simple, and they asked two questions:
1) Will the addition have it's own heating system? No.
2) Will the addition have it's own electrical service/meter? No.
They then told us it was not a separate dwelling.
In our town, you get a "special permit" to have a relative live in a space such as this. You can not rent the space out, it is valid only for relatives to live in.
So yes...there ARE legal in-law appts, even in areas that are zoned single-family.
The really tricky part is getting an appraisal, because there are NO comps for this type of home.