Skip to content

Latest commit

 

History

History
122 lines (89 loc) · 3.9 KB

File metadata and controls

122 lines (89 loc) · 3.9 KB
title Delete domain
description Delete a domain from a tenant.
author tafra00
ms.localizationpriority medium
ms.subservice entra-directory-management
doc_type apiPageType
ms.date 10/25/2024

Delete domain

Namespace: microsoft.graph

Delete a domain from a tenant.

Important:

  • Deleted domains are not recoverable.
  • Attempts to delete will fail if there are any resources or objects still dependent on the domain. You can find all dependent resources by using the List domainNameReferences API.

[!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]

[!INCLUDE rbac-domain-apis-write]

HTTP request

DELETE /domains/{id}

For {id}, specify the domain with its fully qualified domain name.

Request headers

Name Description
Authorization Bearer {token}. Required. Learn more about authentication and authorization.
Content-Type application/json

Request body

Don't supply a request body for this method.

Response

If successful, this method returns 204 No Content response code. It does not return a response body.

Example

Request
DELETE https://graph.microsoft.com/v1.0/domains/contoso.com

[!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

Note: The response object shown here might be shortened for readability.

HTTP/1.1 204 No Content