An incorrect custom domain is entered when signing in to Salesforce

This article helps you troubleshoot and resolve issues when users enter an incorrect custom domain while signing in to Salesforce CRM.

Note

Microsoft Sales Copilot is rebranded as Microsoft Copilot for Sales in January 2024. The screenshot in this article will be updated with the new name soon.

Who is affected?

Requirement type Description
Client app Copilot for Sales Outlook add-in
Platform Web and desktop clients
OS Windows and Mac
Deployment User managed and admin managed
CRM Salesforce
Users Users trying to sign in to Salesforce

Symptoms

After you sign in to Salesforce CRM through the Copilot for Sales add-in for Outlook, you can't access the Salesforce environment, and the following error message is displayed:

OAuth2 authorization flow failed for service 'Salesforce'. OAuth 2 sign in failed to exchange code for access token. Client ID and secret sent in form body.. Response status code-BadRequest. Response body: {"error":"invalid_grant","error_description":"authentication failure"} Client ID and secret sent in Basic authorization header.. Response status code=BadRequest. REsponse body: {"error":"invalid_grant","error_description":"authentication failure"}

Cause

You entered an incorrect custom domain when signing in to Salesforce CRM.

Resolution

Enter the correct custom domain and sign in to Salesforce CRM again. For example, in the following image, correct.my.salesforce.com is the host, and /login represents the path to a custom sign-in page.

Screenshot that shows the correct custom domain in Salesforce.

More information

If your issue is still unresolved, go to the Copilot for Sales - Microsoft Community Hub to engage with our experts.

Third-party information disclaimer

The third-party products that this article discusses are manufactured by companies that are independent of Microsoft. Microsoft makes no warranty, implied or otherwise, about the performance or reliability of these products.