NotAuthorized / No such host is known error


I tried publishing data to cumulocity with Mqtt in c#.

I copied the code here

When I use “” with my tenantId/username password combination as it is instructed in the guide I get “Not Authorized” error and cannot connect to broker.

When I use MqttBox to publish data, I use “” with the same credentials and there is no problem.

So I changed serverUrl in the c# code to “” and this time it gives me “No Such Host is Known”

Either way I cannot connect to broker.

I cannot seem to find, Where am I messing up. Please help!

H Ömer,

on which tenant are you working? So you like to create a MQQT device there to publish data on your tenant?

best regards

Thanks for your reply Michael but it was apparently due to some erroneous config read.
It was trying to get username and password for the subtenant.

Best Regards


Hi Omer,

sorry for my late reply. Do I get you last comment right, that you solved the issue?

best regards