After a workload domain is decommissioned from SDDC Manager or if an ESXi host is removed via vCenter instead of SDDC, the ESXi service account (svc-vcf-esxiXXXX) does not get removed. The account persists in the SDDC Manager UI and is displayed as "Disconnected" in Password Management.
VMware Cloud Foundation 5.x
VMware Cloud Foundation 9.x
The automated decommission workflow fails to purge the associated service account credential entry from the SDDC Manager database.
Manually remove the stale services account user:
TOKEN=$(curl -H 'Content-Type:application/json' https://localhost/v1/tokens -d '{"username" : "<sso_user>","password":"<sso_password>"}' -k | jq -r '.accessToken')
curl -k -X GET "https://localhost/v1/credentials?resourceType=ESXI" -H "Authorization: Bearer $TOKEN" | jq '.elements[] | {id, username, modificationTimestamp}'{ "id": "ea######-####-####-####-d##########0", "username": "svc-vcf-esxixxx", "modificationTimestamp": "2025-01-08T18:43:17.863Z"}
curl -k -X DELETE "https://localhost/v1/system/credentials/<stale_id_from_Step_4 >" -H "Authorization: Bearer $TOKEN"