Have a look at this option from the app store to get an idea on how this works in Mendix:
https://appstore.home.mendix.com/link/app/80498/Mendix/Multi-tenant-administration
you can go through the document for the above Module Mentioned. it works well.
you just need to add associations to Tenant Entity to configure it.