Skip to content

The SP-Initiated Flow, Step by Step

Module 1 of 7 in the chapter Salesforce as the Service Provider: SAML, chapter 6 of Securing Salesforce: Identity and Access. Each module stands on its own.

The question this module answers: When Priya opens a Salesforce link first thing in the morning, what does Salesforce do at each step, and what tells it how?

In chapter 4, you watched Priya’s browser carry every message of a single sign-on login: the redirects, the SAML request, the SAML response, the session. We drew it as a swim lane, one lane for each actor, and saw that the identity provider and Salesforce never call each other. The browser is the broker.

That’s the whole flow, from the outside. Now sit inside Salesforce. This is Part 2 of the course, and the question changes from “what is single sign-on?” to “how does Salesforce do its half?” Most companies sign their staff in to Salesforce from an identity provider they already run. Salesforce is the service provider: the system that trusts someone else to say who she is.

This module walks the most common flow, the one that starts at Salesforce. It’s called service provider-initiated, or SP-initiated, because the service provider sends the first SAML message.

Here’s the same swim lane, the same cells as chapter 4. What’s new is in the two cards in Salesforce’s login server lane: the settings Salesforce reads.

The SP-initiated flow, from Salesforce's seat Four lanes: Priya's browser, the identity provider, Salesforce's login server and Salesforce's instance. Step 1: the browser opens a link to a Salesforce record; the instance has no session yet and redirects the browser to the login server. Step 2: the login server decides which identity provider to use, from the button on the My Domain login page or the Identity Provider Login URL, signs the request with the Request Signing Certificate, and redirects the browser to the identity provider with a SAML request. Step 3: at the identity provider's login screen, Priya signs in with MFA, and the identity provider sends back a signed SAML response. Step 4: the browser posts the response to Salesforce's address for answers; the login server checks it against the setting, the Identity Provider Certificate, the Issuer, the Entity ID and the time, finds the user by the SAML Identity Type, and redirects the browser back with a session. Step 5: the browser asks for the record again, with the session, and Priya is in. Footnote: the same five steps as chapter 4; what's new is the parts of the single sign-on setting Salesforce reads. {"author": "Steve Simpson", "blueprint": "1.0.0", "builder": "standard 1.58.0", "built": "2026-11-03", "id": "DGM-IAM-SP-01", "rights": "\u00a9 2026 Twinshark LLC. All rights reserved.", "template": "cells 0.5.0", "theme": "stevetecharc 1.4.0"} PRIYA'S BROWSER THE IDENTITY PROVIDER SALESFORCE'S LOGIN SERVER SALESFORCE'S INSTANCE 1. Opens a link to a Salesforce record No session yet redirects the browser to the login server 2. Goes to the login server redirected by the instance Which identity provider? the button on the My Domain login page, or the Identity Provider Login URL; signs the request with the Request Signing Certificate 3. Goes to the identity provider redirected, with the SAML request The login screen Priya signs in, with MFA; sends back a signed SAML response 4. Hands over the response posts it to Salesforce's address for answers Checks it against the setting the Identity Provider Certificate, the Issuer, the Entity ID, the time; finds the user by the SAML Identity Type 5. Back to the record redirected, with the session The record checks the session; Priya is in asks for the record redirect: go to the login server follows the redirect redirect to the IdP + SAML request SAML request SAML response posts the SAML response redirect + session asks again, with the session the record The same five steps as chapter 4. What's new is in the two login server cards: the parts of the single sign-on setting Salesforce reads. HOW TO READ IT the identity provider: the one login screen the check passes © 2026 Twinshark LLC · stevetecharc.com
Click to enlarge

Let’s take each step from Salesforce’s point of view.

It’s the beginning of the day. Priya clicks a link to a Salesforce record: a bookmark, a link in an email, an address her browser fills in for her. The record lives on Salesforce’s instance, the server that holds the org’s data. The instance looks for a session and finds none. So it redirects her browser to the login server.

Remember what a redirect is. It isn’t the instance calling the login server. It’s a command in the page that comes back to the browser, telling it to go somewhere else. The browser does the going.

Now the login server has to decide where to send her. Salesforce knows because you told it, in a SAML single sign-on setting (Setup, Single Sign-On Settings). That setting names the identity provider and holds everything Salesforce needs to talk to it. Module 3 sets one up.

How does she get to it? Two common ways:

  • A button on the My Domain login page. You add the identity provider to the page in My Domain’s Authentication Configuration. The button shows the setting’s name, so Salesforce suggests naming the setting after the identity provider (S1, S7).
  • Straight there. Some setups send her on to the identity provider without a click, when it’s the only way in on the login page. How yours behaves depends on the login page’s settings in My Domain, so try it in your own org. When there’s more than one way in, she chooses (Microsoft’s Entra tutorial says the same, S8).

Either way, Salesforce writes a SAML request: please go log this person in. If you chose to sign requests, it signs this one with the Request Signing Certificate from the setting. It sends the request to the address in the Identity Provider Login URL, as a form (HTTP POST) or in the address itself (HTTP Redirect), whichever the identity provider asks for (S1). And the browser goes.

The identity provider shows its login screen. It could be a password and MFA, a passkey, whatever that company has set up. That’s the identity provider’s job, not Salesforce’s. When Priya has proved who she is, the identity provider writes the SAML response, signs it, and sends her browser back to Salesforce with it.

The browser posts the response to Salesforce’s address for answers. That’s where Salesforce does its real work. It checks the response against the same setting:

  • the signature, against the Identity Provider Certificate you uploaded;
  • the issuer, against the Issuer;
  • the audience, against the Entity ID;
  • the time window, and that it hasn’t seen this assertion before;
  • and who to log in as, using the SAML Identity Type: her username, her Federation ID or her user ID (module 5).

These are the five questions from chapter 4, module 6, each answered by one field of the setting. One “no”, and she doesn’t get in.

Every answer is yes. Salesforce issues a session, Priya’s wristband from the front door, and redirects the browser back to the record she asked for. The instance sees the session and shows her the record. From the user’s point of view, she clicked a link, saw a login screen, and landed where she meant to go. Everything in between was redirects.

That’s what I mean when I say identity providers don’t get you into Salesforce. They get you into Salesforce’s login server. Salesforce makes the last decision, every time.

Since February 2026, Salesforce can stop an SP-initiated login at step 4 for one more reason. If Priya is on a device or browser Salesforce doesn’t recognize, Salesforce asks her to activate it, unless the identity provider’s response proves she used a secure method such as MFA, or the org’s trusted IP ranges are narrow (S9). So what the identity provider says about how she signed in now matters. Module 4 shows where it says it, and module 7 what to do when the prompt appears.

On the grid of every way to sign in (chapter 5, module 6), this chapter is the single sign-on set. This module is its first card, SAML started at Salesforce.

On the map: single sign-on into Salesforce On the map: single sign-on into Salesforce, where another system checks who you are. Four mechanisms. In blue, taught so far: SAML started at Salesforce, SP-initiated, chapters 4 and 6; and SAML started at the identity provider, IdP-initiated, chapter 6. In slate, still ahead: OpenID Connect and social sign-on, through an auth provider, chapter 10; and delegated authentication, where Salesforce asks your system, chapter 10. {"author": "Steve Simpson", "blueprint": "1.0.0", "builder": "standard 1.58.0", "built": "2026-11-03", "id": "DGM-IAM-SP-06", "rights": "\u00a9 2026 Twinshark LLC. All rights reserved.", "template": "cells 0.5.0", "theme": "stevetecharc 1.4.0"} THE SET: WHO SIGNS IN, AND HOW THE MECHANISMS Single sign-on into Salesforce another system checks who you are SAML, started at Salesforce SP-initiated · ch 4, 6 SAML, started at the IdP IdP-initiated · ch 6 OpenID Connect and social sign-on through an auth provider · ch 10 Delegated authentication Salesforce asks your system · ch 10 HOW TO READ IT taught so far (chapters 2 to 6) taught in a later chapter © 2026 Twinshark LLC · stevetecharc.com
Click to enlarge

In 2023 I made a short video on this flow, and on what each side sets up. The note under the video says what’s still right and what’s changed since.

STA 3.4 · Salesforce Security and Identity: SSO & SAML Configuration and Flow · 5:49 · published 2023-09-22 · plays from YouTube when you click it · Watch on YouTube · More videos: Salesforce Identity & Access Videos

Module 2: what happens at the second app of the day, and when the day starts at the identity provider instead.

  • Which identity provider Salesforce uses for staff, and its single sign-on setting.
  • How users reach it: a button on the My Domain login page, or straight to the identity provider.
  • Whether Salesforce signs its requests, and with which certificate.
  • Which binding the identity provider expects, POST or Redirect.