How to use Salesforce Source using Two-factor authentication token

How to use Salesforce Source using Two-factor authentication token

Postby bigmxx » Thu 15 Sep 2016 23:44

Hello,

I'm trying to use Devart Salesforce Source to load data from Salesforce to MS SQL Server. I have only one way to connect to Salesforce is using Two-factor authentication token (time-based tokens). I am able to setup Devart Salesforce Connection Manager and test the connection using my credentials and token which is provided by Salesforce Authenticator App. But when I execute Data flow task it fails with the following errors:

[Devart Salesforce Source [2]] Error: Devart.Data.Salesforce.SalesforceException (0x80004005): Invalid username, password, security token; or user locked out.
at Devart.SSIS.Salesforce.SalesforceSource.PrimeOutput(Int32 outputs, Int32[] outputIDs, PipelineBuffer[] buffers)
at Microsoft.SqlServer.Dts.Pipeline.ManagedComponentHost.HostPrimeOutput(IDTSManagedComponentWrapper100 wrapper, Int32 outputs, Int32[] outputIDs, IDTSBuffer100[] buffers, IntPtr ppBufferWirePacket)

[SSIS.Pipeline] Error: SSIS Error Code DTS_E_PRIMEOUTPUTFAILED. The PrimeOutput method on Devart Salesforce Source returned error code 0x80004005. The component returned a failure code when the pipeline engine called PrimeOutput(). The meaning of the failure code is defined by the component, but the error is fatal and the pipeline stopped executing. There may be error messages posted before this with more information about the failure.

I assume, that at the moment when SSIS package is run, the token has changed and a connection cannot be established (token changes every 30 sec).
Is there any work around?

Thanks.
bigmxx
 
Posts: 2
Joined: Thu 15 Sep 2016 22:29

Re: How to use Salesforce Source using Two-factor authentication token

Postby Shalex » Mon 10 Oct 2016 11:19

Sorry for the delay.

There are the following authentication types supported by Devart SSIS Data Flow Components: https://www.devart.com/dotconnect/salesforce/docs/Devart.Data.Salesforce~Devart.Data.Salesforce.AuthenticationType.html. You can choose authentication type via Devart Salesforce Connection Manager Editor > the Advanced button. Try using the OAuth 2.0 refresh token. Is that what you need?
Shalex
Devart Team
 
Posts: 7777
Joined: Thu 14 Aug 2008 12:44

Re: How to use Salesforce Source using Two-factor authentication token

Postby bigmxx » Sat 15 Oct 2016 02:23

Hi,

As I mentioned I can connect to Salesforce only using Two-factor authentication token (time-based tokens). In our company the usage the OAuth 2.0 refresh tokens is not permitted. So, the way how I connect to SF is: first - connect to SF using my credentials, second - confirm it using Authenticator App from my corp phone. So, this connection won't last long and it is good to set SSIS Devart Salesforce Source in dev time, but it fails in run-time because the token is good only for one session.
bigmxx
 
Posts: 2
Joined: Thu 15 Sep 2016 22:29

Re: How to use Salesforce Source using Two-factor authentication token

Postby Shalex » Tue 18 Oct 2016 11:36

The request is not clear: if your token is expired, how should provider establish a connection in this case?
Shalex
Devart Team
 
Posts: 7777
Joined: Thu 14 Aug 2008 12:44


Return to SSIS Data Flow Components