Skip to content
Logo
  • Industries
    • Aged Care and NDIS
    • Banking, Financial Services & Insurance
    • Energy
    • Public Sector
    • Non Profit
  • Services
    • Consulting
      • Transformation Advisory
      • Architecture & Security
      • Customer Experience
      • Product Engineering
    • Artificial Intelligence
      • Generative AI
      • Conversational AI
      • Machine Learning
    • Data
      • Data Engineering
      • BI and Data Analytics
      • Data Management
    • Salesforce
      • Capabilities
      • For Non-profits
      • Marketing Cloud
    • Digital Experiences
      • HubSpot
      • Jitterbit
      • Strapi
      • LeadSquared
      • WP Engine
      • Mobile & Web
      • Zepic
      • Web Development
      • Mobile Development
      • Product Engineering Services
    • Managed Services
      • Application Management
      • Integration Platforms
      • Infrastructure & Cloud
      • Cybersecurity & Compliance
    • Automation & Testing
      • RPA
      • Testing Services
    • Connected Devices
      • Engineering services
      • IoT Services
      • Automation Services
    • ERP
      • Odoo
    • Business Services
      • Market Research
      • Documentation
      • Mortgage
      • Creative
      • Legal
  • Solutions
    • Finnate
      • Investing
      • Lending
      • Digital Onboarding
    • Metiz
      • PIIManager
      • DocuParse
      • CustomerPulse
    • Accelerators
      • Accelor MissionXcel
      • Accelor Object Importer
      • Accelor Virtual Assistant
    • Metiz
      • At play
      • Under the hood
    • Connected Devices
      • Centelon IoT platform
      • Cento
    • DXP
      • Capabilites
      • Industries
  • Partners
  • Resources
    • Case Studies
    • White papers
    • Blogs
    • Podcasts
    • Brochures
    • Events
    • Newsletters
  • Company
    • About Us
    • Careers
Contact
Search
Close this search box.

Salesforce JWT Bearer Authentication – Part1

Manish Khade

Salesforce provides wide range of functionalities which help its customers to grow their business. Because of the Point and Click services, advanced functionalities given by Salesforce, various organizations have started switching to Salesforce CRM from their conventional technologies. But sometimes it becomes difficult to migrate existing system to Salesforce completely, for which we are required to connect different environments with Salesforce. This connection can include providing access to your organization or accessing another environment of different technology base or Salesforce org. In case of providing access to your org Salesforce provides OAuth Authorization Flows. These authorization flows provide access to protected Salesforce resources with the help of connected apps.

When dealing with clients around the globe one can’t assume that everybody is using same resources or same technology. Also, connection implementation can vary from customer to customer. Salesforce gives us flexibility in OAuth implementation to use connection methods as per the available resources.

You can decide which method to use for communicating with the third-party system based on customer requirement, environment, security considerations of data being transmitted and other factors such as token generation, number of logins required etc. We will discuss about OAuth and different OAuth flows provided by Salesforce in this blog.

Before moving ahead, lets understand what is OAuth:

OAuth is an open standard for access delegation, commonly used as a way for Internet users to grant websites or applications access to their information on other websites but without giving them the passwords.

Access tokens replace the conventional password authentication. Salesforce generates token through connected app and requesting client use this token in further communications. During this process resource server (in our case Salesforce org), client (requesting access) and resource owner (you being the admin of Salesforce org) involve and permission to access the resource is granted. Here Salesforce also acts as authorization server as well.

Basic flow of OAuth can be pictured as

MicrosoftTeams image 3

In traditional client-server communication model, to access server resource client must have server credentials which are provided by resource owners. Though this is widely used method for server authentication it has some limitations as well –

  • Clients must store server credentials somewhere in files to use them for communication
  • There might be some scenarios where servers might expose access to all resources
  • Since same credentials would be shared across all third parties, it can be difficult to revoke access of single third party unless you change credentials. But this can result in modification at all third parties.

OAuth helps to overcome these limitations.

Role of Connected App in OAuth Authorization Flows

Connected apps are essential when using OAuth authorization flows as connected app framework enables an external client application to integrate with Salesforce using APIs and standard protocols, such as SAML, OAuth, and OpenID Connect. Connected apps use these protocols to authenticate, authorize, and integrate external apps and service providers.

Different OAuth Authorization Flows in Salesforce

OAuth Authorization Flow Use case
OAuth 2.0 Web Server Flow for Web App Integration When you want to access salesforce data from external web app
OAuth 2.0 User-Agent Flow for Desktop or Mobile App Integration When you want to access salesforce data from external mobile or desktop app
OAuth 2.0 JWT Bearer Flow for Server-to-Server Integration When you want to authorize servers to access data without interactively logging in each time the servers exchange information
OAuth 2.0 Device Flow for IoT Integration When you want to use some apps that have limited input capabilities (Smart TVs, IoT devices)
OAuth 2.0 Refresh Token Flow for Renewed Sessions The OAuth 2.0 refresh token flow renews access tokens issued by the OAuth 2.0 web server flow or the OAuth 2.0 user-agent flow
OAuth 2.0 Username-Password Flow for Special Scenarios For special scenarios where other grant types are not available and communicating parties highly trusted
OAuth 2.0 SAML Bearer Assertion Flow for Previously Authorized Apps With the OAuth 2.0 SAML bearer assertion flow, a client—via a connected app—can use previous authorization by supplying a signed SAML 2.0 assertion to request an OAuth access token

Conclusion

Though Salesforce provides different flows for different use cases, some flows have environment specific concerns. Being developers, we should decide what best suits our requirement. It also depends on other system we are connecting with. You can use username & password-based authentication if you are connecting system from your organization’s ecosystem. If you want to allow access to Salesforce for an application that runs on a device with limited input capabilities, then you can go for Device flow. If your system does not provide UI (server to server communication), you want to avoid multiple logins and you want have connection with Salesforce then you can go for JWT flow. Similarly, there are other flows for different scenarios. We will discuss about JWT flow in my next blog.
Photo

Manish Raghunath Khade

Salesforce Consultant
Manish Khade
Envelope Linkedin
Envelope Linkedin
  • September 10, 2020
Written By Manish Khade
Products
  • Finnate
  • Metiz
  • Accelerators
Categories
  • AI/ML
  • Business
  • Business Services
  • Corporate
  • Fintech
  • Non Profit
  • Salesforce
  • Technology
  • Trending
Tags
Agile business model AI AI in business Artificial Intelligence Asset management Automation branding Business covid CRM Energy enterprise agile Finance Integrations Machine Learning marketing microsoft pandemic personal branding powerpoint Salesforce social events social media visual presentation Voice women in centelon womens forum work from home working from home
Recent Posts
  • Unlocking Agility in Aged Care in Australia: A 2025 Playbook for Transformation
  • Strategic Recommendations for Australian leaders to drive innovation and impact in 2025
  • The tech insights Australian leaders need for 2025
  • New Aspirations: Embracing AI – Our Journey through Generative AI, Conversational AI, and Machine Learning
  • Three Trends in Business IT for 2023
PrevPreviousThe Promise Of AI
NextPower of PowerPoint PresentationsNext

Let’s Create Big Stories Together

Expertise Deployments in Salesforce, ERP, CRM, Web & Mobile Developments, Artificial Intelligence, Data Management & Resource Augmentation.

Book a Consultation

Contact Us

Australia

Level 13, 200 Queen Street Melbourne VIC 3000
Australia

India

B Wing, Level 2, Ghule Square DSK Ranwara Road, Bavdhan,
Pune 411-021

Singapore

2 Shenton Way #15-04 SGX Centre 1, Singapore 068804

USA

196 N 3rd Street, Suite 319, San Jose,
CA 95112
ISO Certified 27001:2013
Great Place to Work - Certified™ Nov 2021-22
Centelon © 2025. All rights Reserved

Privacy Policy

Terms of Service

Thanks for showing an interest in our products.

Our team will get back to you at the earliest to book a requested demo call at your preferable time.

 

Back to Website