---
sourceDocument: Yokohama Data and Automation
sourceDocumentLink: https://www.servicenow.com/docs/r/yokohama/integrate-applications

 Release :

    - yokohama

ft:locale :

    - en-US

ft:publication_title :

    - Yokohama Data and Automation

ft:clusterId :

    - crint

bundleId :

    - crint

workflow :

    - Creator


---

# Set up the Salesforce spoke

# Set up the Salesforce spoke {#ariaid-title1}

* Release version: Yokohama
* 
* Updated January 30, 2025
* 
* ![](https://www.servicenow.com/docs/portal-asset/ico-clock) 10 minutes to read

Integrate your Salesforce account with your ServiceNow instance. Create a custom OAuth
application in Salesforce and authenticate requests from ServiceNow.

## Before you begin

* Request an Integration Hub subscription
* Activate the Salesforce spoke
* Role required: admin.

{#setup-sf-spk__ul_m44_zrb_xrb}  
Note:  
Two spoke setup procedures are outlined here. Perform one of the procedures as per your requirement.

* To setup the spoke using OAuth authorization template, see [Option 1: Set up the Salesforce spoke using OAuth authorization template](https://www.servicenow.com/docs/ujviJFsxXoySf1ZO0QHJDw#setup-sfspk-template "Integrate your Salesforce account with your ServiceNow instance. Create a custom OAuth application in Salesforce and authenticate requests from ServiceNow using OAuth authorization template.").
* To setup the spoke using JWT signing key, see [Option 2: Set up the Salesforce spoke using JWT signing key](https://www.servicenow.com/docs/ujviJFsxXoySf1ZO0QHJDw#setup-salesforce "Integrate your Salesforce account with your ServiceNow instance. Create a custom OAuth application in Salesforce and authenticate requests from ServiceNow using JWT signing key.").
{#setup-sf-spk__ul_m4r_ctb_xrb}  
Note:  
Don't delete the default connection alias record. This can result in an unexpected behavior. Configure your connection using the default connection alias.

## Configure a connection for Salesforce spoke {#ariaid-title2}

Add and configure a Salesforce connection to authenticate ServiceNow requests in Salesforce spoke.

### Before you begin

Role required: admin

### Procedure

1. Navigate to Process AutomationWorkflow Studio.
2. Select Integrations.
3. Select the Connections tab.
4. Use the search box to find the Salesforce connection alias.
5. Select View Details.
6. Configure the Salesforce connection.
   1. Add or edit a connection.  
      * To set up an existing connection, select Configure or Edit.
      * To create and configure a new connection, select Add Connection.

      {#config-connection-salesforce-spoke__ul_salesforce_add_edit}  
      Note:  
      To support multiple connections through a spoke, see [Supporting multiple connections](https://www.servicenow.com/docs/fAJVl9r9LtqrYB7DezkqHA "Support several connections to a single integration provider. Select connections for flows, subflows, and actions directly from a flow.").
   2. On the configuration form, fill in the fields.  
      {#config-connection-salesforce-spoke__table_salesforce_conn_config__entry__2}

      | Field | Description |
      |-|-|
      | Connection Name | Name to uniquely identify the connection. For example, <kbd class="ph userinput">Salesforce</kbd>. |
      | Connection URL (Instance URL) | URL to make a connection to Salesforce. Use this format: <kbd class="ph userinput">https://&lt;organization_name&gt;.my.salesforce.com</kbd>. |
      | Grant Type | OAuth grant type for authentication. Select one of the following options: * Authorization Code * Client Credentials {#config-connection-salesforce-spoke__ul_grant_type_options} |
      | OAuth Client ID | Client ID generated in Salesforce for OAuth authentication. |
      | OAuth Client Secret | Client Secret generated in Salesforce for OAuth authentication. |
      | OAuth Redirect URL | URL where Salesforce redirects after successful authentication. Use this format: <kbd class="ph userinput">https://&lt;instance_name&gt;.service-now.com/oauth_redirect.do</kbd>. |
      [ ]

      {#config-connection-salesforce-spoke__table_salesforce_conn_config}
   3. Select Save and Get OAuth Token.
   {#config-connection-salesforce-spoke__substeps_salesforce_conn}
{#config-connection-salesforce-spoke__steps_salesforce_config}

### Result

The Salesforce spoke connection is configured and ready to be used.

## Create a connected app in Salesforce {#ariaid-title3}

Create a connected app in your Salesforce account to enable OAuth 2.0 authentication with the Salesforce spoke.

### Before you begin

* Salesforce account
* Role required: Salesforce admin
{#create-connected-app-sf__ul_wwy_j1v_g3b}

### About this task

Complete these steps from your Salesforce account. See [Create a Connected App](https://help.salesforce.com/articleView?id=connected_app_create.htm&type=5) in [Salesforce Trailblazer forum](https://success.salesforce.com/) documentation for instructions on creating and configuring connected apps.

### Procedure

1. From your Salesforce account, create a connected app.
2. Configure the connected app to enable your Salesforce application to share data with your ServiceNow instance.
   1. Select Enable OAuth Settings and configure the authentication settings.
   2. If you want to set up the spoke using JWT signing key, select Use Digital Signatures and upload a Java KeyStore (JKS) certificate.
   3. Select the OAuth scopes:  
      {#create-connected-app-sf__table_bpb_n2q_yhc__entry__2}

      | Grant Type | OAuth scopes |
      |-|-|
      | Authorization Code | * Access and manage your data (api) * Perform requests on your behalf at any time (refresh_token, offline_access) {#create-connected-app-sf__ul_mbh_2dv_g3b} |
      | Client Credentials | Access and manage your data (api) |
      [ ]

      {#create-connected-app-sf__table_bpb_n2q_yhc}
   4. Specify ServiceNow instance URL in Callback URL in this format: <kbd class="ph userinput">https://&lt;instance-name&gt;.service-now.com/oauth_redirect.do</kbd>
   5. After creating the connected app, under OAuth Policies on the Edit Policies page, set these values:  
      {#create-connected-app-sf__table_y4h_w45_fnb__entry__2}

      | Field | Value |
      |-|-|
      | Permitted Users | Admin approved users are pre-authorized |
      | IP Restrictions | Relax IP Restrictions |
      [ ]

      {#create-connected-app-sf__table_y4h_w45_fnb}
   6. Configure user provisioning for the connected app as per your requirement.
   {#create-connected-app-sf__substeps_npt_fcv_g3b}
3. Record the values of Consumer Key and Consumer Secret.  
   Note:  
   * Assign profile and permission set as per your requirement.
   * In OAuth app IP restrictions, specify OAuth policies to ensure that the connected app works like a default app.
   {#create-connected-app-sf__ul_jc2_svb_xrb}
{#create-connected-app-sf__steps_zp5_l45_fnb}

### Result

The connected app is created in Salesforce.

## Option 1: Set up the Salesforce spoke using OAuth authorization template {#ariaid-title4}

Integrate your Salesforce account with your ServiceNow instance. Create a custom OAuth
application in Salesforce and authenticate requests from ServiceNow using OAuth authorization
template.

### Before you begin

* [Create a connected app in Salesforce](https://www.servicenow.com/docs/ujviJFsxXoySf1ZO0QHJDw#create-connected-app-sf "Create a connected app in your Salesforce account to enable OAuth 2.0 authentication with the Salesforce spoke.")
* Role required: admin
{#setup-sfspk-template__ul_nmb_3tb_xrb}

### Procedure

1. Navigate to Connection \& CredentialsConnection \& Credential Aliases.
2. Open the record, Salesforce.
3. Click the Create New Connection \& Credential related link.
4. On the form, fill these values.  
   {#setup-sfspk-template__table_tsx_ytb_xrb__entry__2}

   | Field | Description |
   |-|-|
   | Connection name | Name to identify the connection record. |
   | Connection URL (Instance URL) | Base URL to connect to your Salesforce instance in this format: <kbd class="ph userinput">https://&lt;instance-name&gt;.salesforce.com</kbd> |
   | OAuth Client ID | Consumer key that you generated during the Salesforce connected app configuration. |
   | OAuth Client Secret | Consumer secret that you generated during the Salesforce connected app configuration. |
   | OAuth Redirect URL | URL of the OAuth provider that users are redirected to after authentication. This field populates automatically. |
   [Table 1. Create Connection and Credential form]

   {#setup-sfspk-template__table_tsx_ytb_xrb}
5. Click Create and Get OAuth Token.  
   The OAuth2 authentication dialog box is displayed.
6. Log in to the Salesforce admin account that you used to create your Salesforce application.  
   Your ServiceNow instance creates an OAuth token for Salesforce and then automatically returns you to the Integration Profile form.
7. Click Publish.

## Option 2: Set up
the
Salesforce spoke using JWT signing key {#ariaid-title5}

Integrate your Salesforce account with your ServiceNow instance. Create a custom OAuth
application in Salesforce and authenticate requests from ServiceNow using JWT signing
key.

### Before you begin

* [Create a connected app in Salesforce](https://www.servicenow.com/docs/ujviJFsxXoySf1ZO0QHJDw#create-connected-app-sf "Create a connected app in your Salesforce account to enable OAuth 2.0 authentication with the Salesforce spoke.")
* Role required: admin
{#setup-salesforce__ul_lb1_zv5_g3b}

### Attach a Java Key Store certificate to the Salesforce spoke {#ariaid-title6}

Enable the
JSON Web Token
(JWT)
Bearer Grant token authentication by attaching a valid Java KeyStore (JKS) certificate to
the Salesforce spoke.

#### Before you begin

* Valid Java KeyStore certificate
* Role required: admin
{#attach-jks-salesforce__ul_llq_clv_g3b}

#### Procedure

1. Navigate to AllSystem DefinitionCertificates.
2. Click New.
3. On the form, fill in the fields.  
   {#attach-jks-salesforce__table_hvh_4tt_xgb__entry__2}

   | Field | Description |
   |-|-|
   | Name | Name to uniquely identify the record. For example, <kbd class="ph userinput">Salesforce Certificate</kbd>. |
   | Expiration notification | Option to send a notification when the certificate is about to expire. |
   | Notify on expiration | Users that are notified when the certificate expires. |
   | Warn in days to expire | Number of days to send a notification before the certificate expires. |
   | Active | Option to actively use the certificate. |
   | Format | Certificate format. The instance supports the PEM and DER formats. |
   | Type | Type of certificate. Select Java Key Store. |
   | Valid from | Date from which the certificate is valid. |
   | Expires | Date on which the certificate expires. |
   | Expires in days | Number of days until the certificate expires. |
   | Key store password | Password associated with the certificate. |
   | Short description | Summary about the certificate. |
   | PEM Certificate | Contents of the X509 certificate. |
   [Table 2. X.509 Certificate form]

   {#attach-jks-salesforce__table_hvh_4tt_xgb}
4. Click the attachments icon (![Attachments icon]()) and attach a JKS certificate.
5. Click Validate Stores/Certificates.

#### Result

The JKS certificate is created and attached to the Salesforce spoke.

### Create a JWT signing key for the Salesforce spoke {#ariaid-title7}

Create a JSON Web Token (JWT) signing key to assign to your Java KeyStore
certificate.

#### Before you begin

Role required: admin

#### Procedure

1. Navigate to AllSystem OAuthJWT Keys.
2. Click New.
3. On the form, fill in the fields.  
   {#create-jwtkey-salesforce__table_jky_dk5_xgb__entry__2}

   | Field | Description |
   |-|-|
   | Name | Name to uniquely identify the JWT signing key. For example, <kbd class="ph userinput">Salesforce JWT Keys</kbd>. |
   | Signing Keystore | Valid JKS certificate attached in the previous task. For example, <kbd class="ph userinput">Salesforce Certificate</kbd>. |
   | Key Id | Key ID to identify which key is used when multiple keys are used to sign tokens. |
   | Application | Application scope that contains this record. Select Salesforce spoke. |
   | Signing Algorithm | Algorithm to sign with the JWT key. |
   | Signing Key Password | Password associated with the signing key. |
   | Active | Option to actively use the certificate. |
   [Table 3. JWT Keys form]

   {#create-jwtkey-salesforce__table_jky_dk5_xgb}
4. Click Submit.

#### Result

The JWT key is created and assigned to the JKS certificate.

### Create a JWT provider for the Salesforce spoke {#ariaid-title8}

Add a JSON Web Token (JWT) provider to your ServiceNow
instance.

#### Before you begin

Role required: admin

#### Procedure

1. Navigate to AllSystem OAuthJWT Providers.
2. Click New.
3. On the form, fill in the fields.  
   {#create-jwtprovdr-salesforce__table_jpx_g4v_g3b__entry__2}

   | Field | Description |
   |-|-|
   | Name | Name to uniquely identify the JWT provider. For example, <kbd class="ph userinput">Salesforce JWT Provider</kbd>. |
   | Expiry Interval (sec) | Number, in seconds, to set the lifespan of JWT provider tokens. |
   | Signing Configuration | JWT signing key from the previous step. For example, <kbd class="ph userinput">Salesforce JWT Keys</kbd>. |
   [Table 4. JWT Provider form]

   {#create-jwtprovdr-salesforce__table_jpx_g4v_g3b}
4. Right-click the form header, and click Save.  
   The Standard Claims and Custom Claims related lists are displayed.
5. In the Standard Claims related list, enter values for iss, sub, and aud.  
   See [OAuth 2.0 JWT Bearer Flow for Server-to-Server Integration](https://help.salesforce.com/articleView?id=remoteaccess_oauth_jwt_flow.htm&type=5) in [Salesforce Trailblazer forum](https://success.salesforce.com/) documentation for instructions.
6. Click Update.

#### Result

The JWT provider is added to your ServiceNow instance.

### Register Salesforce as an OAuth Provider {#ariaid-title9}

Use the information generated during Salesforce connected app configuration to register Salesforce as an OAuth provider and enable
the instance to request OAuth 2.0 tokens.

#### Before you begin

Role required: admin

#### Procedure

1. Navigate to AllSystem OAuthApplication Registry.
2. Click New.  
   The system displays the message What kind of OAuth application?
3. Select Connect to a third party OAuth Provider.  
   The system displays a blank Application Registries form.
4. On the form, fill in the fields.  
   {#reg-salesforce-oauth__table_alw_kq3_gfb__entry__2}

   | Field | Value required |
   |-|-|
   | Name | Name to uniquely identify the record. For example, enter <kbd class="ph userinput">Salesforce OAuth</kbd>. |
   | Client ID | Consumer key that you generated during the Salesforce connected app configuration. |
   | Client Secret | Consumer secret that you generated during the Salesforce connected app configuration. |
   | OAuth API Script | Optional script to customize the request and response. |
   | Default Grant type | Grant type used to establish the token. Select JWT Bearer. |
   | Refresh Token Lifespan | Time, in seconds, that the refresh token is valid. The default time is 8,640,0000 seconds. |
   | PKCE required | Option to enable public clients to require PKCE for an authorization. Note: You can use only Authorization Code as the Default Grant type when PKCE is enabled. |
   | Application | Application scope that contains this record. Select Salesforce. |
   | Accessible from | Application scope that this registry is accessible from. |
   | Active | Option to actively use the application registry. |
   | Authorization URL | This field should be left blank. |
   | Token URL | OAuth server token endpoint. * For production instance, enter <kbd class="ph userinput">https://login.salesforce.com/services/oauth2/token</kbd>. * For sandbox instance, enter <kbd class="ph userinput">https://test.salesforce.com/services/oauth2/token</kbd> {#reg-salesforce-oauth__ul_exw_qr5_fnb} |
   | Token Revocation URL | This field should be left blank. |
   | Redirect URL | This field should be left blank. |
   [ ]

   {#reg-salesforce-oauth__table_alw_kq3_gfb}
5. Right-click the form header, and click Save.  
   * The system validates the OAuth credentials and populates the Redirect URL field.
   * The system populates OAuth Entity Profile with Grant Type as JWT Bearer. For example, OAuth Entity Profile is created with default Name, Salesforce JWT provider default_profile .
   {#reg-salesforce-oauth__ul_gks_4f4_xgb}
6. Copy the value from the Redirect URL field.
7. Click Update.
8. Log in to your Salesforce account to edit the configuration of your connected app.  
   See the [Salesforce Trailblazer forum](https://success.salesforce.com/) documentation for instructions.
9. Paste the Redirect URL value into the Callback URL of your Salesforce connected app.  
   For example, paste <kbd class="ph userinput">https://&lt;instance-name&gt;.service-now.com/oauth_redirect.do</kbd>.

#### Result

The instance can request OAuth 2.0 tokens for the Salesforce spoke.  
Note:  
When an OAuth token expires, the spoke automatically regenerates a new token in most cases. If a token expires and is not regenerated, a user with the admin role can regenerate the spoke OAuth token.

### Create
credential
records for the Salesforce spoke {#ariaid-title10}

Create Credential records
for
the Salesforce connected app
that
you created. The Salesforce spoke connection and credential alias
use these
credentials to authorize actions.

#### Before you begin

Role required: admin

#### Procedure

1. Navigate to AllConnections \& CredentialsCredentials.
2. Click New.  
   The system displays the message What type of Credentials would you like to create? .
3. Select OAuth 2.0 Credentials.  
   The pop-up window displays a blank OAuth 2.0 Credentials form.
4. On the form, fill in the fields.  
   {#create-credrec-salesforce__table_sxv_zgp_gfb__entry__2}

   | Field | Value required |
   |-|-|
   | Name | Name to uniquely identify the record. For example, enter <kbd class="ph userinput">Salesforce Credentials</kbd>. |
   | Active | Option to actively use the credential record. |
   | OAuth Entity Profile | OAuth profile that you created when you registered the Salesforce connected app as an OAuth provider. For example, select Salesforce OAuth default_profile. |
   | Applies to | MID Servers that can use this credential. For example, select All MID Servers. |
   | Order | Order to apply this credential. For example, enter <kbd class="ph userinput">100</kbd>. |
   [ ]

   {#create-credrec-salesforce__table_sxv_zgp_gfb}
5. Save the record.
6. Click the Get OAuth Token related link to generate the OAuth token.

#### Result

The credential record for the Salesforce spoke is created.

### Create connection records for the Salesforce spoke {#ariaid-title11}

Create connection records
for your Salesforce account. The Salesforce spoke connection and credential alias use these connections to perform actions in Salesforce.

#### Before you begin

Role required: admin

#### Procedure

1. Navigate to AllConnections \& CredentialsConnection \& Credential Aliases.
2. Open for the record for Salesforce.
3. On the Connections tab, click New.  
   The system displays a blank HTTP(s) Connection form.
4. Enter these values.  
   {#create-connrec-salesforce__table_any_shp_gfb__entry__2}

   | Field | Value required |
   |-|-|
   | Name | Name to uniquely identify the connection record. For example, enter <kbd class="ph userinput">Salesforce Connection</kbd>. |
   | Credential | Credential record you that created for Salesforce. For example, select Salesforce Credentials. |
   | Connection alias | Alias record associated with this connection. |
   | URL builder | Note: Do not select the check box. |
   | Connection URL | Base URL to connect to your Salesforce instance. For example, <kbd class="ph userinput">https://&lt;instance-name&gt;.salesforce.com</kbd>. |
   | Use MID server | Option to use a MID Server. If you select this check box, define the fields in the Advanced MID Server Configuration related list. |
   | Active | Option to actively use the connection. |
   | Domain | Domain that the action or activity runs in. |
   [ ]

   {#create-connrec-salesforce__table_any_shp_gfb}
5. Right-click the form header and click Save.
6. Ensure that api_version is set <kbd class="ph userinput">v48.0</kbd> in the Attributes related list.

#### Result

The Salesforce spoke is set up and integrated with the ServiceNow instance.

*[\>]: and then


