MicrosoftDocs / azure-docs

Open source documentation of Microsoft Azure
https://docs.microsoft.com/azure
Creative Commons Attribution 4.0 International
10.25k stars 21.42k forks source link

Connecting Function to IoT Hub is described badly #67313

Open SimonSimCity opened 3 years ago

SimonSimCity commented 3 years ago

As already mentioned quite a while ago (in fact almost 9 month ago in #50024), the documentation of Azure IoT Hub bindings for Azure Functions is mildly said bad.

I spent quite a considerable amount of time to get through to the findings in my comment on that ticket (https://github.com/MicrosoftDocs/azure-docs/issues/50024#issuecomment-723067983)

That time you promised that you'll provide an update as appropriate. I can't tell you what happened, but the information is still not available where I would expect it.

The description on the property connection is still very obscure to me and looks like a pale copy of the documentation about Event Grids (https://docs.microsoft.com/en-us/azure/azure-functions/functions-bindings-event-iot-trigger?tabs=python&source=docs#configuration).

In this description you e.g. write:

Copy this connection string by clicking the Connection Information button for the namespace, not the event hub itself.

I have no idea where to find the Connection Information in the IoT Hub - and you talking about not looking in the event hub itself makes me quite suspicious if I still am on the right documentation.

I would really appreciate if you could show me a smarter way to get to the connection string, but for me it was quite time consuming as it needed quite a lot of research and time to reverse-engineer from your code-basis what you actually are doing in the wizard (https://docs.microsoft.com/en-us/samples/azure-samples/functions-js-iot-hub-processing/processing-data-from-iot-hub-with-azure-functions/) to get it working.

Please also propose a solution before simply closing this ticket again.


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

NavtejSaini-MSFT commented 3 years ago

@SimonSimCity We are checking this and we will get back to you.

mikeurnun commented 3 years ago

Hi @SimonSimCity - Thank you for your feedback! We agree with you on how the description for the connection property can be rephrased to explicitly communicate that (a) Connection string is located in the Shared access policies blade of Even Hub, and (b) its value should be passed into an App Setting and (c) the name of this App Setting is what is referenced to the connection property. Were there other changes that you wanted to recommend? If so, please feel free to open new issues and we'd be happy to review and implement them as needed.

As the next step for this particular issue, we are proceeding to assign it to our content team for reviewing further and taking the next course of action.

SimonSimCity commented 3 years ago

Hi, @mike-urnun-msft

Well, you're again referencing the Event Hub here. It might be that the connection string is located on its blade called Shared access policies - but that doesn't help me in my case.

I'm not talking about the Event Hub here, but about the IoT Hub. If you can see it also in its blade Shared access policies, I expect you to use something else than the Azure portal, in which case I want to know where you're going to look up this information.

To me it's very tedious to go through the documentation of the IoT Hub, because of all these links to the Event Hub. Apparently it's not the same as the IoT Hub, neither does it derive from it, but it just has a compatibility layer, which on some occasions seem to differentiate from the implementation of the Event Hub.