|
| 1 | +--- |
| 2 | +title: Server-to-Server Setup Disable Action Failed with Error Couldn’t remove a resource |
| 3 | +description: This article helps you troubleshoot the error that couldn’t remove a resource when you disable Salesforce Server-to-server flow. |
| 4 | +ms.date: 05/09/2025 |
| 5 | +author: sbmjais |
| 6 | +ms.author: shjais |
| 7 | +manager: shujoshi |
| 8 | +ms.custom: sap:CRM Permissions and Configurations\CRM Settings |
| 9 | +--- |
| 10 | +# Server-to-Server Setup Disable Action Failed with Error Couldn’t remove a resource |
| 11 | + |
| 12 | +This article helps you troubleshoot the error that couldn’t remove a resource when you disable Salesforce Server-to-server flow. |
| 13 | + |
| 14 | +## Who is affected? |
| 15 | + |
| 16 | +| Requirement type |Description | |
| 17 | +|---------|---------| |
| 18 | +|**Client app** | Teams | |
| 19 | +|**Platform** | Web and desktop clients | |
| 20 | +|**OS** | Windows and Mac | |
| 21 | +|**Deployment** | User managed and admin managed | |
| 22 | +|**CRM** | Salesforce | |
| 23 | +|**Users** | Administrator | |
| 24 | + |
| 25 | +## Symptoms |
| 26 | + |
| 27 | +When administrator try to disable Salesforce with server-to-server flow, you receive the following error message: |
| 28 | + |
| 29 | +> Couldn’t remove the permission set assignment due to an invalid reference key. |
| 30 | +
|
| 31 | +You see the error "Couldn’t remove the permission set assignment due to an invalid reference key." on the UI. |
| 32 | + |
| 33 | +## Cause |
| 34 | + |
| 35 | +When a "disable" request is received, the server attempts to delete the associated deployed resources—such as the connected app, permission set, and related components. This error typically occurs when a resource either no longer exists or cannot be deleted due to dependencies from other components. |
| 36 | + |
| 37 | +You may encounter the following errors in the UI: |
| 38 | + |
| 39 | +- Failed to remove the permission set assignment due to an invalid reference key. |
| 40 | +- Connection user ID not found or may have already been removed. |
| 41 | +- Unable to remove the permission assignment due to existing dependencies. |
| 42 | +- Failed to remove the permission assignment because the assignment ID doesn’t exist. |
| 43 | +- Connected app not found; it may have been deleted previously. |
| 44 | +- Permission set not found; it may have been deleted previously. |
| 45 | +- Connection user not found; it may have been deleted previously. |
| 46 | + |
| 47 | +## Resolution |
| 48 | + |
| 49 | +Please try again. If the problem continues, note the error details shown on the UI and contact support team for assistance. |
| 50 | + |
| 51 | +## More information |
| 52 | + |
| 53 | +If your issue is still unresolved, go to the [Copilot for Sales - Microsoft Community Hub](https://techcommunity.microsoft.com/t5/viva-sales/bd-p/VivaSales) to engage with our experts. |
| 54 | + |
| 55 | +[!INCLUDE [Third-party disclaimer](../../includes/third-party-disclaimer.md)] |
0 commit comments