Loading
Salesforce now sends email only from verified domains. Read More
Identify Your Users and Manage Access
Table of Contents
Select Filters

          No results
          No results
          Here are some search tips

          Check the spelling of your keywords.
          Use more general search terms.
          Select fewer filters to broaden your search.

          Search all of Salesforce Help
          OAuth 2.0 Token Exchange Flow

          OAuth 2.0 Token Exchange Flow

          When Salesforce is just one component of an architecture that includes a central identity provider along with multiple apps and microservices, use the OAuth 2.0 token exchange flow to simplify your integration patterns. With this flow, exchange tokens from external identity providers for Salesforce tokens and grant access to Salesforce data.

          Required Editions

          Available in: Enterprise, Performance, Unlimited, and Developer Editions

          To learn more about how this flow works and how to set it up, see these resources.

          • Token Exchange Flow Use Cases
            To decide if the OAuth 2.0 token exchange flow is the right solution for your company, learn more about when to use it.
          • Token Exchange Flow Diagram and Process
            The OAuth 2.0 token exchange flow can simplify integrations for use cases with a central identity provider serving multiple apps and microservices. To understand how the flow works, review this step-by-step overview.
          • Integrate an App for the Token Exchange Flow
            To integrate an app with Salesforce for the OAuth 2.0 token exchange flow, create a Salesforce connected app or an external client app.
          • Create a Token Exchange Handler Apex Class
            A token exchange handler consists of an Apex class that extends the Oauth2TokenExchangeHandler abstract class and a token exchange handler definition. To get started, create an Apex class to reference in the handler definition.
          • Define a Token Exchange Handler
            To finish creating a token exchange handler, define the handler on the Token Exchange Handlers page in Setup, or use Metadata API to define a new OauthTokenExchangeHandler metadata type.
          • Enable Apps for a Token Exchange Handler
            To enable a connected app or external client app for a token exchange handler, use the Token Exchange Handlers page in Setup, or edit its metadata definition.
          • Set Up the Token Exchange Flow
            Some use cases require you to integrate Salesforce with an external identity provider along with multiple apps and microservices. To simplify these integrations, use the OAuth 2.0 token exchange flow. With this flow, exchange tokens from an external identity provider for Salesforce tokens.
          • Edit or Delete a Token Exchange Handler
            If necessary, edit a token exchange handler's settings or delete it entirely.
           
          Loading
          Salesforce Help | Article