Device Credentials

Goal: Access device connection credentials and understand connection status.


Connection Info Tab

Select your connection node and open Inspector → Connection Info to access all device information.

Connection Info showing device status, IoT Hub name, and authentication type.

Overview Section

Real-time health monitoring for your connection:

FieldDescription
HealthCurrent connection health status
Last ReceivedTimestamp of the most recent telemetry message

Health states:

  • Healthy - Device is communicating normally
  • Degraded - Intermittent communication issues
  • Unhealthy - No recent communication

Identity Section

Device identification and IoT Hub details:

FieldDescription
CloudCloud provider (Azure)
IoTHubManaged IoT Hub instance name
HostNameFull IoT Hub hostname (e.g., foip-iot-hub.azure-devices.net)
DeviceIDUnique identifier for this device
StatusConnection state (Connected, Disconnected)
AuthTypeAuthentication method (symmetricKey)

Device Access Section

Expand the Device Access section to reveal connection credentials:

Device Access section showing connection strings, SAS tokens, and MQTT details.

Connection Strings

CredentialDescription
Device ConnStr (primary)Primary connection string for SDK-based connections
Device ConnStr (secondary)Secondary connection string for key rotation

Use connection strings with Azure IoT SDKs:

// Node.js example
import { Client } from 'azure-iot-device';
import { Mqtt } from 'azure-iot-device-mqtt';

const connectionString = 'HostName=...;DeviceId=...;SharedAccessKey=...';
const client = Client.fromConnectionString(connectionString, Mqtt);

SAS Tokens

TokenDescription
Device SAS (primary, 1h)Primary SAS token with 1-hour expiration
Device SAS (secondary, 1h)Secondary SAS token with 1-hour expiration
Thinking Tip:

SAS tokens expire after 1 hour. For production devices, use connection strings with SDKs that handle token refresh automatically.

MQTT Details

For devices connecting via raw MQTT protocol:

SettingDescription
MQTT HostIoT Hub hostname for MQTT connections
MQTT Port8883 (TLS required)

IoT Edge Devices

For Azure IoT Edge deployments:

  1. Open Inspector → Settings tab
  2. Enable Is IoT Edge Device
Settings tab showing Is IoT Edge Device checkbox.

This configures the connection for Edge module communication patterns.


Security Best Practices

Treat credentials like passwords. Never expose them in logs, client-side code, or version control.

  • Rotate regularly - Use the secondary connection string during rotation
  • Store securely - Use secure storage on devices, never hardcode
  • Monitor status - Watch for unexpected disconnections
  • Regenerate if compromised - Contact support to regenerate device credentials

Device Management (Coming Soon)

Beta Feature:

Full device lifecycle management is coming soon. This will include:

  • Adding new devices
  • Editing device configuration
  • Removing devices
  • Bulk device operations
  • Device health monitoring

For now, devices are automatically provisioned when connections are created.


Troubleshooting

IssueSolution
Can't find Device AccessEnsure connection node is selected, check Connection Info tab
Connection string not workingVerify you copied the complete string including SharedAccessKey
SAS token rejectedToken may be expired - generate a new one
MQTT connection failsEnsure port 8883 is open and TLS is enabled

Next Steps

If you want to...Go to...
Understand connection creationIoT Hub Guide →
Route device dataSurfaces Guide →
Test with simulated dataSimulator Guide →
On this page