@CarlosR What Duet board and firmware version are you running? Send M122 and post the response. How is it currently configured?
I haven't set up MQTT myself, so I don't have any experience. Can you look at the documentation here, and see how far that gets you:
https://docs.duet3d.com/User_manual/Reference/Gcodes#m5864-configure-mqtt-client
https://github.com/Duet3D/MQTT-WPA2-Enterprise-Demo
Have a look at some of the forum threads on MQTT too: https://forum.duet3d.com/search?term=Mqtt&in=titles
Ian