Devart Excel Add-in for Salesforce supports four authentication methods: UserNamePassword, AccessRefreshToken, AccessRefreshTokenInteractive, and ClientCredentials.
To connect to Salesforce using username and password authentication, specify the following parameters:
1. Host - The Salesforce login URL: login.salesforce.com, login.database.com, or test.salesforce.com (for sandbox environments).
2. User Id - The Salesforce login account.
3. Password - The password for the Salesforce account.
4. Security token - An automatically generated token used to authenticate connections from untrusted networks. For instructions on obtaining or resetting the token, see the Salesforce documentation.
To connect to Salesforce using OAuth 2.0 authentication:
1. In the Authentication field, select AccessRefreshTokenInteractive (the default) or AccessRefreshToken.
2. Click Sign In.
3. Sign in to Salesforce with your username and password.
After successful authentication, the Refresh Token field is populated automatically, allowing you to connect to Salesforce.
With OAuth 2.0 authentication, you enter your credentials directly on the Salesforce sign-in page, so they are not stored in Excel. You also do not need to obtain or specify a Salesforce security token.
To configure additional connection parameters, click Advanced. You can also manually specify the Client Id, Client Secret, and Refresh Token parameters in the dialog box that opens.
For instructions on configuring an application and obtaining the Client ID (Consumer Key) and Client Secret (Consumer Secret), see Get credentials for OAuth authentication.
Server-to-server authentication uses the OAuth 2.0 client credentials flow to access Salesforce data without interactive user sign-in. Instead of signing in through a browser, the application authenticates using a Client ID (Consumer Key) and Client Secret (Consumer Secret).
To connect to Salesforce using server-to-server authentication:
1. In the Authentication field, select ClientCredentials.
2. In the Host field, select the Salesforce login URL.
3. Enter the Client ID (Consumer Key) and Client Secret (Consumer Secret).
4. Optionally, configure the connection saving options to control how connection information is stored and reused in Excel. For details, see Connecting and importing data.
5. Optionally, click Advanced to configure additional connection parameters.
6. Optionally, click Test Connection to verify the connection settings.
7. Click Next.

For instructions on creating an external client application and obtaining the Client ID (Consumer Key) and Client Secret (Consumer Secret), see Get credentials for server-to-server authentication.
If you need to sign in again, for example, because the refresh token is missing or has expired, Devart Excel Add-in for Salesforce automatically opens the sign-in window when testing the connection, such as when you click Test Connection. Sign in to continue. If you cancel, the connection is not established.
The following table describes the connection parameters available when you click Advanced in the Connection Editor dialog box.
| Option | Description |
|---|---|
| Authentication Type | Specifies the authentication method used to connect to Salesforce. |
| Batch Size | Specifies the number of records retrieved per batch. The default is 500, the minimum is 200, and the maximum is 2,000. |
| Client ID | Specifies the Consumer Key of the connected app used for OAuth authentication. |
| Client Secret | Specifies the Consumer Secret of the connected app used for OAuth authentication. |
| Connection Lifetime | Specifies the maximum connection lifetime, in seconds, measured from its creation time. When a connection is returned to the pool, it is destroyed if its lifetime exceeds this value. The default is 0, which disables the lifetime limit. |
| Connect Timeout -or- Connection Timeout | Specifies how long, in seconds, to wait for a connection before terminating the attempt and returning an error. The default is 60 seconds. |
| Default Command Timeout | Specifies how long, in seconds, to wait for a command to execute before terminating the attempt and returning an error. |
| Failover Retries | Specifies the number of times to retry a command that fails due to a potentially temporary error. |
| Host | Specifies the Salesforce login URL: login.salesforce.com, login.database.com, or test.salesforce.com. |
| Ignore Blank Values | Determines whether blank field values are ignored rather than treated as explicit null values during insert or update operations. |
| Include Deleted | Determines whether query results include deleted records from the Salesforce Recycle Bin. |
| Initialization Command | Specifies a database-specific command to execute after establishing a connection. |
| Local SQL Engine | Determines whether complex SELECT queries that cannot be translated into Salesforce API calls are executed using the local SQL engine or result in an error. |
| Max Pool Size | Specifies the maximum number of connections in the pool. The default is 100. Changing this value may affect performance. |
| Min Pool Size | Specifies the minimum number of connections in the pool. The default is 0. |
| NormalizeDbNames | Determines whether database object names are normalized when retrieved from the data source. |
| Organization Id | Specifies the unique identifier of the Salesforce organization associated with the account. |
| Password | Specifies the password for the Salesforce account. |
| Persist Security Info | Determines whether sensitive information, such as passwords, is returned as part of the connection information after the connection has been opened. |
| Pooling | Determines whether connection pooling is enabled. When enabled, connections are retrieved from the pool or created and added to it as needed. The default is true. |
| Preserve Names | Determines whether the original Salesforce object and field names are preserved. |
| Proxy Host | Specifies the host name or IP address of the proxy server. |
| Proxy Password | Specifies the password for the proxy server account. |
| Proxy Port | Specifies the proxy server port. The default is 3128. |
| Proxy User | Specifies the proxy server account name. |
| Readonly | Determines whether the connection is read-only, allowing only SELECT statements. |
| Refresh Token | Specifies the Salesforce OAuth 2.0 refresh token used for refresh token authentication. |
| Run Once Command | Specifies a database-specific command to execute when establishing a new connection. Unlike Initialization Command, it is not executed for connections retrieved from the pool. |
| Security Token | Specifies the automatically generated Salesforce security token used for authentication from untrusted networks. |
| Session Id | Specifies the Salesforce session ID used for session ID authentication. |
| Token Server | Specifies the path to a file used to store the refresh token between sessions. This option applies to UserNamePassword and AccessRefreshToken authentication. The path is set automatically during web sign-in and usually does not need to be changed. |
| Trigger Auto Response Email | Determines whether Salesforce auto-response rules are triggered. The default is false. |
| Trigger Other Email | Determines whether emails to recipients outside the organization are triggered. The default is false. |
| Trigger User Email | Determines whether emails to users within the organization are triggered. The default is false. |
| Update Mru | Determines whether the list of most recently used items is updated. |
| Use Assignment Rules | Determines whether assignment rules are applied when inserting or updating records. The default is false. |
| User Id | Specifies the Salesforce login account. |
| UTC Dates | When set to True, converts dates to UTC during import. Date values entered in Excel are then treated as UTC when saved back to Salesforce. |