With no objects left on it, remove the old domain from the tenant, then its DNS records and its UPN suffix in AD.
Check nothing uses it
PowerShell
Connect-MgGraph -TenantId old.contoso.com -Scopes "Domain.ReadWrite.All","Directory.Read.All" -NoWelcome (Get-MgDomainNameReference -DomainId "lab.contoso.com" -All | Measure-Object).Count # 0 Get-MgDomain -DomainId "lab.contoso.com" | Select-Object Id, IsDefault # IsDefault must be False
Remove it from the tenant
PowerShell
Remove-MgDomain -DomainId "lab.contoso.com" Get-MgDomain | Select-Object Id, IsDefault
Remove its DNS
List what is there before deleting anything, so you touch nothing else in the parent zone.
Azure CLI
$rg = "rg-contoso-dns" az network dns record-set ns show -g $rg -z contoso.com -n lab -o table az network dns record-set list -g $rg -z lab.contoso.com --query "[].type" -o tsv # expect only NS and SOA az network dns record-set ns delete -g $rg -z contoso.com -n lab --yes az network dns zone delete -g $rg -n lab.contoso.com --yes
Remove the UPN suffix from AD
Only after every account has moved to the new suffix.
A domain controller
(Get-ADObject -Filter "userPrincipalName -like '*@lab.contoso.com'").Count # 0
Set-ADForest -Identity ad.contoso.com -UPNSuffixes @{Remove="lab.contoso.com"}
(Get-ADForest).UPNSuffixesDone when
Check
The old tenant lists no synced users, no sync account and no lab domain; the DNS zone has gone; and AD no longer offers the old suffix. Delete the empty CON-Sync-Parked OU once no configuration refers to it.


