Devices
Lists all devices registered within the organization that the authenticated user has access to, including device details.
Table-Specific Information
SELECT
You can query Devices by specifying an Id or selecting all:
SELECT * FROM Devices WHERE Id = '2b9c0347-9640-4ba4-bd2d-50965fb026e7'
SELECT * FROM Devices
Filter results using the LIKE operator:
SELECT * FROM Devices WHERE DisplayName LIKE '%Desk%'
INSERT
Specify deviceId, accountEnabled, displayName, operatingSystem, operatingSystemVersion, and alternativeSecurityIds values in order to create a new device:
INSERT INTO Devices (deviceId, accountEnabled, displayName, operatingSystem, operatingSystemVersion, alternativeSecurityIds) VALUES ('4c299165-6e8f-4b45-a5ba-c5d250a707ff', false, 'JustinBTest', 'Windows', '15.1', '[{"type":2,"key":"101010101011"}]')
UPDATE
To update a Device record you must specify the Id in the WHERE clause.
UPDATE Devices SET OperatingSystemVersion = 10.0.13439.0 WHERE Id = '6c32edb5-7f28-41f8-9965-f3f9a1718fde'
DELETE
To delete a Device record, you must specify the Id in the WHERE clause.
DELETE FROM Devices WHERE Id = '6c32edb5-7f28-41f8-9965-f3f9a1718fde'
Columns
| Name | Type | ReadOnly | Description |
| id [KEY] | String | False |
The unique identifier assigned to the device. |
| deletedDateTime | Datetime | False |
The date and time when the device was deleted, useful for tracking device lifecycle. |
| accountEnabled | Bool | False |
Indicates whether the device's account is active and can be used for authentication. |
| alternativeSecurityIds | String | False |
Alternate security identifiers associated with the device, used for authentication and management. |
| approximateLastSignInDateTime | Datetime | False |
The estimated date and time of the device's most recent sign-in, useful for activity monitoring. |
| complianceExpirationDateTime | Datetime | False |
The date and time when the device's compliance status is set to expire. |
| deviceCategory | String | False |
The category assigned to the device, which can help with organization and policy application. |
| deviceId | String | False |
The unique identifier for the device, often used for internal tracking and management. |
| deviceMetadata | String | False |
Metadata associated with the device, containing additional contextual information. |
| deviceOwnership | String | False |
Specifies whether the device is corporate-owned or personally owned, useful for applying policies. |
| deviceVersion | Int | False |
The version number of the device, often used for managing updates and compatibility. |
| displayName | String | False |
The user-friendly name assigned to the device for easier identification. |
| enrollmentProfileName | String | False |
The name of the enrollment profile used to onboard the device into management. |
| enrollmentType | String | False |
Enrollment type of the device. |
| isCompliant | Bool | False |
Indicates whether the device meets the organization's compliance requirements. |
| isManaged | Bool | False |
Indicates whether the device is being managed by the organization's IT policies. |
| isManagementRestricted | Bool | False |
Specifies if the device has restrictions preventing certain management actions. |
| isRooted | Bool | False |
Indicates whether the device is rooted or jail-broken. |
| managementType | String | False |
The management channel of the device. |
| mdmAppId | String | False |
The unique identifier of the Mobile Device Management (MDM) application associated with the device. |
| onPremisesLastSyncDateTime | Datetime | False |
The last date and time when the device was synced with on-premises systems. |
| onPremisesSecurityIdentifier | String | False |
The security identifier (SID) assigned to the device in on-premises systems. |
| onPremisesSyncEnabled | Bool | False |
Indicates whether the device is enabled for synchronization with on-premises systems. |
| operatingSystem | String | False |
The name of the operating system running on the device. |
| operatingSystemVersion | String | False |
The version of the operating system running on the device. |
| physicalIds | String | False |
A list of physical identifiers for the device, often used for inventory tracking. |
| profileType | String | False |
The type of profile assigned to the device, determining its role and policies. |
| registrationDateTime | Datetime | False |
The date and time when the device was registered. |
| systemLabels | String | False |
Labels assigned to the device, often used for grouping and applying policies. |
| trustType | String | False |
The type of trust relationship established between the device and Microsoft Entra ID. |