Hello @Haris Papageorge, welcome to this moderated Azure community forum. Azure IoT supports device authentication using X509 certificates:
The device certificate (also called a leaf certificate) must have its common name (CN) set to the device ID (
CN=deviceId
) that was used when registering the IoT device in Azure IoT Hub. This setting is required for authentication.
As you can see, the device/leaf certificate is related to the Azure IoT Hub device ID using the 'cn=deviceId'. Thus, you are not able to use the same certificate for multiple devices. If for some reason two devices with the same deviceId-X509 certificate combination try to connect to IoT Hub, this will result in unreliable connections, probably on both devices.
---If the response helped, do "Accept Answer". If it doesn't work, please let us know the progress. All community members with similar issues will benefit by doing so. Your contribution is highly appreciated.