Assumption is that you want to connect to MS ADFS. You should take a look at the Graph API. See documentation here: https://docs.microsoft.com/en-us/azure/active-directory/develop/active-directory-graph-api
To give you a head start take a look at this module in the appstore: https://appstore.home.mendix.com/link/app/73034/EPI-USE-Systems/Microsoft-Graph-Connector
Regards,
Ronald