|
| 1 | +--- |
| 2 | +title: Errors When Disabling Salesforce with Server-to-Server Flow |
| 3 | +description: Troubleshoot errors that might occur when disabling Salesforce with a server-to-server flow in Microsoft Copilot for Sales. |
| 4 | +ms.date: 05/29/2025 |
| 5 | +author: sbmjais |
| 6 | +ms.author: shjais |
| 7 | +ms.reviewer: marrabi |
| 8 | +ms.custom: sap:CRM Permissions and Configurations\CRM Settings |
| 9 | +--- |
| 10 | +# Errors that occur when disabling Salesforce with server-to-server flow |
| 11 | + |
| 12 | +This article helps you troubleshoot errors that might occur when you try to disable Salesforce with a server-to-server flow in Microsoft Copilot for Sales. |
| 13 | + |
| 14 | +## Who is affected? |
| 15 | + |
| 16 | +| Requirement type |Description | |
| 17 | +|---------|---------| |
| 18 | +|**Client app** | Microsoft Teams | |
| 19 | +|**Platform** | Web and desktop clients | |
| 20 | +|**OS** | Windows and Mac | |
| 21 | +|**Deployment** | User managed and admin managed | |
| 22 | +|**CRM** | Salesforce | |
| 23 | +|**Users** | Administrators | |
| 24 | + |
| 25 | +## Couldn't get connected app details for the Salesforce organization |
| 26 | + |
| 27 | +### Symptoms |
| 28 | + |
| 29 | +When you try to disable Salesforce with a server-to-server flow, the following error message might occur: |
| 30 | + |
| 31 | +> Couldn't get connected app details for the Salesforce organization. |
| 32 | +
|
| 33 | +### Cause |
| 34 | + |
| 35 | +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 the server can't retrieve the connected app information during the deletion process. |
| 36 | + |
| 37 | +### Resolution |
| 38 | + |
| 39 | +To resolve this issue, try disabling Salesforce again. If the issue persists, gather the error details and contact [Microsoft support](/microsoft-sales-copilot/get-support). |
| 40 | + |
| 41 | +## Couldn't remove the connected app |
| 42 | + |
| 43 | +### Symptoms |
| 44 | + |
| 45 | +When you try to disable Salesforce with a server-to-server flow, the following error message might occur: |
| 46 | + |
| 47 | +> Couldn't remove the connected app. It may be read-only, missing, or restricted. |
| 48 | +
|
| 49 | +### Cause |
| 50 | + |
| 51 | +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 the current user doesn't have permission to delete the connected app or the app has already been deleted. |
| 52 | + |
| 53 | +### Resolution |
| 54 | + |
| 55 | +To resolve this issue, confirm that the connected app exists. |
| 56 | + |
| 57 | +1. Sign in to Salesforce CRM as an administrator. |
| 58 | + |
| 59 | +1. Go to **Setup** > **Apps** > **Connected Apps** > **Manage Connected Apps**. |
| 60 | + |
| 61 | +1. Confirm that the **Copilot for Sales Connected App** connected app exists. |
| 62 | + |
| 63 | +If this issue persists, contact [Microsoft support](/microsoft-sales-copilot/get-support) for further assistance. |
| 64 | + |
| 65 | +## Couldn't remove the permission set |
| 66 | + |
| 67 | +### Symptoms |
| 68 | + |
| 69 | +When you try to disable Salesforce with a server-to-server flow, the following error message might occur: |
| 70 | + |
| 71 | +> Couldn't remove the permission set. It may be read-only, missing, or restricted. |
| 72 | +
|
| 73 | +### Cause |
| 74 | + |
| 75 | +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 the current user doesn't have permission to delete the permission set or the permission set has already been deleted. |
| 76 | + |
| 77 | +### Resolution |
| 78 | + |
| 79 | +To resolve this issue, confirm that the permission set exists. |
| 80 | + |
| 81 | +1. Open the Salesforce Developer Console. |
| 82 | + |
| 83 | +1. Run the following query to confirm the permission set exists: |
| 84 | + |
| 85 | + ```sql |
| 86 | + SELECT Id, Name, Label, Description FROM PermissionSet WHERE Name = 'CopilotForSalesPermissionSet' |
| 87 | + ``` |
| 88 | + |
| 89 | +If this issue persists, contact [Microsoft support](/microsoft-sales-copilot/get-support) for further assistance. |
| 90 | + |
| 91 | +## Error when a resource can't be removed |
| 92 | + |
| 93 | +### Symptoms |
| 94 | + |
| 95 | +When you try to disable Salesforce with a server-to-server flow, one of the following error messages might occur: |
| 96 | + |
| 97 | +- > Couldn't remove the permission set assignment due to an invalid reference key. |
| 98 | +- > Connection user ID not found or already removed. |
| 99 | +- > Couldn't remove the permission assignment. Something else depends on it. |
| 100 | +- > Couldn't remove the permission assignment because the assignment ID does not exist. |
| 101 | +- > Couldn't find the connected app. It may have been deleted earlier. |
| 102 | +- > Couldn't find the permission set. It may have been deleted earlier. |
| 103 | +- > Couldn't find the connection user. It may have been deleted earlier. |
| 104 | + |
| 105 | +### Cause |
| 106 | + |
| 107 | +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 can't be deleted due to dependencies from other components. |
| 108 | +
|
| 109 | +### Resolution |
| 110 | +
|
| 111 | +To resolve this issue, try disabling the connection again. If the issue persists, gather the error details and contact [Microsoft support](/microsoft-sales-copilot/get-support). |
| 112 | +
|
| 113 | +## More information |
| 114 | +
|
| 115 | +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. |
| 116 | +
|
| 117 | +[!INCLUDE [Third-party disclaimer](../../includes/third-party-disclaimer.md)] |
0 commit comments