Create new account in UserManager based on DHCP lease

Is there any way to automatically create a new user account in UserManager based on DHCP lease MAC address?

Even if a supposal how to implement it, pls?

Have a look at this

Theoretically you’d just need to setup a script that checks the DHCP table (or host table which might be easier)
Have it look at the MAC addresses there and anything that’s not in the active table of the hotspot run that user add command on it

/too user-manager user add username=XX:XX:XX:XX:XX:XX subscriber=MikroTik

Where XX:XX:XX:XX:XX:XX is the MAC address of any non-authenticated hosts.

This is the code I used to find non-authorized & non-static hosts MAC addresses:

:global counter

:foreach counter in=[/ip hotspot host find !authorized && DHCP || dynamic ] do={:put [/ip hotspot host get $counter mac-address]}

I couldn’t quite get it to work with out setup after this bit, hopefully you have better luck with it.