It might be easier to take a look at this module Microsoft Sharepoint : https://marketplace.mendix.com/link/component/119305
It seems it can do the things you want to do.
Regards,
Ronald