How to use Salesforce Source using Two-factor authentication token

Discussion of issues, suggestions and bugs of Devart SSIS Data Flow Components, our product line for building SSIS-based ETL solutions, performing data access to popular cloud applications and databases.
Post Reply
bigmxx
Posts: 2
Joined: Thu 15 Sep 2016 22:29

How to use Salesforce Source using Two-factor authentication token

Post by 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.

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

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

Post by 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/sales ... nType.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?

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

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

Post by 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.

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

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

Post by 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?

Post Reply