diff --git a/iot-hub/Quickstarts/back-end-application/BackEndApplication.cs b/iot-hub/Quickstarts/back-end-application/BackEndApplication.cs index e41020e28d..db5672bbda 100644 --- a/iot-hub/Quickstarts/back-end-application/BackEndApplication.cs +++ b/iot-hub/Quickstarts/back-end-application/BackEndApplication.cs @@ -14,7 +14,7 @@ class BackEndApplication private static ServiceClient s_serviceClient; // Connection string for your IoT Hub - // az iot hub show-connection-string --hub-name {your iot hub name} + // az iot hub show-connection-string --hub-name {your iot hub name} --policy-name service private readonly static string s_connectionString = "{Your service connection string here}"; // Invoke the direct method on the device, passing the payload diff --git a/iot-hub/Quickstarts/read-d2c-messages/ReadDeviceToCloudMessages.cs b/iot-hub/Quickstarts/read-d2c-messages/ReadDeviceToCloudMessages.cs index 9953d19fcf..d5faff31cb 100644 --- a/iot-hub/Quickstarts/read-d2c-messages/ReadDeviceToCloudMessages.cs +++ b/iot-hub/Quickstarts/read-d2c-messages/ReadDeviceToCloudMessages.cs @@ -23,9 +23,9 @@ class ReadDeviceToCloudMessages // az iot hub show --query properties.eventHubEndpoints.events.path --name {your IoT Hub name} private readonly static string s_eventHubsCompatiblePath = "{your Event Hubs compatible name}"; - // az iot hub policy show --name iothubowner --query primaryKey --hub-name {your IoT Hub name} - private readonly static string s_iotHubSasKey = "{your iothubowner primary key}"; - private readonly static string s_iotHubSasKeyName = "iothubowner"; + // az iot hub policy show --name service --query primaryKey --hub-name {your IoT Hub name} + private readonly static string s_iotHubSasKey = "{your service primary key}"; + private readonly static string s_iotHubSasKeyName = "service"; private static EventHubClient s_eventHubClient; // Asynchronously create a PartitionReceiver for a partition and then start