Siirry sisältöön

Partners Bring Their Own

Tämä sisältö ei ole vielä saatavilla valitsemallasi kielellä.

Module 3 of 5 in the chapter Customers and Partners, chapter 14 of Securing Salesforce: Identity and Access. Each module stands on its own.

The question this module answers: How does a partner company’s own identity provider sign its people in to your partner site, and make their records?

Tomás Reyes sells your products. He works for a partner company, not for you. His company hired him, his company gives him a laptop and a login, and one day his company will let him go.

When that day comes, who will remember to switch off his login to your partner site? If it’s a site login you gave him, the answer is you, and you’ll find out last. If he comes in through his own company’s identity provider, the answer is his company, the moment he leaves (module 2).

That’s the whole reason to let partners bring their own. And most large partners already have an identity provider, the same way your company does.

It’s chapter 6 again, with the site in Salesforce’s place. The partner’s identity provider is the identity provider; your site is the service provider. SAML when all you need is to sign him in; an auth provider with OpenID Connect if you also need his data at the partner (S9; module 2).

For SAML, a site’s setting has a few things of its own (S10):

  • The Entity ID. It “must be unique across your org and begin with https.” And: “Generally, use the site URL as the entity ID.” So each site, and each partner’s setting, is its own.
  • The Recipient. The assertion is sent to the site, not to the internal login page: the Site Login URL, in the form https://domainName/login?so=orgID, shown on the setting’s detail page.
  • The Federation ID. Just-in-time needs it: “In SAML User ID Type, select Assertion contains the Federation ID from the User object.”

Then the setting appears in module 2’s list, and you add it to the site’s login page as a button: “Log in with your company.”

In class I put it this way: at some point in this process Salesforce might need to not just log you in but create a user. It may want your name and phone. That’s just-in-time provisioning, chapter 12. For staff it makes one record, a user.

For an outsider, module 1 said, there are three: the user, the contact and the account. So just-in-time for a site has more to do. “With Just-in-Time (JIT) provisioning for Experience Cloud, you can use a SAML assertion to create Experience Cloud site users the first time they log in from an identity provider” (S10), and the assertion can carry the contact’s and the account’s fields too, each with its prefix: Contact.Email, Account.Name (S10).

So when Tomás’s assertion arrives, what does Salesforce do? It looks in four places, in order, and stops at the first one it finds (S10).

How just-in-time finds the user How just-in-time finds the user on an Experience Cloud site: Salesforce looks in order, and acts at the first one found. 1, a user with this Federation ID, the assertion's subject: update the user and log in. 2, a contact with this email, Contact.Email or User.Contact: update the contact and make the user on it; this step is marked: matched on email alone, so decide whom you trust to send it. 3, an account with this number, Account.AccountNumber or Contact.Account: make a contact and a user on that account. 4, nothing found, none of the three: make an account, a contact and a user, all three new, from the assertion's attributes. Footnote: the order as Salesforce Help describes it, checked 2026-11-06; a custom JIT handler can do its own matching. {"author": "Steve Simpson", "blueprint": "1.0.0", "builder": "standard 1.58.0", "built": "2026-11-06", "id": "DGM-IAM-EXU-03", "rights": "\u00a9 2026 Twinshark LLC. All rights reserved.", "template": "cells 0.5.0", "theme": "stevetecharc 1.4.0"} SALESFORCE LOOKS FOR, IN ORDER AT THE FIRST ONE FOUND 1. A user with this Federation ID the assertion's subject Update the user and log in 2. A contact with this email Contact.Email, or User.Contact Update the contact and make the user on it 3. An account with this number Account.AccountNumber, or Contact.Account Make a contact and a user on that account 4. Nothing found none of the three Make an account, a contact and a user all three new, from the assertion's attributes found found found then Order as Salesforce Help describes it, checked 2026-11-06. A custom JIT handler can do its own matching. HOW TO READ IT matched on email alone: decide whom you trust to send it © 2026 Twinshark LLC · stevetecharc.com
Click to enlarge
  1. A user with this Federation ID. Found: update the user. This is every login after the first.
  2. A contact. By User.Contact, the contact’s record ID, or by email. “Contact.Email and Contact.LastName are both required properties when User.Contact isn’t specified, but matching is only based on Contact.Email” (S10). Found: update the contact, and make his user on it.
  3. An account. By Contact.Account or the account number. “Account.AccountNumber and Account.Name are required properties when Contact.Account isn’t specified, but matching is only based on Account.AccountNumber” (S10). Found: make a contact and a user on it.
  4. Nothing. Then “Salesforce inserts new account, contact, and user records based on the attributes provided in the SAML assertion” (S10).

A few more rules from the same page. Custom fields work on the user only: “Custom fields aren’t supported for Accounts or Contacts.” An inactive user stays inactive unless the assertion sets User.IsActive to true. And unless the site has self-registration with a default profile and role, the assertion must name a profile (S10).

Now look at step 2 again. This part is my reading, not Salesforce’s words.

The contact is matched on email alone (S10). So whatever identity provider sends that assertion decides which of your contacts this person becomes. Your partner’s identity provider is trusted for its own people. Is it trusted to say “this is the contact with this email”, for any email, in your whole org? A mistake at the partner, a mistyped email, or someone at the partner who should know better, and a person lands on a contact at a different company, with that company’s cases and deals behind it.

The same goes for step 3: the account number in the assertion picks the account.

So for partners, I don’t leave it to the standard. I use a custom JIT handler, chapter 12’s, one per partner’s setting. Salesforce’s generated handler already supports “Account lookup by account number”, “Contact lookup by email”, “Standard user provisioning into an Experience Cloud site”, and a default profile and role “for portal Just-in-Time provisioning” (S11). Change it so that the account isn’t read from the assertion at all: this setting belongs to this partner, so every user it makes goes on this partner’s account, and only contacts on that account can be matched.

One more thing to know when you write it: if the identity provider sends contact or account fields in the same assertion as the user’s, “the generated handler usually can’t make updates” (S11). Salesforce lists the fields that can’t be saved together. Test it in a sandbox with a real assertion.

Most partner sites have more than one partner. Each one with its own identity provider gets its own SAML setting, with its own certificate, its own Entity ID, and its own button on the login page: “Log in with Partner A”, “Log in with Partner B”. Partners with no identity provider of their own use the site’s login (module 2).

And the Federation ID. Each partner’s identity provider sends its own IDs. Two partners can easily have a person called jsmith. Don’t let that be a question: have each partner’s handler put the partner in front of the ID it stores, or use an ID the partner guarantees is unique, like an email address at the partner’s domain. This course hasn’t yet tested what Salesforce does with the same Federation ID from two settings. When two users in one org share a Federation ID, the login fails (chapter 18, module 2).

Now the day comes. Tomás leaves the partner. The partner switches him off in its identity provider, and he can’t get in to your site any more: there’s nobody to send an assertion for him.

But his user is still there in Salesforce, active, with a license. Just-in-time never removes anyone (chapter 12). So agree with each partner how leavers reach you: a monthly list, a call to your API, or SCIM where it fits. Module 5 takes it from there.

Test knowledge. In my experience, know how just-in-time provisioning works for an Experience Cloud site: it can make the contact and the account as well as the user, and it matches in an order: Federation ID, contact, account. Be ready to recommend how partners’ users are provisioned.

Module 4: customers make themselves. Self-registration, and where a stranger lands.

  • Which partners bring their own identity provider, and which use the site’s login.
  • SAML or an auth provider, per partner.
  • Standard or custom just-in-time, and what each partner’s setting may match.
  • A Federation ID that can’t collide across partners.
  • How leavers reach you, from every partner.