| title | domain: forceDelete |
|---|---|
| description | Delete a domain using an asynchronous long-running operation. |
| author | tafra00 |
| ms.localizationpriority | medium |
| ms.subservice | entra-directory-management |
| doc_type | apiPageType |
| ms.date | 10/25/2024 |
Namespace: microsoft.graph
Delete a domain using an asynchronous long-running 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:
-
Updates the
userPrincipalName,mail, andproxyAddressesproperties ofuserswith references to the deleted domain to use the initial onmicrosoft.com domain. -
Updates the
mailproperty ofgroupswith references to the deleted domain to use the initial onmicrosoft.com domain. -
Updates the
identifierUrisproperty ofapplicationswith references to the deleted domain to use the initial onmicrosoft.com domain. -
If the number of objects to be renamed is greater than 1000, an error is returned.
-
If one of the
applicationsto be renamed is a multitenant app, an error is returned.
After the domain deletion completes, API operations for the deleted domain return an HTTP 404 status code. To verify deletion of a domain, you can perform a get domain operation.
[!INCLUDE national-cloud-support]
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]
POST /domains/{id}/forceDeleteFor {id}, specify the domain with its fully qualified domain name.
| Name | Description |
|---|---|
| Authorization | Bearer {token}. Required. Learn more about authentication and authorization. |
| Content-Type | application/json |
In the request body, provide a JSON object with the following parameters.
| Parameter | Type | Description |
|---|---|---|
disableUserAccounts |
Boolean |
Option to disable user accounts that are renamed. If a user account is disabled, the user isn't allowed to sign in. If set to true the users updated as part of this operation are disabled. Default value is true. |
If successful, this method returns HTTP/1.1 204 OK status code.
POST https://graph.microsoft.com/v1.0/domains/{id}/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]
HTTP/1.1 204 OK