There is a soft requirement of having Azure CLI (or being able to set it up) when going through this tutorial.
The code samples are great and helpful, but without the azure CLI, you have to hunt around for various keys/compatible paths a lot more. I'm currently a bit stuck but I don't have subscription access to set up the store for CLI which slows my progress.
⚠Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
@JonathanPalmerGD Sorry to hear that you are stuck. An option to the portal CLI is to run CLI locally please read: Install Azure CLI on Windows
Good to know there is a way to use Azure CLI locally.
However, I solved my individual problem a separate way. The corresponding sample for read-d2c-messages in C# in [ReadDeviceToCloudMessages.cs]
It has the following line:
var connectionString = new EventHubsConnectionStringBuilder(new Uri(s_eventHubsCompatibleEndpoint), s_eventHubsCompatiblePath, s_iotHubSasKeyName, s_iotHubSasKey);
However, there is IoT Hub interface for just getting the compatibleEndpoint string "Endpoint=sb://iothub-[etc.]/;SharedAccessKeyName=iothubowner;SharedAccessKey=[mykey]"
This can be passed right into the EventHubsConnectionStringBuilder as a different (probably newer) constructor than exists in the sample. That removes a potential confusion step (especially if you don't have Azure CLI)
That makes the sample content a lot clearer and more understandable. In total learning that did eat up around an hour because the current tutorial and current interface for IoT hub doesn't clearly convey which fields go into which strings of the sample.
I'd at very least recommend changing the sample code from using the URI string as 's_eventHubsCompatibleEndpoint' when the IoT Hub's interface lists the full string as 'Compatible Endpoint', that was the primary source of confusion.
Hope this helps improve the docs!
@JonathanPalmerGD Thanks for the detailed feedback! I have assigned the issue to the content author to evaluate and update as appropriate.
@JonathanPalmerGD - what type of Azure subscription are you using - I see you mentioned that you couldn't set up the Azure cloud shell - can you provide more detail? The Quickstart specifically uses the Azure cloud shell to minimize the setup required on your local machine. Thanks!
I don't exactly know the details of the subscription. I wasn't the one who set it up or manages it.
It gives a 'Storage Creation failed, Error 403 - code: RequestDisallowedByPolicy, etc'
It's possible it's a MSoft thing due to specific org policies?
I could connect you to an individual who would have more info than myself if desired.
@JonathanPalmerGD - it sounds as if your subscription was set up in a non-standard way. We would expect someone doing the Quickstart to have set up (or have access to) a standard subscription: https://azure.microsoft.com/free/?WT.mc_id=A261C142F
If you want to follow up on creating a Cloud Shell with your subscription, can you open an issue on https://docs.microsoft.com/en-us/azure/cloud-shell/quickstart
To keep the Quickstart brief, we opted to use the Azure CLI to retrieve the various configuration values needed to avoid having lots of clicking around in the portal. I know that in the portal you can find a connection string for the Event Hub compatible endpoint, but I still think it's easier to run a script to retrieve three values to paste into code.
We will take your comments into account when we next review these articles - and thanks for your detailed feedback.
I'm going to request that this issue is closed, but feel free to reopen it with any follow up questions. Thanks!