# Can't connect AZURE IoT Hub to Losant

**URL:** <https://forums.losant.com/t/cant-connect-azure-iot-hub-to-losant/4028>\
**Category:** Help\
**Tags:** mqtt, workflow, azure\
**Created:** [August 25, 2021, 3:05pm UTC](https://forums.losant.com/t/cant-connect-azure-iot-hub-to-losant/4028 "2021-08-25T15:05:56Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Eduardo\_wewer](https://avatars.discourse-cdn.com/v4/letter/e/a4c791/32.png) [@Eduardo\_wewer](https://forums.losant.com/u/Eduardo_wewer)\
**Post date:** [August 25, 2021, 3:05pm UTC](https://forums.losant.com/t/cant-connect-azure-iot-hub-to-losant/4028/1 "2021-08-25T15:05:56Z")

</div>

Hi,

I am successfully sending MQTT messages with my device to Azure IoT hub and I want to visualize the data in Losant. I have created the workflow that fetches the MQTT integration I created for Azure.

I have followed [this](https://www.losant.com/blog/getting-started-with-azure-iot-and-losant) tutorial but I am unable to receive any MQTT messages. Losant seems to not be able to connect to Azure’s “broker”.

Any ideas?

thanks

---

<div class="post-metadata">

**Author:** ![Heath](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.losant.com/heath/32/3036_2.png) [@Heath](https://forums.losant.com/u/Heath)\
**Post date:** [August 25, 2021, 3:20pm UTC](https://forums.losant.com/t/cant-connect-azure-iot-hub-to-losant/4028/3 "2021-08-25T15:20:51Z")

</div>

Hello @Eduardo_wewer,

> I have created the workflow that fetches the MQTT integration I created for Azure.

Could you tell me more about this workflow? What MQTT Integration are you fetching? Could you share a screenshot of this workflow?

> Losant seems to not be able to connect to Azure’s “broker”.

Are you seeing any errors or anything that would indicate that Losant is unable to connect?

As an update, we do have a [newer guide](https://www.losant.com/blog/device-telemetry-data-azure-iot-hub) for sending device data from Azure IoT to Losant. Have you attempted this approach?

Thank you,  
Heath

---

<div class="post-metadata">

**Author:** ![Eduardo\_wewer](https://avatars.discourse-cdn.com/v4/letter/e/a4c791/32.png) [@Eduardo\_wewer](https://forums.losant.com/u/Eduardo_wewer)\
**Post date:** [August 25, 2021, 3:26pm UTC](https://forums.losant.com/t/cant-connect-azure-iot-hub-to-losant/4028/5 "2021-08-25T15:26:27Z")

</div>

Hi Heath,

 ![image](https://us1.discourse-cdn.com/flex015/uploads/getstructure/original/2X/e/e0affc7eb087204307b308109e639e5d5ac90a7a.png)  
 ![image](https://us1.discourse-cdn.com/flex015/uploads/getstructure/original/2X/3/365282dc08ab6c4bc57fa0953e2616b5683caae6.png)  
So the broker is not connected ![image](https://us1.discourse-cdn.com/flex015/uploads/getstructure/original/2X/3/333de9b6ca3b905984c1031d802270af89d175e9.png).

I will try the other method but this one seemed more straightforward.

---

<div class="post-metadata">

**Author:** ![Heath](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.losant.com/heath/32/3036_2.png) [@Heath](https://forums.losant.com/u/Heath)\
**Post date:** [August 25, 2021, 4:00pm UTC](https://forums.losant.com/t/cant-connect-azure-iot-hub-to-losant/4028/7 "2021-08-25T16:00:05Z")

</div>

@Eduardo_wewer,

Were you able to generate the SAS token with the `iothub-explorer` npm package? From the screenshot you included, it looks like your trying to make a connection with the `SharedAccessSignature` rather than a generated token.

Thank you,  
Heath

---

<div class="post-metadata">

**Author:** ![Eduardo\_wewer](https://avatars.discourse-cdn.com/v4/letter/e/a4c791/32.png) [@Eduardo\_wewer](https://forums.losant.com/u/Eduardo_wewer)\
**Post date:** [August 25, 2021, 4:34pm UTC](https://forums.losant.com/t/cant-connect-azure-iot-hub-to-losant/4028/10 "2021-08-25T16:34:27Z")

</div>

From the tutorial:

 ![image](https://us1.discourse-cdn.com/flex015/uploads/getstructure/original/2X/2/23830b31c508e56fb7aaa3de54ab2ea2a337abee.png)

It seems they are the same thing.

thanks

---

<div class="post-metadata">

**Author:** ![Heath](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.losant.com/heath/32/3036_2.png) [@Heath](https://forums.losant.com/u/Heath)\
**Post date:** [August 25, 2021, 6:51pm UTC](https://forums.losant.com/t/cant-connect-azure-iot-hub-to-losant/4028/11 "2021-08-25T18:51:00Z")

</div>

@Eduardo_wewer,

It will take me some time to run through this process and verify that things have not changed with Azure since the publication of the blog post you referenced.

Once I do, I will be sure to update you with anything I find.

In the meantime, the only other recommendation I can make is to verify that the security policy that you copied the `connection string - primary key` for has the correct permissions.

Thank you,  
Heath
