Hi Yuu,
The Azure Active Directory is easy to manipulate, as there are loads of well documented REST API's which can be consumed easily. Accessing a local Active Directory is a complete different matter, I have very little knowledge about. I do know that it has it's own LDAP-protocol, for which you can write custom Java code if you are up to it.
Maybe one of these app store modules could give you a head-start: https://docs.mendix.com/appstore/modules/ldap-provisioning-agent and https://appstore.home.mendix.com/link/app/24/
Regards, Johan