Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
The important fix is to send an explicit empty JSON body. The blog example shows a bare PUT, but in some PowerShell environments the backend can reject the request with:
DomainResellerWebService_INVALID_BODY
```powershell
Try This:$subscriptionId = "<subscription-id>"
$resourceGroupName = "<resource-group-name>"
$domainName = "<your-domain.com>"
Connect-AzAccount
Set-AzContext -Subscription $subscriptionId
$path = "/subscriptions/$subscriptionId/resourceGroups/$resourceGroupName/providers/Microsoft.DomainRegistration/domains/$domainName/transferout?api-version=2021-02-01"
$response = Invoke-AzRestMethod `
-Method PUT `
-Path $path `
-Payload "{}"
$response.Content | ConvertFrom-Json
The response should contain an authCode value. That is the EPP/authorization code needed by the new registrar.
If that still fails, try the raw ARM request with an explicit content type:
$token = Get-AzAccessToken -ResourceUrl "https://management.azure.com/"
$accessToken = if ($token.Token -is [securestring]) {
[System.Net.NetworkCredential]::new("", $token.Token).Password
} else {
$token.Token
}
$uri = "https://management.azure.com/subscriptions/$subscriptionId/resourceGroups/$resourceGroupName/providers/Microsoft.DomainRegistration/domains/$domainName/transferout?api-version=2021-02-01"
Invoke-RestMethod `
-Method Put `
-Uri $uri `
-Headers @{
Authorization = "Bearer $accessToken"
"Content-Type" = "application/json"
} `
-Body "{}"
Also make sure the domain name is the App Service Domain resource name, for example example.com, not www.example.com.
A few other things to check:
- The domain may not be transferable within 60 days of new registration, registrar transfer, or registrant contact changes.
-
.ukdomains are handled differently and usually require Azure Support to update the IPS tag. - If local PowerShell fails, try Azure Cloud Shell PowerShell to rule out local module or environment issues.
If the API still returns DomainResellerWebService_INVALID_BODY even with body {}, then it is likely a backend/domain-reseller issue and should be raised with Azure Support.The important fix is to send an explicit empty JSON body.