Skip to content

The Dance

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

The question this module answers: To connect two Salesforce orgs with single sign-on, what do you do in which org, and why do you go back and forth?

When I build this live in a class, it takes about five minutes. That surprises people. But the five minutes only work because of what’s done before.

You need two orgs, and you need to always know which one you’re in. In chapter 4’s practice, you gave each one its own My Domain and its own logo, an admin who never uses single sign-on, and a test user, Priya. That’s about half the effort, and it matters. The addresses are very important in single sign-on: almost every value you’ll exchange is built from them. So settle each My Domain before you start. Change it later, and the values change with it (chapter 6, module 7).

And keep the admins out of it. You’ll test with Priya. If a setting is wrong, Priya can fail all day; the admin still gets in with a password and MFA.

Here’s the order. I call it the dance, because you go from one org to the other and back.

The dance: one org, then the other, then back Two columns: the identity provider org and the service provider org, with seven numbered steps going down the page. In the identity provider org: 1, enable the identity provider, with the default SHA-256 certificate; 2, download its metadata, which holds the Issuer, the certificate and the login address. An arrow carries the metadata file across. In the service provider org: 3, turn on SAML and add the single sign-on setting from the metadata file, with Federation ID as the identity type; 4, give Priya her Federation ID, E10442, and put the identity provider's button on the login page; 5, read the Endpoints, the Entity ID and the address for answers. An arrow carries those two back. In the identity provider org: 6, register the service provider as a SAML-enabled app, with the Entity ID, the address for answers and Federation ID as the subject; 7, say who may go, with a permission set for Priya and her Federation ID, E10442. Footnote: back and forth in this order, because each side needs values only the other one has. {"author": "Steve Simpson", "blueprint": "1.0.0", "builder": "standard 1.58.0", "built": "2026-11-04", "id": "DGM-IAM-IDP-02", "rights": "\u00a9 2026 Twinshark LLC. All rights reserved.", "template": "cells 0.5.0", "theme": "stevetecharc 1.4.0"} THE IDENTITY PROVIDER ORG THE SERVICE PROVIDER ORG 1. Enable the identity provider Setup, Identity Provider; the default SHA-256 certificate 2. Take its metadata Download Metadata: the Issuer, the certificate, the login address 3. Turn on SAML, add the setting New from Metadata File; Federation ID as the identity type 4. Priya, and the button her Federation ID, E10442; the identity provider's button on the login page 5. Read the Endpoints the Entity ID and the address for answers 6. Register the service provider a SAML-enabled app: the Entity ID, the address for answers, Federation ID as the subject 7. Say who may go a permission set for Priya; her Federation ID, E10442 the metadata file Entity ID + address for answers Back and forth, in this order: each side needs values only the other one has. HOW TO READ IT the org that vouches © 2026 Twinshark LLC · stevetecharc.com
Click to enlarge

In the identity provider org:

  1. Enable the identity provider. From Setup, find Identity Provider and select Enable Identity Provider. Keep the default certificate, self-signed with SHA-256, and save (S1). In a new Developer Edition org it may already be on. If it is, check the certificate and move on.
  2. Take its metadata. Select Download Metadata: one XML file that describes this identity provider (S1). It carries the Issuer, the certificate and the address where requests should go. Note the Issuer on the page too.

In the service provider org:

  1. Turn on SAML, and add the setting. In Single Sign-On Settings, enable SAML, then select New from Metadata File and choose the file from step 2. Salesforce fills in what it can. Set the identity type to the Federation ID, and save. That’s chapter 6, module 3, field by field.
  2. Priya, and the button. Give Priya her Federation ID: E10442, her employee number, the value that will never change for her. Then, in My Domain’s Authentication Configuration, add the identity provider’s button beside the login form. Keep the login form, for the admin.
  3. Read the Endpoints. On the saved setting, the Endpoints section shows two values the identity provider needs: the service provider’s Entity ID and its address for answers, the Assertion Consumer Service URL.

Chapter 6’s practice did steps 2 to 5. If you followed it, you’re halfway through the dance already.

Back in the identity provider org:

  1. Register the service provider. Tell the identity provider about the app it will vouch for: a SAML-enabled app (S2). It holds the two values from step 5, the Entity ID and the address for answers, and the subject type, which says what Salesforce puts in the assertion to name the person. Set it to the Federation ID (S7).
  2. Say who may go. The identity provider decides who it will vouch for into this app, by profile or permission set. Give Priya a permission set for it. And give Priya in this org the same Federation ID, E10442 (S6).

Then the first login, which is module 4. When it works, I always ask the room two questions: which org am I in, and who am I logged in as? You’ll see the answer there.

Why not do one org, then the other, and be done? Because each side needs values that only the other one has.

The service provider can’t trust the identity provider until it has the identity provider’s Issuer and certificate. Those come from the identity provider, in the metadata file. So the identity provider goes first.

The identity provider can’t send an assertion anywhere until it knows the service provider’s Entity ID and its address for answers. Those don’t exist until the service provider’s setting is saved. So you have to go back.

Chapter 6 gave you the six pairs that must match, with the service provider’s column filled in. The dance fills in the other column:

The pairComes fromGoes to
The identity provider’s IssuerIdentity provider org, step 2The service provider’s setting, step 3
The certificateIdentity provider org, step 2The service provider’s setting, step 3
The identity provider’s login addressIdentity provider org, step 2The service provider’s setting, step 3
The service provider’s Entity IDService provider org, step 5The registered app, step 6
The address for answersService provider org, step 5The registered app, step 6
Priya’s Federation IDYou choose it: E10442Both users, steps 4 and 7

Look at the last row. It’s the only one that isn’t copied from one org to the other. You choose it, and you put the same value on both users. That’s the secret sauce: the Federation ID on the identity provider’s Priya and the Federation ID on the service provider’s Priya are what link them together. Her usernames in the two orgs are different, and they always will be; the Federation ID is what’s the same.

When I filmed this build, step 6 was New Connected App: a few fields in Setup, a couple of pasted addresses, done. That’s still how existing orgs do it, and those connected apps keep working. But since Spring ‘26, creating a new connected app is off by default in every new org, and you need a request to Salesforce Support to do it (S3, S8). Salesforce’s way now is an external client app.

Nothing about the dance changes. Same order, same values, same reason to go back. What changes is how step 6 looks, and module 3 shows it.

Once you’ve done it, it really isn’t that complex. You just need to get the little intricacies right: the right value in the right org, in the right order. If you can do this yourself, from two clean orgs, you’ve got single sign-on totally nailed, from both seats.

In 2023 I filmed this whole build, from two brand-new orgs to the first login. The note under the video says what’s still right and what’s changed since.

STA 3.5 · Salesforce Security and Identity: Salesforce to Salesforce Single Sign-On · 19:42 · published 2023-09-25 · plays from YouTube when you click it · Watch on YouTube · More videos: Salesforce Identity & Access Videos

Module 3: registering the service provider today, step 6 in detail.

  • The two My Domains, settled before the dance starts.
  • Which value is the Federation ID, and who puts it on every user, in both orgs.
  • Who may go: the profile or permission set the identity provider vouches for.
  • Who owns each side, when the two orgs have different admins, and where the six pairs are written down.