Hi,
I am facing issue with MQTT connect from my device to IoT Hub.
Have taken the primary connection string after device creation on Azure portal and provided the same to my application and trying to perform MQTT connection.
Receiving MQTT connack with failure value '5' (Unauthorized error).
I suspected that the sas token generated prior to MQTT connect could be the problem so also tried with sas token generated from Azure cli by following "Generate a device SAS token using the iothubowner policy to access the {iothub_name} device registry." and removed the device key from connection string and provided the signature. But observe the same error.
Could you please provide some pointers on what could be the issue.
Thanks
