Fixing Soft Delete Issues in Custom Connectors


Recently, we attempted to deploy a solution from our Development Environment to the UAT Environment and encountered a peculiar issue.

Let me explain our use case.

We developed a custom connector that integrates with SAP on AWS. This connector was thoroughly tested and deemed ready for UAT release. We had a solution that included this custom connector, and we were prepared to deploy it to UAT.

Since UAT is a managed zone for us, we deploy solutions as managed solutions. I exported the solution as managed from Development and imported it into UAT. The deployment went smoothly, and we received confirmation that the solution was deployed successfully.

However, for business invoicing reasons, the client requested that we roll back or remove the latest release. We proceeded to delete the managed solution that contained the custom connector.

In general, there could be various reasons for wanting to roll back or delete a managed solution from a target environment. According to product features, all components of a managed solution should also be deleted unless a base solution holds the same components.

In our case, the custom connector was deployed for the first time, and there was no base solution associated with it. After we deleted the solution, the custom connector was removed from the front end. We checked the custom connector list multiple times, and it was no longer visible.

After some days of invoice week, the client requested that we deploy the same custom connector again to UAT for testing. Following our usual process, we exported the solution containing this custom connector from the Development environment and attempted to deploy it to UAT.

Here’s where the issue arose: when we tried to deploy, we encountered the following error:

Solution “Custom Connector” failed to import: Connector import: FAILURE: {“error”:{“code”:”ApiHubsRequestFailed”,”message”:”The request failed with client error: ‘Cannot update a soft deleted connector {connectorschemaname}-2dd365-5f819a18f62ae216e5’. The correlation Id is ‘839474cb-c8ab-4dd0-97ee-ee9b92b13bea’.”,”details”:[{“code”:”MultipleErrorsOccurred”,”message”:”Multiple errors occurred. Please see details.”,”details”:[{“code”:”Conflict”,”message”:”Cannot update a soft deleted connector {connectorschemaname}-2dd365-5f819a18f62ae216e5″}]},{“code”:”FullNonLocalizedError”,”message”:”{\”Code\”:\”Conflict\”,\”Message\”:\”Cannot update a soft deleted connector {connectorschemaname}\”,\”Target\”:null,\”Details\”:[{\”Message\”:\”Cannot update a soft deleted connector {connectorschemaname}-2dd365-5f819a18f62ae216e5\”},{\”Code\”:\”Conflict\”},{\”ErrorEntity\”:{\”ExtendedCode\”:\”14052\”,\”MessageTemplate\”:\”Cannot update a soft deleted connector {0}\”,\”Parameters\”:[\”{connectorschemaname}-2dd365-5f819a18f62ae216e5\”],\”Code\”:\”Conflict\”,\”Message\”:\”Cannot update a soft deleted connector {connectorschemaname}-2dd365-5f819a18f62ae216e5\”}}],\”Innererror\”:null}”}]}}

The error clearly states, “Cannot update a soft deleted connector {connectorschemaname},” indicating that the custom connector was deleted as a soft delete rather than a hard delete. Ideally, once we delete a managed solution, all components should be hard deleted as well. It seems there might be a Microsoft process that soft deletes the custom connector first and, after some checks, should subsequently hard delete it. In our case, the connector was only soft deleted, and we were unable to locate it in make.powerapps.com or in D365 Dataverse. We could not find any record of it in Dataverse tables like connectors or connection references.

Definitions:

  • Soft Delete: Deactivating the record.
  • Hard Delete: Permanently deleting the record from the database.

Unfortunately, there are no blog posts or documentation from Microsoft addressing this error.

After several hours of troubleshooting, we tried a test approach. We created a test custom connector directly in UAT and then deleted it. The rationale was that if there was a process blocking the deletion of the previous custom connector, deleting the newly created one might trigger the deletion of all soft-deleted components. This approach worked; it successfully deleted both the test custom connector and the previously soft-deleted one that was not visible.

When we then tried to import the solution we had exported from Development, it imported without error.

Issue: Cannot update a soft deleted connector {connectorschemaname}.
Solution: Create a test custom connector and delete it to force the hard deletion of any soft-deleted custom connectors.

I understand this is not a permanent solution, but until Microsoft provides a proper fix, we as an implementation team cannot be left stuck on this issue.

I hope this information is helpful. Please reach out if you need further assistance; we are happy to help.


Leave a comment