you would need something like user-manager (mikrotik's implementation of RADIUS server) and some kind of (basic) dot1x setup to evaluate (and authenticate) the device/user connecting to the network
you could try to do basic mac-authentication and then set the PVID of that port to your desired VLAN and otherwise leave it at PVID 1
never done it on a setup with user-manager (additional .npk package in "all packages")
you also could work with more sophisticated setups like EAP-PEAP and/or computer-authentification (cert. based; most likely in place in a domain network, hence the domain has an internal CA and signes computer certificates which are pushed to domain-joined computers)
but implemented dot1x with an aruba radius server which serves a variaty of access layer devices (cisco, fs, ubnt es and also mikrotik RB4011 and hEX)
the radius server has to respond with the according values to set the VLAN PVID
the 3 important values here are
- Tunnel-Medium-Type (=VLAN)
- Tunnel-Type (=802)
- Tunnel-Private-Group-ID (=vlan pvid)
(here for example the RADIUS server is implemented via Micro$ofts NPS:
https://www.expertnetworkconsultant.com ... us-server/ )