Let me provide a comprehensive solution covering all three key areas:
1. Managed Identity Role Assignment (Complete Setup)
First, get your IoT Central application’s managed identity details:
- Go to IoT Central app → Settings → Identity
- Copy the Object (principal) ID and Application (client) ID
- Verify status shows “System assigned: On”
In Azure Data Explorer, you need permissions at THREE levels:
Cluster Level:
.add cluster AllDatabasesMonitors ('aadapp=<CLIENT_ID>;<TENANT_ID>') 'IoT Central App'
Database Level:
.add database devicedata ingestors ('aadapp=<CLIENT_ID>;<TENANT_ID>') 'IoT Central Ingestor'
Table Level (Critical - Often Missed):
.add table DeviceTelemetry ingestors ('aadapp=<CLIENT_ID>;<TENANT_ID>') 'IoT Central Table Access'
Replace <CLIENT_ID> with your managed identity’s Application ID and <TENANT_ID> with your Azure AD tenant ID.
2. Azure Data Explorer Permissions (Verification)
Verify all permissions are correctly applied:
// Check database-level permissions
.show database devicedata principals
// Check table-level permissions
.show table DeviceTelemetry principals
// Verify ingestion mappings exist
.show table DeviceTelemetry ingestion mappings
If you see the managed identity listed but exports still fail, the issue is likely stale permission cache after your ADX cluster update. Force a permission refresh:
// Remove the principal
.drop database devicedata ingestors ('aadapp=<CLIENT_ID>;<TENANT_ID>')
// Wait 2 minutes for cache to clear
// Re-add with explicit permissions
.add database devicedata ingestors ('aadapp=<CLIENT_ID>;<TENANT_ID>') 'IoT Central - Refreshed'
3. IoT Central Export Configuration (Complete Checklist)
In IoT Central → Data export → Destinations:
- Authentication: System-assigned managed identity (verify enabled)
- Cluster URI: Must be full URI including region (e.g.,
https://iottelemetry.westus2.kusto.windows.net)
- Database: Exact database name (case-sensitive:
devicedata)
- Table: Exact table name (case-sensitive:
DeviceTelemetry)
- Data format: JSON (recommended) or CSV
- Ingestion mapping: Must match ADX mapping name exactly
Test the destination connection:
- Edit the export destination
- Click “Test connection” button
- Should show “Connection successful” if all permissions are correct
Common Issues After Cluster Updates:
ADX cluster updates (especially major version updates) can cause:
- Permission cache invalidation (fixed by re-adding principals)
- Ingestion mapping format changes (verify mapping compatibility)
- TLS/SSL certificate rotation (usually auto-resolves within 24 hours)
Validation Steps:
After applying all fixes:
-
Wait 5-10 minutes for permission propagation
-
In IoT Central, disable and re-enable the data export
-
Monitor export status for 15 minutes
-
Check ADX table for new data:
DeviceTelemetry
| where ingestion_time() > ago(30m)
| count
-
Review IoT Central audit logs for any remaining permission errors
If issues persist after these steps, check ADX cluster diagnostic logs for detailed ingestion failure reasons. The logs often reveal specific permission or schema mismatch issues not visible in IoT Central’s export status.