Azure Digital Twins stores models and a graph representing the entities in a physical environment. A twin represents a specific asset, space, or other entity, while relationships describe how entities connect. For example, a facilities application can represent buildings, floors, rooms, air-handling units, and sensors, with relationships identifying which equipment serves each room. This context lets applications interpret a temperature reading in terms of the space and equipment it affects.
Define entity types using Digital Twins Definition Language, a JSON-LD-based modeling language. Models describe properties, components, and relationships. Azure Digital Twins supports DTDL version 2 and version 3, including version 3 array properties and supported semantic extensions. Establish stable twin identifiers and a model-versioning strategy before loading production data. Model definitions provide structure, but they do not implement application logic or automatically calculate values across relationships.
Applications create and update twins through data-plane REST APIs or SDKs. A typical ingestion pipeline receives device messages through Azure IoT Hub, processes them in Azure Functions, and updates the corresponding twin properties. Business systems can update the same graph through application integrations. Azure Digital Twins is distinct from IoT Hub device twins: it models an environment and its relationships rather than providing device connectivity or device configuration management.
The query API uses a SQL-like language to filter twins by model and property values and traverse relationships through supported joins. Applications can ask which rooms contain equipment reporting a fault or which assets belong to a particular production line. Graph queries are eventually consistent, so applications should not assume that a query immediately reflects a preceding write. Review query and request limits, handle throttling with backoff, and avoid repeatedly scanning an entire graph when a narrower query is sufficient.
Twin changes can generate events that are routed to Event Hubs, Event Grid, or Service Bus. External compute implements derived-state calculations, notifications, and workflow actions; changes do not automatically propagate through graph relationships. Design handlers to tolerate duplicate delivery and prevent feedback loops when a handler updates a twin that generates another event. For historical analysis, configure data history to send supported property and graph lifecycle updates to Azure Data Explorer rather than treating the current-state graph as a time-series database.
Secure access with Microsoft Entra ID and Azure role-based access control, assigning data-plane roles separately from resource-management permissions. Use managed identities for supported outbound integrations and Private Link when private inbound access is required. Azure Digital Twins Explorer provides graph inspection and editing, but its hosted experience does not support private endpoints and has limited DTDL version 3 functionality. Use APIs, SDKs, or the CLI where those limitations apply. For large graph initialization and environment refreshes, use the asynchronous Import Jobs and Delete Jobs APIs, and monitor job status before starting dependent operations.