Skip to content

Latest commit

 

History

History
116 lines (88 loc) · 3.86 KB

File metadata and controls

116 lines (88 loc) · 3.86 KB
title Delete device
description Delete a registered device.
author myra-ramdenbourg
ms.localizationpriority medium
ms.subservice entra-directory-management
doc_type apiPageType
ms.date 10/25/2024

Delete device

Namespace: microsoft.graph

Delete a registered device.

[!INCLUDE national-cloud-support]

Permissions

Choose the permission or permissions marked as least privileged for this API. Use a higher privileged permission or permissions only if your app requires it. For details about delegated and application permissions, see Permission types. To learn more about these permissions, see the permissions reference.

[!INCLUDE permissions-table]

Important

In delegated scenarios with work or school accounts, the signed-in user must be assigned a supported Microsoft Entra role or a custom role with a supported role permission. The following least privileged roles are supported for this operation.

  • Intune Administrator
  • Windows 365 Administrator
  • Cloud Device Administrator

HTTP request

You can address the device using either its id or deviceId.

DELETE /devices/{id}
DELETE /devices(deviceId='{deviceId}')

Request headers

Name Description
Authorization Bearer {token}. Required. Learn more about authentication and authorization.

Request body

Don't supply a request body for this method.

Response

If successful, this method returns 204 No Content response code. It doesn't return anything in the response body.

Example

Request

DELETE https://graph.microsoft.com/v1.0/devices/{id}

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]


Response

HTTP/1.1 204 No Content