0
votes

Azure IoT Edge Quick Start says we can get the Event Hubs-compatible path, and service primary key from the IOThub using Azure Cli:

az iot hub show --query properties.eventHubEndpoints.events.path --name YourIoTHubName

az iot hub policy show --name service --query primaryKey --hub-name YourIoTHubName

Is there any other way access these values from azure portal or powershell. When i run these command from powershell, it says az is not

az : The term 'az' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.

I have installed AZ Module. But still throwing the error.

1

1 Answers

2
votes

In the portal, go to your IoT hub. Then in Settings, go to Built-in endpoints. Here you can find the Event Hub-compatible name and Event Hub-compatible endpoint. The Event Hub-compatible name is the path you need. The Event Hub-compatible endpoint includes the primary key.

You can also find the primary key if you go to your IoT hub's Shared access policies in Settings. Select service to get the service key.