For a previous implementation of Mendix wich used an AX dynamics integration we worked with certificates that were loaded into the certificate storage of Mendix, and used to authenticate against Microsoft Dynamics, the AX implementation partner generated the certificates so I can't help you with that but take a look at this link for the certificate storage in Mendix https://world.mendix.com/display/refguide6/Certificates
There are many services today that actually provide integration services with different e-commerce platforms such as magento, shopify and woocommerce with Microsoft Dynamics AX. One of such services that I availed for integration and which has really helped me is http://dynamics.folio3.com/
HTTP status code 401: Unauthorized problem does n't mean that server and client connection problem.
Cross check the username and password in the HTTP authentication. Its better to reset every thing and try again with fresh logins.
I have faced the similar problem all i have done is cross checked the login credentials and reset the connection with proper order. I think this suggestion helps you.
I have taken help of other Dynamics AX Developers sort it out.