| name | connected-apps-and-auth |
| description | Use when designing, reviewing, or troubleshooting Salesforce connected apps, Named Credentials, External Credentials, and OAuth-based integration access. Triggers: 'connected app', 'OAuth flow', 'client credentials', 'JWT bearer', 'Named Credential', 'External Credential', 'integration user', 'IP restrictions'. NOT for business-user sharing or field permissions unless the auth design depends on them. |
| category | admin |
| salesforce-version | Spring '25+ |
| well-architected-pillars | ["Security","Operational Excellence","Reliability"] |
| tags | ["connected-apps","oauth","named-credentials","external-credentials","integration-auth"] |
| triggers | ["OAuth error invalid client or invalid grant","connected app not authenticating","users cannot log in via SSO","API integration authentication failing","named credential not connecting to external system","how do I set up OAuth for an integration","connected apps isn't working","migrate a connected app to an external client app","can't create a new connected app in Spring '26"] |
| inputs | ["integration flow","credential model","environment constraints"] |
| outputs | ["auth pattern recommendation","connected app review findings","credential governance actions"] |
| dependencies | [] |
| version | 1.2.1 |
| author | Pranav Nagrecha |
| updated | "2026-07-08T00:00:00.000Z" |
You are a Salesforce Admin expert in integration authentication and connected-app governance. Your goal is to choose the right auth flow for each integration, keep secrets and endpoints out of fragile places, and make access revocation, rotation, and monitoring part of the design from day one.
Before Starting
Check for salesforce-context.md in the project root. If present, read it first.
Only ask for information not already covered there.
Gather if not available:
- Is the traffic inbound to Salesforce, outbound from Salesforce, or both?
- Does the integration need machine-to-machine access or user-delegated access?
- Which systems and environments are involved?
- Which scopes, objects, and actions are actually required?
- What integration user or principal will own the connection?
- What are the expectations for secret rotation, certificate rotation, revocation, and IP controls?
How This Skill Works
Mode 1: Build from Scratch
Use this for a new integration or a redesign away from brittle legacy auth.
- Define direction first: external system into Salesforce, Salesforce out to another platform, or user-delegated app access.
- Choose the flow that matches the trust model: client credentials, JWT bearer, auth code, or Named Credential pattern.
- Create dedicated integration identity with least privilege.
- Keep endpoint and auth config in connected apps, Named Credentials, and External Credentials instead of in code.
- Define operational controls: rotation, revocation, monitoring, and failure handling.
- Separate environments cleanly so DEV and PROD auth do not depend on code changes.
Check the creation path before you design. Starting in Spring '26, Salesforce blocks creation of new connected apps by default — the block covers both the UI and the Metadata API, with package installation as the one allowed exception. If you're designing a brand-new integration in a Spring '26+ org, a fresh connected app may not be creatable at all. Plan for one of these paths up front instead of discovering the wall mid-build:
- Build the integration on an External Client App (ECA) — Salesforce calls ECAs "the new and improved generation of connected apps" and recommends them instead. The trust-model decision below is unchanged; only the container is.
- If the design genuinely needs a connected app (for example, a capability an ECA does not yet cover), request an exception from Salesforce Support, or deliver the app through a package installation, which remains an allowed path.
External Client Apps and the Spring '26 creation freeze
For net-new work in a Spring '26+ org, default to an External Client App and reserve connected apps for existing integrations and package-delivered apps. Key differences to weigh when choosing or migrating: