O

OAuth 2.0

The authorization framework (RFC 6749) that lets an application act on a user’s behalf with a scoped access token instead of the user’s password.

What it is

OAuth 2.0 is an authorization framework, defined in RFC 6749, that lets an application obtain limited access to a service on a user’s behalf. The user signs in with the authorization server and approves the requested scopes; the application receives an access token for the resource server and never sees the user’s password. It defines several grant types for different kinds of client.

Why it matters

Almost every integration with Salesforce — a React app, a middleware platform, an AI agent — authenticates through OAuth. Choosing the right grant decides whether credentials can leak, whether access can be revoked per app, and whether a user or a service identity is accountable for what the integration does.

Key components

  • Roles: resource owner, client, authorization server, resource server
  • Authorization code grant (with PKCE) for user sign-in
  • Client credentials grant for server-to-server access
  • Refresh tokens for renewing access without re-prompting
  • Scopes limiting what a token may do

How it connects

On Salesforce the client is registered as a Connected App or External Client App, which sets the allowed flows, scopes and policies. PKCE is the extension that makes the authorization code grant safe for public clients.

Good to know

OAuth is authorization, not authentication — it says what an app may do, not who the user is. OpenID Connect adds identity on top. The implicit grant and the password grant are deprecated by current security guidance.

Need Help Implementing This?

We specialize in putting AI and Agentforce to work for Salesforce customers. Let's talk about your use case.

Book Intro Call