Azure Digital Twins (ADT) is Microsoft's managed service for building real-time digital twin graphs β modelling the relationships between physical assets, spaces, and processes as a queryable, live-updating graph of interconnected twin instances. For enterprises already on Azure, ADT provides the lowest-friction path from IoT sensor data to a structured, queryable digital twin environment. This getting-started guide covers ADT architecture, DTDL modelling, data ingestion, and the integration patterns that connect ADT to enterprise analytics.
ADT Architecture
DTDL Modelling Guide
DTDL models define the shape of your digital twin types. Good DTDL design starts with your physical ontology β what types of assets exist, what properties do they have, and how do they relate?
| DTDL Capability | Purpose | Example |
|---|---|---|
| @type: Property | Static or slowly-changing attribute | FloorNumber, MaxOccupancy, ManufacturerName |
| @type: Telemetry | High-frequency sensor readings β streamed, not stored | Temperature, Vibration, OEE |
| @type: Relationship | Directed edge to another twin type | contains, isLocatedIn, controls |
| @type: Component | Embedded sub-model within a twin | Motor component within a CNC machine model |
| Extends | Inheritance β reuse common properties across model types | CNCMachine extends AssetBase |
Create ADT instance: az dt create --resource-group my-rg --name my-adt --location eastus. Assign RBAC: az dt role-assignment create --dt-name my-adt --assignee your-object-id --role "Azure Digital Twins Data Owner". Upload your DTDL model files: az dt model create --dt-name my-adt --models ./models/. Open ADT Explorer to verify models loaded correctly. Import community ontologies from github.com/Azure/opendigitaltwins-building or similar repos as starting points. Our DevOps team handles ADT IaC setup.
Data flow: IoT Hub β Event Hub trigger β Azure Function β ADT SDK update. Write a Function that: receives IoT Hub messages, extracts device ID and telemetry values, calls client.UpdateDigitalTwin(twinId, patchDocument) on the ADT SDK. The patch document uses JSON Patch format to update specific properties. For high-volume telemetry, consider ADT's telemetry type (not stored in graph, forwarded to Event Grid for downstream time-series storage). Connect ADT to Azure Data Explorer for historical analytics.
ADT uses its own SQL-like query language (ADTQ): SELECT * FROM DIGITALTWINS WHERE IS_OF_MODEL('dtmi:myco:CNCMachine;1'). Query the twin graph for aggregations: find all machines in a specific building section, calculate average OEE across a production line. Connect to Power BI via the ADT Query plugin for operational dashboards. Use ADT Explorer for ad-hoc queries during development. For production alerting, route ADT twin-change events via Event Grid to Azure Functions that trigger PagerDuty or your alerting platform.
Our IoT solutions, data analytics, and DevOps teams design and deploy Azure Digital Twins solutions from single-asset pilots to enterprise-wide facility twin programmes. Book a free advisory session.