cancel
Showing results forย 
Search instead forย 
Did you mean:ย 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Salesforce Connector - Lakeflow Connect 400 Error

vedanth
New Contributor

HI All,

I have been trying to setup Salesforce using Lakeflow Connect and followed instructions on the docs

https://docs.databricks.com/aws/en/connect/managed-ingestion#sfdc

However I face into invalid_grant error 

vedanth_0-1779009668052.png

 

However login history on salesforce shows as successful from Databricks App.

Can someone please guide me on resolving this please?

Im using Databricks Free Edition and Salesforce Trial version

1 REPLY 1

GaneshI
New Contributor II

Hi Vedanth,

The invalid_grant error usually occurs due to authentication or OAuth configuration issues between Salesforce and Databricks Lakeflow Connect.

Could you please verify the following points:

  1. Ensure the Salesforce user account is not locked and has API access enabled.
  2. Verify whether you are using the correct login URL:
  3. If password-based authentication is used, make sure the Salesforce security token is appended to the password.
  4. Check whether the Connected App OAuth scopes include:
    • Full access (full)
    • Refresh token access (refresh_token, offline_access)
  5. Confirm that IP restrictions or MFA policies are not blocking the authentication request.
  6. Try reauthorizing the connection after resetting the security token.
  7. Also verify whether the connected app is approved for all users or the specific integration user profile.

This issue is commonly caused by expired refresh tokens, incorrect OAuth scopes, MFA enforcement, or incorrect environment endpoints.