Logo

Differenz Force

We make a difference
  • Home   »  
  • Blog   »  
  • How to Create a Connected App in Salesforce

How to Create a Connected App in Salesforce

Knowing how to create a connected app in Salesforce is essential for enabling secure communication between Salesforce

How to Create a Connected App in Salesforce
Table of Contents

Get in Touch with Our Salesforce Experts

Contact Us Today

Whether you're looking to optimize your Salesforce solution or need custom development, our team is here to help you unlock the full potential of Salesforce.

Want to integrate external applications with Salesforce? Learning how to create a connected app in Salesforce is essential for enabling secure communication between Salesforce and third-party systems, such as mobile apps, web applications, or REST APIs. This guide explains how to create a new connected app in Salesforce, including steps for Salesforce Lightning and REST API integration, in a simple, beginner-friendly way. Whether you are a developer or a business user, these step-by-step instructions will help you set up a connected app quickly.

What is a Connected App in Salesforce?

A connected app in Salesforce is a framework that enables external applications to securely access Salesforce data and perform actions using APIs such as REST or SOAP. Connected apps use OAuth or SAML for authentication, ensuring secure and controlled access. For example, a mobile app might use a connected app to retrieve customer data from Salesforce, or a web app might integrate with Salesforce for real-time analytics.

According to Salesforce’s 2024 developer survey, more than 60% of Salesforce implementations involve connected apps for integrations, highlighting their importance in modern business workflows.

Understanding how to create a connected app in Salesforce is essential for enabling these integrations.

Why Create a Connected App in Salesforce?

Creating a connected app enables seamless integration between Salesforce and external systems. Here is why businesses need to know how to create a new connected app in Salesforce:

  • Secure Data Access: Connected apps use OAuth to authenticate users, ensuring that only authorized systems can access Salesforce data.
  • API Integration: Enable the creation of a connected app in Salesforce for REST API access, allowing external applications to interact with Salesforce data programmatically.
  • Custom Workflows: Integrate third-party tools such as Slack, Zapier, or custom applications to streamline business processes.
  • Scalability: Connected apps support businesses of all sizes, from startups to enterprises.
  • Enhanced User Experience: Allow users to access Salesforce data from external applications without repeated logins.

How to Create a Connected App in Salesforce: Step-by-Step Guide

Let us walk through how to create a connected app in Salesforce Lightning. These steps also apply to creating a connected app for REST API or other integrations.

Follow this guide to set up a new connected app:

Step 1: Log in to Salesforce

Sign in to your Salesforce org with administrator credentials. Ensure you have the necessary permissions to manage connected apps.

Step 2: Navigate to Setup

In Salesforce Lightning, click the gear icon in the top right corner and select Setup. In Classic, click Setup in the top menu.

Step 3: Access Connected Apps

In the Setup menu, type “App Manager” in the Quick Find search box and select App Manager. Here, you will create your connected app.

Step 4: Create a New Connected App

Click New Connected App to begin configuring your app. Here is how to set it up:

Basic Information:

Connected App Name: Enter a unique name (e.g., “MyApp_Integration”).

  • API Name: Automatically generated based on the app name.
  • Contact Email: Enter an admin email for notifications.
  • API (Enable OAuth Settings): Select Enable OAuth Settings to allow API access.
  • Callback URL: Enter the URL where Salesforce redirects after authentication (e.g., “https://yourapp.com/callback”).
  • Selected OAuth Scopes: Choose permissions like “Access and manage your data (api)” or “Perform requests on your behalf (refresh_token, offline_access)” for REST API access.

Other Settings:

Require Secret for Web Server Flow: Enable for added security.

  • Enable SAML: Optional for single sign-on (SSO) setups.

Step 5: Save and Configure

Click Save. It may take a few minutes for the app to be created. Once saved, you will see the Consumer Key and Consumer Secret, which are needed for API integrations.

Step 6: Manage App Permissions

Go to Manage Connected Apps in Setup, select your app, and click Edit Policies. Set OAuth policies, such as “Admin-approved users are preauthorized,” to control access.

Step 7: Test the Connected App

Test the app by initiating an OAuth flow or making a REST API call using the Consumer Key and Secret. For example, use Postman to test creating a connected app in Salesforce for the REST API by sending a request to Salesforce’s API endpoint.

Step 8: Deploy and Monitor

Share the Consumer Key and Secret with your external application securely. Monitor the application’s usage in Salesforce to ensure it is functioning as expected.

Need Help? Contact Our Experts

How to Create a Connected App in Salesforce for REST API

Creating a connected app for REST API integration follows the same steps as above but requires specific OAuth settings. Here is what to focus on:

  • Enable OAuth: Select scopes like “api,” “refresh_token,” and “offline_access” to allow API access.
  • Callback URL: Ensure the external app’s callback URL is correctly configured.
  • Security Tokens: Use the Consumer Key and Secret for authentication in API calls.

For example, a developer building a mobile app can use the connected app to retrieve customer data from Salesforce through the REST API, enabling real-time updates on the go.

Create a Connected App in Salesforce Lightning

The process for creating a connected app in Salesforce Lightning is the same as the steps above, since Salesforce Lightning uses the same App Manager interface. However, Lightning provides a more intuitive user interface and additional features.

  • Enhanced Navigation: The Lightning interface simplifies finding and configuring connected apps.
  • Lightning Components: Integrate connected apps with Lightning components for custom user interfaces in Salesforce.
  • Real-Time Monitoring: Use Lightning dashboards to track app performance.

For example, a business using Salesforce Lightning can create a connected app to integrate with a custom web portal, enhancing the user experience with a modern interface.

Benefits of Creating Connected Apps in Salesforce

Knowing how to create a new connected app in Salesforce offers several advantages:

  • Seamless Integrations: Connect Salesforce with tools such as Slack, Google Workspace, or custom applications.
  • Improved Efficiency: Automate data sharing between systems to reduce manual work.
  • Enhanced Security: OAuth ensures that only authorized applications can access Salesforce data.
  • Scalability: Supports integrations for both small businesses and large enterprises.
  • Better User Experience: Users can access Salesforce data from external applications without multiple logins.

A 2023 Salesforce report found that businesses using connected apps experienced a 30% increase in workflow efficiency from streamlined integrations.

Best Practices for Creating Connected Apps

To succeed in learning how to create a connected app in Salesforce, follow these tips:

  • Use Descriptive Names: Choose clear app names to prevent confusion (e.g., “CustomerPortal_Integration”).
  • Secure Credentials: Store the Consumer Key and Secret securely, and avoid public exposure.
  • Limit OAuth Scopes: Assign only the necessary permissions to reduce security risks.
  • Test Thoroughly: Validate the app with tools such as Postman before deployment.
  • Monitor Usage: Regularly review app performance and access logs in Salesforce.