Hello Ariel Arivara
Thank you for posting your query on Microsoft Q&A platform.
You are seeing 404 “resource not found” in the portal after deleting Azure Arc resources. Your CLI query returns none, which indicates deletion did succeed. If the Arc resources (servers or SQL instances) keep coming back, the usual cause is:
Auto‑provisioning/Policy is re‑onboarding the agents/extensions, or the Connected Machine agent on the server is still connected and recreates the Arc resource, or the Azure Extension for SQL Server is auto‑installing and re‑registering instances.
Try below resolution steps as a workaround (do these in order):
Confirm deletion (you already did): Use the direct type filter (your command is correct). If this returns empty, the resources are gone at ARM level.
az resource list \
--resource-group "<RG>" \
--query "[?type=='Microsoft.HybridCompute/machines' || type=='Microsoft.AzureArcData/sqlServerInstances']"
Portal 404 on pinned tiles is expected, remove the pinned tile and refresh.
Disable anything that auto‑onboards Arc/agents : Defender for Cloud auto‑provisioning applies DeployIfNotExists policies behind the scenes and can re‑install AMA/MDE/Guest Configuration, effectively re‑creating Arc connectivity.
Disable anything that auto‑onboards Arc/agents:
Defender for Cloud auto‑provisioning applies DeployIfNotExists policies behind the scenes and can re‑install AMA/MDE/Guest Configuration, effectively re‑creating Arc connectivity.
- In Defender for Cloud → Environment settings → your subscription → Settings & monitoring, set relevant Auto‑provisioning toggles (Azure Monitor Agent, endpoint/guest configuration, etc.) to Off. This stops policy‑driven re‑deployment.
- If you use Azure Policy directly, remove/disable initiatives such as “Use Azure Policy to install Azure Monitor Agent” (and related DCR association policies) at subscription/RG scope. These built‑ins deploy AMA to Arc machines and can bring the resource back.
Reference: https://learn.microsoft.com/en-us/azure/azure-monitor/agents/azure-monitor-agent-policy
Disconnect the local agent, then uninstall it: If the Azure Connected Machine agent remains connected, it will recreate the Arc resource.
Disconnect on the server:
# If the cloud resource is already deleted:
azcmagent disconnect --force-local-only
# Verify:
azcmagent show
Use --force-local-only when the cloud resource is gone to avoid unintended deletions.
Reference: https://learn.microsoft.com/en-us/azure/azure-arc/servers/azcmagent-disconnect
Uninstall/Clean up the Connected Machine agent following the official Manage and maintain the agent guidance (Windows or Linux)
Reference: https://learn.microsoft.com/en-us/azure/azure-arc/servers/manage-agent?tabs=windows
Clean up the portal view: Remove any pinned dashboard tiles pointing to the deleted resources and hard‑refresh the portal (Ctrl+F5). The 404 simply reflects a stale reference after deletion.
Kindly let us know if the solution provided worked for you. If you need any further assistance, please feel free to reach out.
Thanks,
Suchitra.