Excel Add-in for Salesforce supports two kinds of authentication: UserNamePassword and AccessRefreshToken.
Username and password authentication
To connect with username and password authentication you need to specify the following required parameters:
OAuth 2.0 authenticationTo connect with OAuth 2.0 authentication, perform the following steps:
|
| 1. | In Authentication type, select AccessRefreshToken. |
| 2. | Click Sign In. |
| 3. | Log in to Salesforce with your username and password. |
After this, the Refresh Token parameter will be filled in automatically, and you'll be able to connect.
OAuth 2.0 authentication has the following benefit: you enter your account email and password directly to Salesforce webpage, and they are not used or stored in Excel. You also don't need to get and specify Salesforce security token.
In addition to the parameters above, Advanced connection parameters may be set for more fine connection tuning. You can also fill Client Id, Client Secret, and Refresh Token parameters manually in the Advanced Connection Editor dialog box.
For more information on how to configure your own app for authentication and obtain the Client ID and Client Secret (Consumer Key and Consumer Secret), see Get Credentials for OAuth Authentication.
Server-to-server authentication uses the OAuth 2.0 client credentials flow and enables applications to access Salesforce data without interactive user sign-in. Instead of signing in through a browser, the application authenticates using a consumer key and consumer secret.
To connect with server-to-server authentication:
| 1. | In Authentication, select ClientCredentials. |
| 2. | In Host, select the Salesforce login URL. |
| 3. | Enter your Client ID (Consumer Key) and Client Secret (Consumer Secret). |
| 4. | Optional: To specify how connection data is saved and reused in Excel, configure the connection saving options. For more information, see Connecting and Importing Data. |
| 5. | Optional: To configure advanced connection options, click Advanced. |
| 6. | Optional: To verify that the connection details are valid, click Test Connection. |
| 7. | Click Next. |

For information about how to create an external client app and get the Client ID (Consumer Key) and Client Secret (Consumer Secret), see Get Credentials for Server-to-Server Authentication.
The following table describes the options that you can include in the Connection String using the Advanced Connection Editor dialog box:
|