This is do-able, but ideally you would need to implement 802.1X on the switches, have a TACACS+ or Radius server in the background, and the switches would need to be able to dynamically configure VLANS (Cisco). Once you have all this in place you can configure on the Radius server the VLAN that a particular MAC address should be in, if there is no VLAN configured the switch should be configured to place them in a “default” VLAN of your choice. You could also go back to old-school method (outdated) of VMPS (plain text file) on a TFTP server. This method will work but is not easily scalable and has a high administrative overhead.
Hope this helps.