IoT Device Connectivity Intermittently Failing with Azure IoT Hub

Sai Manasa Ivaturi 0 Reputation points Microsoft Employee
2026-06-02T15:10:02.2033333+00:00

We are experiencing intermittent connectivity issues between IoT devices and Azure IoT Hub. Devices that were previously connected are unexpectedly getting disconnected and failing to reconnect reliably.

Observed Behavior:

  • Devices randomly disconnect from IoT Hub without clear triggers
  • Reconnection attempts either fail or succeed after significant delays
  • Telemetry messages are intermittently delayed or dropped
  • Increased error logs related to network timeouts and authentication failures

Expected Behavior: All devices should maintain stable and persistent connections to IoT Hub, with consistent telemetry delivery and no unexpected disconnections.

Impact:

  • Real-time monitoring is affected due to missing or delayed telemetry
  • Operational workflows dependent on IoT data are disrupted
  • Increased retries causing additional load on the systemWe are experiencing intermittent connectivity issues between IoT devices and Azure IoT Hub. Devices that were previously connected are unexpectedly getting disconnected and failing to reconnect reliably. Observed Behavior:
    • Devices randomly disconnect from IoT Hub without clear triggers
    • Reconnection attempts either fail or succeed after significant delays
    • Telemetry messages are intermittently delayed or dropped
    • Increased error logs related to network timeouts and authentication failures
    Expected Behavior:
    All devices should maintain stable and persistent connections to IoT Hub, with consistent telemetry delivery and no unexpected disconnections. Impact:
    • Real-time monitoring is affected due to missing or delayed telemetry
    • Operational workflows dependent on IoT data are disrupted
    • Increased retries causing additional load on the system
Azure IoT Hub
Azure IoT Hub

An Azure service that enables bidirectional communication between internet of things (IoT) devices and applications.

0 comments No comments

1 answer

Sort by: Most helpful
  1. Jerald Felix 17,640 Reputation points Volunteer Moderator
    2026-06-03T06:51:11.0366667+00:00

    Hello Sai Manasa Ivaturi

    Greetings! Thanks for raising this question in Q&A forum.

    Intermittent IoT Hub disconnections are quite common and almost always come down to a small set of well-known root causes. The most common reasons that devices disconnect from IoT Hub are expired SAS tokens or X.509 certificates, network interruptions, service disruptions, and service reconfiguration events that require devices to reconnect. Since you are seeing a mix of random disconnects, authentication failures, and telemetry drops, let us go through each possible cause and its fix systematically.

    Step 1: Check for Expired SAS Tokens (Most Likely Cause)

    By default, the SAS token lifespan is 60 minutes for all SDKs. Azure IoT device SDKs disconnect from IoT Hub and then reconnect when they renew SAS tokens over the MQTT protocol. In logs, this shows up as informational device disconnect and connect events, sometimes accompanied by error events.

    If your devices are not using the official Azure IoT SDK and are manually managing SAS tokens, they may be failing to renew them before expiry. The fix is to either use the SDK (which handles token renewal automatically) or implement proactive token refresh before the token expires.

    Step 2: Enable Diagnostic Logs to Find the Exact Error

    Go to Azure Portal → Your IoT Hub → Diagnostic settings and enable the Connections and Device Telemetry log categories, sending them to a Log Analytics workspace. Then run this Kusto query to identify disconnect reasons:

    AzureDiagnostics
    | where ResourceType == "IOTHUBS"
    | where Category == "Connections"
    | where OperationName == "deviceDisconnect"
    | project TimeGenerated, DeviceId = properties_s, ResultDescription = resultDescription_s
    | order by TimeGenerated desc
    

    This will tell you exactly why each device disconnected — whether it is token expiry, throttling, or a network timeout.

    Step 3: Check for Throttling / Quota Limits

    Go to Azure Portal → IoT Hub → Overview → Usage and check if you are hitting your daily message quota or connection throttle limits. If your tier is Basic or Free, limits are much lower. Excessive retries from disconnecting devices can compound this into a DDoS-like pattern. A high number of connection attempts per second can cause a condition similar to a distributed denial-of-service attack. This scenario is relevant for large fleets of devices.

    Step 4: Implement Exponential Backoff Retry Policy

    Make sure your device code uses an exponential backoff with jitter retry strategy rather than aggressive immediate retries. Connection failures can happen at network, protocol, and application levels. The Azure IoT device SDKs detect errors at all three levels and implement retry strategies based on Transient Fault Handling Guidance from the Azure Architecture Center. If you are using the official Azure IoT SDK, the retry policy is built in — just make sure it is not disabled in your configuration.

    Step 5: Check TLS Version Compatibility

    TLS 1.0 and 1.1 were deprecated on August 31, 2025. Ensure your devices are using TLS 1.2 as a minimum when connecting to IoT Hub. Devices still using older TLS versions will fail to connect after the deprecation cutoff. Update your device firmware or SDK to enforce TLS 1.2.

    Step 6: Check Azure Service Health

    Go to Azure Portal → Service Health and filter by your region and the Azure IoT Hub service to check for any active or recent platform-side incidents that could explain the sudden onset of disconnections.

    Step 7: Verify Device Status in IoT Hub

    Go to Azure Portal → IoT Hub → IoT devices and confirm that the affected devices are in Enabled status and have not been accidentally disabled. A disabled device will be immediately rejected on reconnection, which looks like an authentication failure in the logs.

    Step 8: If Issues Persist — Enable Azure Monitor Alerts

    Set up an alert in Azure Monitor on the Connected devices metric for your IoT Hub with a threshold below your expected device count. This gives you real-time notification when devices drop off, helping you correlate with any external events.

    To summarize start with Step 2 (enabling diagnostic logs) as that will pinpoint the exact root cause fastest. Most cases resolve by fixing SAS token renewal or upgrading to TLS 1.2.

    If this answer helps you kindly accept the answer which will help others who have similar questions.

    Best Regards,

    Jerald Felix.

    Was this answer helpful?

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.