Stranded application port profiles might prevent you from deleting the organization that contains them. If you need to delete an organization, you can use the VMware Cloud Director API to force delete it and to remove the stranded application port profiles associated with it.

If a system administrator deletes an NSX edge gateway without first removing the application port profiles that were created on it, the application port profiles become stranded. Because of this, the organization that contains them cannot be deleted through the VMware Cloud Director UI.

You can use the VMware Cloud Director API to force delete an organization and to delete the stranded application port profiles associated with it from both VMware Cloud Director and NSX.

Procedure

  1. Run a DELETE request to delete the organization.
    DELETE https://api_host/cloudapi/1.0.0/orgs/orgUrn?force=true

    Use the additional query parameter force=true to delete the organization even if it contains objects that are not in an appropriate state.

  2. Run a POST request to sync the application port profiles.
    POST https://api_host/cloudapi/1.0.0/applicationPortProfiles/sync

Results

The stranded application port profiles are deleted from both VMware Cloud Director and NSX.