Azure / azure-iot-explorer

Cross-platform UI for interacting with devices attached to Azure IoT Hub. This tool is meant for learning and testing, not for production environment.
MIT License
224 stars 71 forks source link

[BUG] Invalid connection string #596

Closed easingthemes closed 1 year ago

easingthemes commented 1 year ago

Describe the bug

Expected behavior

Desktop (please complete the following information):

easingthemes commented 1 year ago

Validation function:

const isHubConnectionString = (value: string) => {
    const connectionObject = getConnectionInfoFromConnectionString(value);
    const { hostName, sharedAccessKey, sharedAccessKeyName } = connectionObject;

    if (hostName && sharedAccessKeyName && sharedAccessKey) {
        return true;
    }

    return false;
};

My connection string doesn't have sharedAccessKeyName property

easingthemes commented 1 year ago

Ok, wrong string used. I've used Device string, and I need IoT Hub Connection String