|
| 1 | +--- |
| 2 | +title: Couldn't remove a resource when disabling Salesforce server-to-server flow |
| 3 | +description: Resolves an error that occurs when a resource can't be removed while disabling 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 | + |
| 11 | +# Couldn't remove a resource when disabling Salesforce server-to-server flow |
| 12 | + |
| 13 | +This article helps you troubleshoot an error that occurs when a resource can't be removed while disabling Salesforce server-to-server flow. |
| 14 | + |
| 15 | +## Who is affected? |
| 16 | + |
| 17 | +| Requirement type |Description | |
| 18 | +|---------|---------| |
| 19 | +|**Client app** | Teams | |
| 20 | +|**Platform** | Web and desktop clients | |
| 21 | +|**OS** | Windows and Mac | |
| 22 | +|**Deployment** | User managed and admin managed | |
| 23 | +|**CRM** | Salesforce | |
| 24 | +|**Users** | Administrator | |
| 25 | + |
| 26 | +## Symptoms |
| 27 | + |
| 28 | +When you try to disable Salesforce with server-to-server flow, you may receive the following error message. |
| 29 | + |
| 30 | +> Couldn't remove the permission set assignment due to an invalid reference key. |
| 31 | +
|
| 32 | +## Cause |
| 33 | + |
| 34 | +When a disable request is received, the server attempts to delete deployed resources, such as the connected app and permission set. The error occurs when a resource either no longer exists or cannot be deleted due to dependencies from other components. |
| 35 | + |
| 36 | +You may get the following errors: |
| 37 | + |
| 38 | +- Couldn't remove the permission set assignment due to an invalid reference key. |
| 39 | +- Connection user ID not found or already removed. |
| 40 | +- Couldn't remove the permission assignment. Something else depends on it. |
| 41 | +- Couldn't remove the permission assignment because the assignment ID does not exist. |
| 42 | +- Couldn't find the connected app. It may have been deleted earlier. |
| 43 | +- Couldn't find the permission set. It may have been deleted earlier. |
| 44 | +- Couldn't find the connection user. It may have been deleted earlier. |
| 45 | + |
| 46 | +## Resolution |
| 47 | + |
| 48 | +To resolve this issue, try disabling the connection again. If the issue persists, gather the error details and contact Microsoft support. |
| 49 | + |
| 50 | +## More information |
| 51 | + |
| 52 | +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. |
| 53 | + |
| 54 | +[!INCLUDE [Third-party disclaimer](../../includes/third-party-disclaimer.md)] |
0 commit comments