"You must delete this Organization's Application Port Profiles before you can delete the organization." when deleting an organization in VMware Cloud Director.
book
Article ID: 312277
calendar_today
Updated On:
Products
VMware Cloud Director
Issue/Introduction
Deleting an organization in VMware Cloud Director UI fails with:
com.vmware.vcloud.api.presentation.service.InvalidStateException: You must delete this Organization's Application Port Profiles before you can delete the organization.
Edge gateways which were part of the organization were deleted before the associated application port profiles were deleted.
Environment
VMware Cloud Director 10.x
Cause
This is a known issue affecting VMware Cloud Director 10.4.x and 10.5.x versions.
The issue occurs due to the presence of application port profiles which were not deleted before the edge in the organization was deleted.
Resolution
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.
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:
From API Explorer:
The networkProviderId value to be entered is the ID of the NSXT manager you have integrated with the VCD. You can get this from the VCD UI > Infrastructure Resources > NSX-T Managers > The browser URL will now be populated with a UUID.
Populate the parameter in the API Explorer in the following format. _context==urn:vcloud:nsxtmanager:<NSXT manager ID noted from the browser URL