com.vmware.vcloud.api.presentation.service.InvalidStateException: You must delete this Organization's Application Port Profiles before you can delete the organization.
From Cloud Director 10.3 and later versions, the stale application port profiles and this organization containing stale application port profiles can be force deleted via API.
1. Delete an organization with "force" option using API explorer:
DELETE https://<VCD-ENDPOINT>/cloudapi/1.0.0/orgs/<ORG-UUID>?force=true
2. Synchronize application port profiles:
POST https://<VCD-ENDPOINT>/cloudapi/1.0.0/applicationPortProfiles/sync
Note: POST request requires a filter to be specified. Please refer the OpenAPI documentation.
To retrieve the parameter specific to your environment, follow the steps below:
If utilization of the API is not possible then please open a support request with VMware Technical Support for assistance.
For more information on connecting to VCD via API, refer the article 320526
For release notes with the error details, refer 10.5 release notes and 10.6 release notes.