Cloud service · Azure · Updated

Azure Digital Twins - Azure Digital Twins is a managed platform for modeling physical environments as graphs of digital entities, their properties, and their relationships.

In short

Azure Digital Twins provides a contextual model of buildings, equipment, infrastructure, and other environments using the Digital Twins Definition Language and a queryable twin graph. Engineers connect device telemetry and business systems through APIs and event-processing services, then use the graph to support operational applications, analytics, and downstream workflows.

Cloud Services Hub →

8 key features of Azure Digital Twins

01
Domain models with DTDL

Define reusable entity types with properties, components, and relationships using DTDL version 2 or version 3. Model equipment and spaces using a consistent vocabulary, and version model identifiers as schemas evolve.

02
Queryable twin graph

Represent individual entities as twins connected by directed relationships, including relationship properties. Use SQL-like queries to filter by state, model, and topology, while accounting for eventual query consistency.

03
API-driven state management

Create, read, update, and delete twins and relationships through REST APIs and SDKs. Use conditional updates where appropriate to protect against conflicting application writes.

04
Filtered outbound event routing

Route supported twin events to Event Hubs, Event Grid, or Service Bus using event filters. Attach external processing to update dependent state, issue notifications, or feed other systems.

05
Historical graph data

Configure data history to record twin property updates, twin lifecycle events, and relationship lifecycle events in Azure Data Explorer. Analyze those records alongside other time-series data rather than retaining historical samples as additional twin properties.

06
Bulk graph administration

Use the Import Jobs API to load models, twins, and relationships at scale. Use the Delete Jobs API to clear graph entities for controlled environment refreshes, treating deletion as a destructive operation that requires explicit safeguards.

07
Identity and network security

Control access using Microsoft Entra ID and Azure RBAC, and configure Private Link for private inbound connectivity. System-assigned or user-assigned managed identities can authenticate to supported outbound destinations without application-managed secrets.

08
Graph inspection with Explorer

Azure Digital Twins Explorer, available in preview, lets engineers inspect models, query the graph, and edit twins and relationships. Its hosted interface does not support private endpoints, and DTDL version 3 models require another interface for import.

Where Azure Digital Twins is used

  1. 01
    Building operations

    Connect rooms, HVAC equipment, meters, and sensors so an operations application can identify which spaces are affected by an equipment fault. Use external processing to calculate room-level conditions or trigger maintenance workflows.

  2. 02
    Manufacturing asset context

    Model factories, production lines, machines, and their dependencies. Combine current equipment state with topology to identify assets associated with a stopped line, then use historical analytics to investigate preceding conditions.

  3. 03
    Energy and infrastructure monitoring

    Represent network assets and their connections to support topology-aware operational queries. External applications can use this graph to identify connected assets during an outage investigation; engineering simulation and power-flow calculations require separate compute or specialist tools.

  4. 04
    Asset and business-system reconciliation

    Combine sensor-derived state with asset identifiers and operational metadata from enterprise systems. For example, relate a reported machine fault to its installation location and maintenance record before creating a work order.

  5. 05
    Simulation environment preparation

    Load representative graph datasets into an isolated instance and drive updates from an external simulator. Bulk import and delete jobs support repeatable setup and refresh, while the simulation engine remains outside Azure Digital Twins.

How Azure Digital Twins is priced

Pay-as-you-go operations

Service operations are metered according to the applicable pricing rules, including API activity used to manage and access graph entities. Estimate costs from expected ingestion writes, application reads, relationship changes, and administrative workloads rather than device count alone.

Message-based usage

Messages are a separate consumption meter for billable messaging activity, with message size affecting metered units under the pricing rules. Include expected event volume and payload sizes when estimating the cost of event-driven architectures.

Query-unit consumption

Graph queries consume query units based on the resources required to execute them. Query frequency and complexity affect cost, so test representative graph queries and avoid unnecessary polling.

Services Azure Digital Twins works with

A common ingestion architecture connects devices to Azure IoT Hub and uses Azure Functions to validate messages, resolve device identifiers to twin identifiers, and update twin properties. Business applications can update the graph through the same data-plane APIs. Keep source timestamps where operationally useful, and define how stale or out-of-order measurements should be handled before they overwrite current state.

For outbound processing, configure filtered event routes to Event Hubs, Event Grid, or Service Bus. Consumers can calculate derived state, initiate maintenance workflows, or deliver changes to external applications. Design these consumers for duplicate delivery and avoid recursive update loops when they write back to the graph.

Use the data history connection to Azure Data Explorer for supported property and graph lifecycle history, with Event Hubs providing the ingestion path. Keep analytical retention and queries separate from current-state graph operations. Blob Storage supports bulk-job artifacts and configured dead-letter storage. Across these integrations, assign narrowly scoped permissions, use managed identities where supported, and validate outbound destination network rules separately from the instance's private inbound configuration.

Azure IoT Hub

Use IoT Hub for device connectivity and telemetry ingestion, with an intermediary such as Azure Functions translating messages into twin updates. For example, map a sensor's device identifier to a sensor twin and patch its temperature property. Device-to-twin mapping and telemetry transformation are application responsibilities, not automatic synchronization.

Azure Functions

Run custom ingestion and graph-processing logic in event-triggered functions that call the Digital Twins data-plane APIs. For example, process an equipment-state event and update a related room's calculated operational status. Use managed identity with the required data-plane role, and make handlers idempotent to tolerate retries.

Event Hubs

Configure Event Hubs as an outbound event endpoint to stream selected twin changes to downstream consumers. For example, route equipment property changes to an analytics processor while a separate consumer archives them. Identity-based endpoint authentication is supported, but network rules must also permit the service connection.

Azure Data Explorer

Use the data history feature to send supported graph updates to Azure Data Explorer through its required Event Hubs integration. For example, retain temperature changes and relationship lifecycle events to investigate how equipment reassignments affected room conditions. Kusto queries and the Azure Digital Twins query plugin can combine historical records with graph context.

Service Bus

Route twin events to a Service Bus endpoint for downstream application processing. For example, a worker can consume equipment fault changes and create maintenance requests after applying business rules. Use duplicate-safe consumers, and configure authentication and destination network access independently.

Event Grid

Use an Event Grid endpoint to distribute selected twin events to subscribed handlers. For example, a twin lifecycle event can trigger a function that provisions a corresponding record in an operational application. Azure Digital Twins Event Grid endpoints do not support managed-identity authentication, so do not assume the same authentication configuration as Event Hubs or Service Bus.

Azure Blob Storage

Use Blob Storage for bulk-import input and job output artifacts, with access configured for the job workflow. For example, upload a prepared graph import file before starting an Import Jobs request. A storage container can also serve as the configured dead-letter destination for undeliverable routed events.

Azure Data Lake Storage

Azure Digital Twins can archive twin change events in Azure Data Lake Storage by routing them to an event hub with Capture enabled. This preserves an event history for later batch processing or analysis.

Azure DNS

Azure Digital Twins can use an Azure Private DNS zone linked to a virtual network so that its instance hostname resolves to the private endpoint's IP address rather than the public endpoint.

Azure Firewall

Azure Digital Twins publishes the AzureDigitalTwins service tag for use in Azure Firewall network rules. The tag lets rules refer to the service's IP address ranges without maintaining a manual list.

What is Azure Digital Twins

2 min read

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.

Azure architecture icons are the property of Microsoft. BlowStack is not affiliated with or endorsed by Microsoft.