Symptoms
Executing SOQL queries shows:
Error code: Invalid_grant
Error message: Authentication failure ...
Cause
This error occurs for those reasons:
-
Wrong URL in datasource base URL field
-
IP restriction or login hour restriction
-
Invalid user credentials or user profile has no 'API Enabled' option
Resolution
-
In Elements Connect datasource configuration check if you set your real domain name url, available from Salesforce Settings / Company Settings / My Domain
-
if those restrictions are enabled, try disabling them and try again to authenticate
-
User should have the API permission enabled in the profile configuration: Setup User -> click on profile -> Administrative Permissions -> API Enabled