Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Community ,
I am facing an error while trying to establish the Oauth connection (JWT) between talend ETL tool and salesforce :
runtime exception https status 400-bad request message {"error":"invalid_grant","error_description":"audience is invalid"}
Here are the steps I have performed : (Talend Documentation)
Used following url to authenticate the user
https://test.salesforce.com/services/oauth2/authorize? <client_id>=& redirect_uri=https://test.salesforce.com/services/oauth2/success& response_type=code
Settings on talend connection:
Advanced setting : Salesforce Url :https://test.salesforce.com/services/oauth2
Thanks in advance
Hello,
Could you please take a look at this page to know more about 400 bad request error and check the error in the URL as suggested?
Feel free to let us know if it is OK with you.
Best regards
Sabrina
Hello praveenbonalu,
I am facing similar problem when trying to do a test connection to the Salesforce sandbox. Please let me know how did you resolve this. Thanks Sam
Hi Sabrina, Please can you help me on this one. Exact error I am getting and having seen the 400 bad request page not getting anything where could be the problem. I understand the problem is with URL. We are having URL in 2 places one mentioned in the Salesforce connected apps for the callback url. and another one in the advance option of the salesforce connection as originally mentioned in this post.
not sure which url is having problem as both can be access by the user id.thanks
Hello @samT
Sorry for our silence. We do our best to answer as many posts as possible.
We have replied to your another topic:https://community.talend.com/t5/Design-and-Development/Talend-DI-7-0-to-Salesforce-connection-using-...
Could you please have a look at it?
Best regards
Sabrina
Hello guys,
We faced the same issue a few weeks ago and we found the reason of this as you can see here: https://github.com/Talend/components/issues/1423
This is a part of the component code which handles the JWT authentication. The audience URL seems to be hardcoded for a Production environment and there is no way to make it works with a Sandbox environment. So we used a basic auth for sandbox and a JWT auth for the production.
Regards
Hello Harry, thanks for your reply.
Problem is without testing the Oauth in sandbox I cannot deploy the job in production.
I can't find SalesforceJwtConnection.java in the Talend studio installed folder. Please let me know if you manage to find any workaround for Sandbox.
Thanks