Skip to content

Latest commit

 

History

History
146 lines (102 loc) · 5.01 KB

File metadata and controls

146 lines (102 loc) · 5.01 KB
title domain: forceDelete
description Delete a domain using an asynchronous operation.
author tafra00
ms.localizationpriority medium
ms.subservice entra-directory-management
doc_type apiPageType
ms.date 10/25/2024

domain: forceDelete

Namespace: microsoft.graph

[!INCLUDE beta-disclaimer]

Delete a domain using an asynchronous operation.

Before performing this operation, you must update or remove any references to Exchange as the provisioning service.

The following actions are performed as part of this operation:

  • Renames the UPN, EmailAddress, and ProxyAddress of users with references to the deleted domain.

  • Renames the EmailAddress of groups with references to the deleted domain.

  • Renames the identifierUris of applications with references to the deleted domain.

  • If the number of objects to be renamed is greater than 1,000, an error is returned.

  • If one of the applications to be renamed is a multitenant app, an error is returned.

After the domain deletion completes, API operations for the deleted domain return a 404 HTTP response code. To verify deletion of a domain, you can perform a get domain. If the domain was successfully deleted, a 404 HTTP response code is returned in the response.

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

POST /domains/{id}/forceDelete

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

In the request body, provide a JSON object with the following parameters.

Parameter Type Description
disableUserAccounts Boolean Option to disable renamed user accounts. If a user account is disabled, the user isn't allowed to sign in.
true (default) - User accounts renamed as part of this operation are disabled.
false - User accounts renamed as part of this operation aren't disabled.

Response

If successful, this method returns 200 OK response code.

Example

Request

POST https://graph.microsoft.com/beta/domains/contoso.com/forceDelete
Content-type: application/json

{
  "disableUserAccounts": true
}

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