Configuring Authentication
You can authenticate your connection to Salesforce Marketing Cloud by specifying an access token, or by providing your Salesforce Marketing Cloud credentials so that the connector retrieves and uses the corresponding access token.
For detailed configuration instructions, see the following sections:
- Configuring Authentication With an Access Token
- Configuring Authentication With Your Salesforce Marketing Cloud Credentials
Configuring Authentication With an Access Token
If you already have a valid access token, specify it in your DSN so that the connector can use it to authenticate the connection.
To configure authentication with an access token:
- To access authentication options, open the ODBC Data Source Administrator where you created the DSN, select the DSN, and then click Configure.
- From the Method drop-down list, select one of the following settings, depending on the type of package and integration that was used to set up your Salesforce Marketing Cloud application:
- In the Access Token field, type your access token.
- To save your settings and close the DSN Setup dialog box, click OK.
Salesforce Marketing Cloud Package Type | Integration Type | Method Value |
---|---|---|
Legacy |
N/A |
OAuth_2.0 |
Enhanced
|
Server-to-server |
Enhanced sts OAuth 2.0 |
Web/Public app |
Enhanced OAuth 2.0 |
For information about Salesforce Marketing Cloud package types, see "Installed Package Types" in the Marketing Cloud Package Development: https://developer.salesforce.com/docs/atlas.en-us.mc-app-development.meta/mc-app-development/installed-package-types.htm.
Configuring Authentication With Your Salesforce Marketing Cloud Credentials
You can configure the connector to retrieve and use an access token based on your Salesforce Marketing Cloud credentials.
The specific credentials that you need to provide varies depending on whether your Salesforce Marketing Cloud application was installed using a legacy package or an enhanced package, and depending on the type of integration that was used. For information about Salesforce Marketing Cloud package types, see "Installed Package Types" in the Marketing Cloud Package Development: https://developer.salesforce.com/docs/atlas.en-us.mc-app-development.meta/mc-app-development/installed-package-types.htm.
For detailed connector configuration instructions, see the section below that is appropriate for your Salesforce Marketing Cloud setup:
Salesforce Marketing Cloud Package Type | Integration Type | Connector Configuration Instructions |
---|---|---|
Legacy |
N/A |
Retrieving Access Tokens for Legacy Packages or Enhanced Packages with Server-to-Server Integrations |
Enhanced |
Server-to-server |
Retrieving Access Tokens for Legacy Packages or Enhanced Packages with Server-to-Server Integrations |
Web/Public app |
Retrieving Access Tokens for Enhanced Packages with Web App or Public App Integrations |
Retrieving Access Tokens for Legacy Packages or Enhanced Packages with Server-to-Server Integrations
You can configure the connector to retrieve and use an access token based on your credentials for a Salesforce Marketing Cloud application that was installed using either a legacy package or an enhanced package with server-to-server integration. To do this, specify the appropriate authentication method as well as the client ID and client secret associated with the Salesforce Marketing Cloud application.
To retrieve an access token for a legacy package or a enhanced package with server-to-server integration:
- To access authentication options, open the ODBC Data Source Administrator where you created the DSN, select the DSN, and then click Configure.
- From the Method drop-down list, select one of the following settings:
- If you are authenticating to a legacy package, select OAuth_2.0.
- Or, if you are authenticating to an enhanced package with server-to-server integration, select Enhanced sts OAuth 2.0.
- In the Client ID field, type the client ID associated with the Salesforce Marketing Cloud application.
- In the Client Secret field, type the client secret associated with the Salesforce Marketing Cloud application.
- Click Get Access Token.
- In the DSN Setup dialog box, confirm that the Access Token field is populated. Then, close the browser window.
- To save your settings and close the DSN Setup dialog box, click OK.
Retrieving Access Tokens for Enhanced Packages with Web App or Public App Integrations
You can configure the connector to retrieve and use an access token based on your credentials for a Salesforce Marketing Cloud application that was installed using an enhanced package with either web app or public app integration. To do this, start by configuring your Salesforce Marketing Cloud application to use the supported redirect URL, and updating the hosts
file on your Windows machine. Then, in your DSN, specify the credentials associated with your Salesforce Marketing Cloud application and provide SSL files for encrypting the token retrieval process.
For detailed instructions, see the following:
Specifying the Redirect URL in Your Application
If you are using the connector to retrieve an access token, you must configure your Salesforce Marketing Cloud application to use https://www.localhost.com:6367
as the redirect URL.
To specify the redirect URL in your application:
- In a web browser, navigate to the Salesforce Marketing Cloud dashboard.
- Sign in to your account, and access your application settings.
- Set the redirect URL of the application to
https://www.localhost.com:6367
. - Save your changes, and sign out from your account.
Note:
The connector must be configured to use the same redirect URL as your application. You can specify the redirect URL in the connector while specifying your Salesforce Marketing Cloud credentials for retrieving the access token, which is one of the last steps in this configuration process. For more information, see Retrieving the Access Token.
Updating the hosts File
You must also update the host name mappings in the hosts
file on your Windows machine.
To update the hosts file:
- In a text editor, open the
C:\Windows\System32\drivers\etc\hosts
file for editing. - On a new line, type the following:
- Save your changes, and close the file.
127.0.0.1 www.localhost.com
Retrieving the Access Token
After completing the configurations described above, you can configure the connector to retrieve and use the access token to authenticate your connection. In your DSN, specify the appropriate authentication method as well as the redirect URL, client ID, and client secret associated with the Salesforce Marketing Cloud application. You must also provide an SSL certificate and a private key for proving the identity of the client (in this case, the connector) to the Salesforce Marketing Cloud server.
Important:
Make sure that the default web browser on your machine is not set to Internet Explorer. The OAuth 2.0 authentication flow that the connector goes through to retrieve access tokens is not supported on Internet Explorer.
To retrieve the access token:
- To access authentication options, open the ODBC Data Source Administrator where you created the DSN, select the DSN, and then click Configure.
- From the Method drop-down list, select Enhanced OAuth 2.0.
- In the Client ID field, type the client ID associated with the Salesforce Marketing Cloud application.
- In the Client Secret field, type the client secret associated with the Salesforce Marketing Cloud application.
- In the Redirect URI field, type https://www.localhost.com:6367.
- Provide the required SSL files by doing the following:
- In the Local Server Certificate field, type the full path and name of a
.pem
file containing the SSL certificate used to prove the identity of the client (in this case, the connector) to the Salesforce Marketing Cloud server. - In the Local Server Key field, type the full path and name of a
.pem
file containing the private key used to encrypt the SSL certificate.
- In the Local Server Certificate field, type the full path and name of a
- Click Get Access Token.
- In the web browser that opens, in the displayed fields, type your Salesforce Marketing Cloud account user name and password. Then, click Sign In to allow the connector to access your Salesforce Marketing Cloud data store.
- Select the application you want to sign in to, and then click Connect.
- In the DSN setup dialog box, confirm that the Access Token field is populated. Then, close the browser window.
- To save your settings and close the DSN Setup dialog box, click OK.
Note:
If you specified a self-signed certificate during step 7, your browser displays a security warning after you click Connect. To complete the authentication process, you must add a security exception for the certificate to your browser. For detailed instructions, refer to the product documentation for your browser.