Skip to main content

Hi, 

@Johnathan Caballero 

I intend to use the Salesforce Data Loader version 66.0.0 via the command line, and I think I have set everything up correctly to bypass username and password, since my jobs should run in the background without any human interaction. 

 

What have I configured? 

1. Created a new External Client Apps for Salesforce Data Loader

Data Loader via Command Line OAuth and Username Password issue

2. Copied the Consumer Key and pasted it into the Data Loader settings 

 

image.png

 

3. Configured the process-conf file 

 

image.png

Comments to the process-conf.xml file 

A: Executed for my testing in Partial Sandbox 

B: Intended for Production 

C: According to the documentation Password and Key is not needed when using the OAuth (

https://developer.salesforce.com/docs/atlas.en-us.dataLoader.meta/dataLoader/command_line_create_config_file.htm

 

4: Created at batch to run start the process-conf 

 

image.png

 

What I would expect based on my settings is that my batch "RunExportDKContactAll" would login to Salesforce automatically based on the OAuth and consumer key, without the need for any human interaction. 

What actually happens is that I am asked to enter my Username and Password the first time I am running the batch job 

 

image.png

 

image.png

 

hereafter the job is executed as expected. If I afterwards (without first closing the browser) run the job or another job again it will automatically open the browser and say Authorization Sucessfully, but as soon as I close all browser tabs I have to fill in username and password again. 

I have tested also tried the same testing removing A, B, and C from the process-conf file, and the result is still the same. 

 

Any feedback is appriciated - what am I missing ensure the command line execution can run without any issues? 

 

Regards, 

Henrik

8 answers
  1. Jun 15, 11:39 PM

    Data Loader CLI support for OAuth Web Server Flow is for interactive usse. 

     

    For headless use you need to configure Data Loader CLI to use password authentication (specifying the username / password).  We plan to add support for the OAuth JWT Bearer Flow later this year as the replacement for password authentication (due to SOAP API login() retirement).

0/9000