openapi: 3.2.0 info: title: Identity.DirectoryManagement Devices.device API version: v1.0 servers: - url: https://graph.microsoft.com/v1.0/ description: Core security: - azureaadv2: [] tags: - name: Devices device paths: /devices: get: tags: - Devices device summary: List devices description: Retrieve a list of device objects registered in the organization. externalDocs: description: Find more info here url: https://learn.microsoft.com/graph/api/device-list?view=graph-rest-1.0 operationId: device_ListDevice parameters: - name: ConsistencyLevel in: header description: 'Indicates the requested consistency level. Documentation URL: https://docs.microsoft.com/graph/aad-advanced-queries' style: simple schema: type: string examples: example-1: description: $search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'. value: eventual - $ref: '#/components/parameters/top' - $ref: '#/components/parameters/skip' - $ref: '#/components/parameters/search' - $ref: '#/components/parameters/filter' - $ref: '#/components/parameters/count' - name: $orderby in: query description: Order items by property values style: form explode: false schema: uniqueItems: true type: array items: type: string - name: $select in: query description: Select properties to be returned style: form explode: false schema: uniqueItems: true type: array items: type: string - name: $expand in: query description: Expand related entities style: form explode: false schema: uniqueItems: true type: array items: type: string responses: 2XX: $ref: '#/components/responses/microsoft.graph.deviceCollectionResponse' default: $ref: '#/components/responses/error' x-ms-pageable: nextLinkName: '@odata.nextLink' operationName: listMore x-ms-docs-operation-type: operation post: tags: - Devices device summary: Create device description: Create and register a new device in the organization. externalDocs: description: Find more info here url: https://learn.microsoft.com/graph/api/device-post-devices?view=graph-rest-1.0 operationId: device_CreateDevice requestBody: description: New entity content: application/json: schema: $ref: '#/components/schemas/microsoft.graph.device' required: true responses: 2XX: description: Created entity content: application/json: schema: $ref: '#/components/schemas/microsoft.graph.device' default: $ref: '#/components/responses/error' x-ms-docs-operation-type: operation /devices/{device-id}: get: tags: - Devices device summary: Get device description: Get the properties and relationships of a device object. externalDocs: description: Find more info here url: https://learn.microsoft.com/graph/api/device-get?view=graph-rest-1.0 operationId: device_GetDevice parameters: - name: device-id in: path description: The unique identifier of device required: true style: simple schema: type: string x-ms-docs-key-type: device - name: $select in: query description: Select properties to be returned style: form explode: false schema: uniqueItems: true type: array items: type: string - name: $expand in: query description: Expand related entities style: form explode: false schema: uniqueItems: true type: array items: type: string responses: 2XX: description: Retrieved entity content: application/json: schema: $ref: '#/components/schemas/microsoft.graph.device' default: $ref: '#/components/responses/error' x-ms-docs-operation-type: operation patch: tags: - Devices device summary: Update device description: Update the properties of a registered device. Only certain properties of a device can be updated through approved Mobile Device Managment (MDM) apps. externalDocs: description: Find more info here url: https://learn.microsoft.com/graph/api/device-update?view=graph-rest-1.0 operationId: device_UpdateDevice parameters: - name: device-id in: path description: The unique identifier of device required: true style: simple schema: type: string x-ms-docs-key-type: device requestBody: description: New property values content: application/json: schema: $ref: '#/components/schemas/microsoft.graph.device' required: true responses: 2XX: description: Success content: application/json: schema: $ref: '#/components/schemas/microsoft.graph.device' default: $ref: '#/components/responses/error' x-ms-docs-operation-type: operation delete: tags: - Devices device summary: Delete device description: Delete a registered device. externalDocs: description: Find more info here url: https://learn.microsoft.com/graph/api/device-delete?view=graph-rest-1.0 operationId: device_DeleteDevice parameters: - name: device-id in: path description: The unique identifier of device required: true style: simple schema: type: string x-ms-docs-key-type: device - name: If-Match in: header description: ETag style: simple schema: type: string responses: 2XX: description: Success default: $ref: '#/components/responses/error' x-ms-docs-operation-type: operation /devices(deviceId='{deviceId}'): get: tags: - Devices device summary: Get device description: Get the properties and relationships of a device object. externalDocs: description: Find more info here url: https://learn.microsoft.com/graph/api/device-get?view=graph-rest-1.0 operationId: device_GetDeviceGraphBPreDeviceId parameters: - name: deviceId in: path description: Alternate key of device required: true style: simple schema: type: - string - 'null' - name: $select in: query description: Select properties to be returned style: form explode: false schema: uniqueItems: true type: array items: type: string - name: $expand in: query description: Expand related entities style: form explode: false schema: uniqueItems: true type: array items: type: string responses: 2XX: description: Retrieved entity content: application/json: schema: $ref: '#/components/schemas/microsoft.graph.device' default: $ref: '#/components/responses/error' x-ms-docs-operation-type: operation patch: tags: - Devices device summary: Update device description: Update the properties of a registered device. Only certain properties of a device can be updated through approved Mobile Device Managment (MDM) apps. externalDocs: description: Find more info here url: https://learn.microsoft.com/graph/api/device-update?view=graph-rest-1.0 operationId: device_UpdateDeviceGraphBPreDeviceId parameters: - name: deviceId in: path description: Alternate key of device required: true style: simple schema: type: - string - 'null' requestBody: description: New property values content: application/json: schema: $ref: '#/components/schemas/microsoft.graph.device' required: true responses: 2XX: description: Success content: application/json: schema: $ref: '#/components/schemas/microsoft.graph.device' default: $ref: '#/components/responses/error' x-ms-docs-operation-type: operation delete: tags: - Devices device summary: Delete device description: Delete a registered device. externalDocs: description: Find more info here url: https://learn.microsoft.com/graph/api/device-delete?view=graph-rest-1.0 operationId: device_DeleteDeviceGraphBPreDeviceId parameters: - name: deviceId in: path description: Alternate key of device required: true style: simple schema: type: - string - 'null' - name: If-Match in: header description: ETag style: simple schema: type: string responses: 2XX: description: Success default: $ref: '#/components/responses/error' x-ms-docs-operation-type: operation /devices/$count: get: tags: - Devices device summary: Get the number of the resource operationId: device_GetCount parameters: - name: ConsistencyLevel in: header description: 'Indicates the requested consistency level. Documentation URL: https://docs.microsoft.com/graph/aad-advanced-queries' style: simple schema: type: string examples: example-1: description: $search and $count queries require the client to set the ConsistencyLevel HTTP header to 'eventual'. value: eventual - $ref: '#/components/parameters/search' - $ref: '#/components/parameters/filter' responses: 2XX: $ref: '#/components/responses/ODataCountResponse' default: $ref: '#/components/responses/error' components: parameters: count: name: $count in: query description: Include count of items style: form explode: false schema: type: boolean filter: name: $filter in: query description: Filter items by property values style: form explode: false schema: type: string search: name: $search in: query description: Search items by search phrases style: form explode: false schema: type: string skip: name: $skip in: query description: Skip the first n items style: form explode: false schema: minimum: 0 type: integer top: name: $top in: query description: Show only the first n items style: form explode: false schema: minimum: 0 type: integer example: 50 schemas: microsoft.graph.alternativeSecurityId: title: alternativeSecurityId type: object properties: identityProvider: type: - string - 'null' description: For internal use only. key: type: - string - 'null' description: For internal use only. format: base64url type: maximum: 2147483647 minimum: -2147483648 type: - number - 'null' description: For internal use only. format: int32 additionalProperties: type: object microsoft.graph.ODataErrors.ODataError: required: - error type: object properties: error: $ref: '#/components/schemas/microsoft.graph.ODataErrors.MainError' additionalProperties: type: object microsoft.graph.deviceCollectionResponse: title: Collection of device type: object properties: value: type: array items: $ref: '#/components/schemas/microsoft.graph.device' '@odata.nextLink': type: - string - 'null' additionalProperties: type: object microsoft.graph.ODataErrors.InnerError: type: object additionalProperties: type: object description: The structure of this object is service-specific microsoft.graph.directoryObject: allOf: - $ref: '#/components/schemas/microsoft.graph.entity' - title: directoryObject type: object properties: deletedDateTime: pattern: ^[0-9]{4,}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]([.][0-9]{1,12})?(Z|[+-][0-9][0-9]:[0-9][0-9])$ type: - string - 'null' description: Date and time when this object was deleted. Always null when the object hasn't been deleted. format: date-time additionalProperties: type: object microsoft.graph.ODataErrors.ErrorDetails: required: - code - message type: object properties: code: type: string message: type: string target: type: - string - 'null' additionalProperties: type: object microsoft.graph.extension: allOf: - $ref: '#/components/schemas/microsoft.graph.entity' - title: extension type: object additionalProperties: type: object microsoft.graph.ODataErrors.MainError: required: - code - message type: object properties: code: type: string message: type: string x-ms-primary-error-message: true target: type: - string - 'null' details: type: array items: $ref: '#/components/schemas/microsoft.graph.ODataErrors.ErrorDetails' innerError: $ref: '#/components/schemas/microsoft.graph.ODataErrors.InnerError' additionalProperties: type: object microsoft.graph.entity: title: entity type: object properties: id: type: string description: The unique identifier for an entity. Read-only. additionalProperties: type: object ODataCountResponse: type: integer format: int32 microsoft.graph.device: allOf: - $ref: '#/components/schemas/microsoft.graph.directoryObject' - title: device type: object properties: accountEnabled: type: - boolean - 'null' description: true if the account is enabled; otherwise, false. Required. Default is true. Supports $filter (eq, ne, not, in). Only callers with at least the Cloud Device Administrator role can set this property. alternativeSecurityIds: type: array items: $ref: '#/components/schemas/microsoft.graph.alternativeSecurityId' description: For internal use only. Not nullable. Supports $filter (eq, not, ge, le). approximateLastSignInDateTime: pattern: ^[0-9]{4,}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]([.][0-9]{1,12})?(Z|[+-][0-9][0-9]:[0-9][0-9])$ type: - string - 'null' description: The timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Read-only. Supports $filter (eq, ne, not, ge, le, and eq on null values) and $orderby. format: date-time complianceExpirationDateTime: pattern: ^[0-9]{4,}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]([.][0-9]{1,12})?(Z|[+-][0-9][0-9]:[0-9][0-9])$ type: - string - 'null' description: The timestamp when the device is no longer deemed compliant. The timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Read-only. format: date-time deviceCategory: type: - string - 'null' description: User-defined property set by Intune to automatically add devices to groups and simplify managing devices. deviceId: type: - string - 'null' description: Unique identifier set by Azure Device Registration Service at the time of registration. This alternate key can be used to reference the device object. Supports $filter (eq, ne, not, startsWith). deviceMetadata: type: - string - 'null' description: For internal use only. Set to null. deviceOwnership: type: - string - 'null' description: 'Ownership of the device. Intune sets this property. The possible values are: unknown, company, personal.' deviceVersion: maximum: 2147483647 minimum: -2147483648 type: - number - 'null' description: For internal use only. format: int32 displayName: type: - string - 'null' description: The display name for the device. Maximum length is 256 characters. Required. Supports $filter (eq, ne, not, ge, le, in, startsWith, and eq on null values), $search, and $orderby. enrollmentProfileName: type: - string - 'null' description: Enrollment profile applied to the device. For example, Apple Device Enrollment Profile, Device enrollment - Corporate device identifiers, or Windows Autopilot profile name. This property is set by Intune. enrollmentType: type: - string - 'null' description: 'Enrollment type of the device. Intune sets this property. The possible values are: unknown, userEnrollment, deviceEnrollmentManager, appleBulkWithUser, appleBulkWithoutUser, windowsAzureADJoin, windowsBulkUserless, windowsAutoEnrollment, windowsBulkAzureDomainJoin, windowsCoManagement, windowsAzureADJoinUsingDeviceAuth,appleUserEnrollment, appleUserEnrollmentWithServiceAccount. NOTE: This property might return other values apart from those listed.' isCompliant: type: - boolean - 'null' description: true if the device complies with Mobile Device Management (MDM) policies; otherwise, false. Read-only. This can only be updated by Intune for any device OS type or by an approved MDM app for Windows OS devices. Supports $filter (eq, ne, not). isManaged: type: - boolean - 'null' description: true if the device is managed by a Mobile Device Management (MDM) app; otherwise, false. This can only be updated by Intune for any device OS type or by an approved MDM app for Windows OS devices. Supports $filter (eq, ne, not). isManagementRestricted: type: - boolean - 'null' description: Indicates whether the device is a member of a restricted management administrative unit. If not set, the default value is null and the default behavior is false. Read-only. To manage a device that's a member of a restricted management administrative unit, the administrator or calling app must be assigned a Microsoft Entra role at the scope of the restricted management administrative unit. Requires $select to retrieve. isRooted: type: - boolean - 'null' description: true if the device is rooted or jail-broken. This property can only be updated by Intune. managementType: type: - string - 'null' description: 'The management channel of the device. This property is set by Intune. The possible values are: eas, mdm, easMdm, intuneClient, easIntuneClient, configurationManagerClient, configurationManagerClientMdm, configurationManagerClientMdmEas, unknown, jamf, googleCloudDevicePolicyController.' manufacturer: type: - string - 'null' description: Manufacturer of the device. Read-only. mdmAppId: type: - string - 'null' description: Application identifier used to register device into MDM. Read-only. Supports $filter (eq, ne, not, startsWith). model: type: - string - 'null' description: Model of the device. Read-only. onPremisesLastSyncDateTime: pattern: ^[0-9]{4,}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]([.][0-9]{1,12})?(Z|[+-][0-9][0-9]:[0-9][0-9])$ type: - string - 'null' description: The last time at which the object was synced with the on-premises directory. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z Read-only. Supports $filter (eq, ne, not, ge, le, in). format: date-time onPremisesSecurityIdentifier: type: - string - 'null' description: The on-premises security identifier (SID) for the user who was synchronized from on-premises to the cloud. Read-only. Requires $select to retrieve. Supports $filter (eq). onPremisesSyncEnabled: type: - boolean - 'null' description: true if this object is synced from an on-premises directory; false if this object was originally synced from an on-premises directory but is no longer synced; null if this object has never been synced from an on-premises directory (default). Read-only. Supports $filter (eq, ne, not, in, and eq on null values). operatingSystem: type: - string - 'null' description: The type of operating system on the device. Required. Supports $filter (eq, ne, not, ge, le, startsWith, and eq on null values). operatingSystemVersion: type: - string - 'null' description: The version of the operating system on the device. Required. Supports $filter (eq, ne, not, ge, le, startsWith, and eq on null values). physicalIds: type: array items: type: string description: For internal use only. Not nullable. Supports $filter (eq, not, ge, le, startsWith,/$count eq 0, /$count ne 0). profileType: type: - string - 'null' description: 'The profile type of the device. Possible values: RegisteredDevice (default), SecureVM, Printer, Shared, IoT.' registrationDateTime: pattern: ^[0-9]{4,}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]([.][0-9]{1,12})?(Z|[+-][0-9][0-9]:[0-9][0-9])$ type: - string - 'null' description: Date and time of when the device was registered. The timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Read-only. format: date-time systemLabels: type: array items: type: string description: List of labels applied to the device by the system. Supports $filter (/$count eq 0, /$count ne 0). trustType: type: - string - 'null' description: 'Type of trust for the joined device. Read-only. Possible values: Workplace (indicates bring your own personal devices), AzureAd (Cloud-only joined devices), ServerAd (on-premises domain joined devices joined to Microsoft Entra ID). For more information, see Introduction to device management in Microsoft Entra ID. Supports $filter (eq, ne, not, in).' extensions: type: array items: $ref: '#/components/schemas/microsoft.graph.extension' description: The collection of open extensions defined for the device. Read-only. Nullable. x-ms-navigationProperty: true memberOf: type: array items: $ref: '#/components/schemas/microsoft.graph.directoryObject' description: Groups and administrative units that this device is a member of. Read-only. Nullable. Supports $expand. x-ms-navigationProperty: true registeredOwners: type: array items: $ref: '#/components/schemas/microsoft.graph.directoryObject' description: The user that cloud joined the device or registered their personal device. The registered owner is set at the time of registration. Read-only. Nullable. Supports $expand. x-ms-navigationProperty: true registeredUsers: type: array items: $ref: '#/components/schemas/microsoft.graph.directoryObject' description: Collection of registered users of the device. For cloud joined devices and registered personal devices, registered users are set to the same value as registered owners at the time of registration. Read-only. Nullable. Supports $expand. x-ms-navigationProperty: true transitiveMemberOf: type: array items: $ref: '#/components/schemas/microsoft.graph.directoryObject' description: Groups and administrative units that the device is a member of. This operation is transitive. Supports $expand. x-ms-navigationProperty: true additionalProperties: type: object responses: microsoft.graph.deviceCollectionResponse: description: Retrieved collection content: application/json: schema: $ref: '#/components/schemas/microsoft.graph.deviceCollectionResponse' ODataCountResponse: description: The count of the resource content: text/plain: schema: $ref: '#/components/schemas/ODataCountResponse' error: description: error content: application/json: schema: $ref: '#/components/schemas/microsoft.graph.ODataErrors.ODataError' securitySchemes: azureaadv2: type: oauth2 flows: authorizationCode: authorizationUrl: https://login.microsoftonline.com/common/oauth2/v2.0/authorize tokenUrl: https://login.microsoftonline.com/common/oauth2/v2.0/token scopes: {}