It is, in fact, required in most municipalities to get a permit to have work done on one's own property if it is extensive electrical or plumbing work. Extending lines to build a self-contained apartment (an "in-law" unit) almost always requires permits to ensure that the work is up to code and safe.