domain: forceDelete
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
, andproxyAddresses
properties ofusers
with references to the deleted domain to use the initial onmicrosoft.com domain.Updates the
mail
property ofgroups
with references to the deleted domain to use the initial onmicrosoft.com domain.Updates the
identifierUris
property ofapplications
with 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
applications
to 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.
This API is available in the following national cloud deployments.
Global service | US Government L4 | US Government L5 (DOD) | China operated by 21Vianet |
---|---|---|---|
✅ | ✅ | ✅ | ✅ |
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.
Permission type | Least privileged permissions | Higher privileged permissions |
---|---|---|
Delegated (work or school account) | Domain.ReadWrite.All | Not available. |
Delegated (personal Microsoft account) | Not supported. | Not supported. |
Application | Domain.ReadWrite.All | Not available. |
The work or school account needs to belong to at least the Domain Name Administrator Microsoft Entra role.
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 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 . |
Response body
If successful, this method returns HTTP/1.1 204 OK
status code.
Example
Request
POST https://graph.microsoft.com/v1.0/domains/{id}/forceDelete
Content-type: application/json
{
"disableUserAccounts": true
}
Response
HTTP/1.1 204 OK
Váš názor
https://aka.ms/ContentUserFeedback.
Připravujeme: V průběhu roku 2024 budeme postupně vyřazovat problémy z GitHub coby mechanismus zpětné vazby pro obsah a nahrazovat ho novým systémem zpětné vazby. Další informace naleznete v tématu:Odeslat a zobrazit názory pro